API Wrapper - Creating new comments, user is not the correct one.

This topic is archived because there were no new posts for more than 12 months. The historical information on these pages is provided for information only, and may no longer be relevant!

Please, don't base your purchase decisions on information provided at this page, and consider starting a new topic instead

avatar Ilija S. Staff Feb 16. 2012. 3:09 pm
Hello Zoran,

We'll need to debug this. At this point, activeCollab wrapper is not our highest priority (activeCollab 3 is) so this bug may need to wait until we find some time for it. Give a chance to PHP 5.3 on your production server as well. You'll need it when activeCollab 3 gets out anyway :)
avatar zoranl Feb 18. 2012. 3:03 pm
Hey Ilija, don't bother, it is bug in the SimpleXMLElement class cause of the PHP version, this is solved in further versions of PHP, but I am writing my own parser now for my case :)
avatar Ilija S. Staff Feb 18. 2012. 8:42 pm
Thanks for the feedback, we were not aware that such bug existed. Basic recommendation still stands: always use latest stable builds of your stack (web server, PHP, MySQL) and activeCollab.
avatar zoranl Feb 20. 2012. 12:53 am
Finally, after writing my own parser, I could see that the received data in some cases contained javascript code with script tags in it, in my PHP version I had to strip it down before using the response from the API:
<code>
$response = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $response);
</code>
avatar Ilija S. Staff Feb 20. 2012. 1:26 pm
Hello,

Which exact elements had SCRIPT tags in them? Companies should not return any content that has SCRIPT tags. Can you please paste a problematic response, so we can see what's going on?
avatar zoranl Feb 20. 2012. 1:39 pm
For example I am doing the following call:
'/projects/'.$project_id.'/tickets/'.$ticket_id.'&format='.$format with the proper variables and the response I am getting has the correct format plus at the end I am getting this bit of script:

<script type="text/javascript">
  App.widgets.tickets_merge.options(24);
</script>


I need to strip this in order to parse the response, otherwise I have problems parsing the XML or JSON content.
avatar Ilija S. Staff Feb 20. 2012. 1:46 pm
Thanks for the feedback, that code is added by a third party module. Is it inside of <![CDATA[ ... ]]> element?

Try activeCollab for 30 days

Instant access and no credit card required

.manageprojects.com