array_key_exists() expects parameter 2 to be array, null given in/srv/...components/com_fabrik/helpe

jcuming

Member
Hi All
I've just updated Fabrik to the latest version (3.4) and updated Joomla to the latest (3.4.8).
On looking at my site, which worked perfectly before the two updates, in a Fab modulc, I now get the folliwng message:

Warning: array_key_exists() expects parameter 2 to be array, null given in/srv/disk3/jcuming/www/choirpractice.org.uk/components/com_fabrik/helpers/html.phpon line 1037
Anyone any ideas why this should be? It worked fine before!
Any thoughts v welcome!
Jim
 
Form or list module?

Are you using the content plugin to render another Fabrik "thing", like (say) showing a list in the intro to a form?

You might try logging out and back in, on front end and backend.

That line of code is to do with how we avoid including the same Javascript files twice, if you are rendering multiple Fabrik "things" at the same time, like a form in a list intro, or a list in a form outro, etc. The variable that error is complaining about should get cleared from the session at the end of every page load. I've tested several combinations, trying to reproduce that warning, but it works fine for me ... and that code hasn't changed for about 2 years.

-- hugh
 
I added some defensive coding to squash the error message, but I still don't see how it is occurring in the first place. Updating from github should remove the error.


Sent from my HTC One using Tapatalk
 
I think I have seen this message, too, after updating Joomla. But I couldn't replicate. I assume it was some session/caching effect.

gesendet mit Tapatalk
 
Weird. I can see why session data would become unreadable after a J! upgrade, but I can't see how the old session data from prior to the upgrade would still be there, as we clear that data at the end of every page load. The data is loaded in the HTML helper (where it's erroring out) with ...

Code:
        // Load any previously created shim (e.g form which then renders list in outro text)
        $newShim = $session->get('fabrik.js.shim', array());

... then cleared in the system plugin as one of the last things we do in onAfterRender ...

Code:
        $session->clear('fabrik.js.scripts');

So any "bad" data in the session should be long gone.

Maybe it's one of those things that you need to log out and back in again to fix.

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

Thank you.

Members online

Back
Top