fyi: getting 2 warning messages on an ajax element update

skyrun

Active Member
the ajax works fine if i turn off warnings/notices, but returns this if warnings are enabled:

HTML:
<b>Warning</b>:  json_decode() expects parameter 1 to be string, array given in <b>/home/skyrunftp/subdomains/breckenridge/httpdocs/testv3/components/com_fabrik/models/group.php</b> on line <b>1569</b><br />
<br />
<b>Warning</b>:  array_diff(): Argument #1 is not an array in <b>/home/skyrunftp/subdomains/breckenridge/httpdocs/testv3/components/com_fabrik/models/group.php</b> on line <b>1526</b><br />

{"msg":"Record added\/updated","url":"\/skytrax-reservations\/operations-dashboard","baseRedirect":true,"rowid":"5338","suppressMsg":false}

not sure what about my group setup is causing this.

you can see it at: https://testlocation.skyrun.com/sky...resetfilters=0&clearordering=0&clearfilters=0
then select today and click the large checkbox to toggle it.
 
Looks like you've rolled your own form.process AJAX event, but aren't including some of the required metadata, in this case 'fabrik_group_rowids', which has to be an array, keyed by id of the groups, each entry being an array of the original rowids for that group. Which we use to figure out which repeats we need to delete, by comparing with the submitted repeat data.

As that data isn't there, the json_decode() of it blows up, which then blows up the array_diff() that works out which repeats to delete.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top