[PHP 8] array_flip(): Argument #1 ($array) must be of type array, null given in backend manager

More
3 years 3 months ago - 3 years 2 months ago #80644 by dan40
Ever since the Joomla upgrade to the latest version, Flexicontent has been giving me some trouble.  I fixed the Error 500 by reading up here on the forums on editing the configuration file and changing the version number of Flexicontent, but that has introduced some other problems.

I can no longer edit my Items or Categories, and when I try to do that, I get this:

An error has occurred.

0 array_flip(): Argument #1 ($array) must be of type array, null given

 Return to Control Panel

Also, my back-end small thumbnail images are all corrupt and will not show me what the image is.  To fix this I have to upload my images to each record again and then I can see them as I'm editing the record, but not in the Items menu, and they are OK after the replacement images. The front-end items are all showing normally.  If I can somehow get to the Items menu again, is there some way I can rebuild all of the thumbnails?

Thanks

coincollection.dansmith.ca
 
Last edit: 3 years 2 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago - 3 years 2 months ago #80647 by ggppdk
Hello

please enable Joomla Debug option to find out see which code is throwing this error and post back here


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 3 years 2 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago - 3 years 2 months ago #80656 by dan40
Here is a screen capture from when I click the Flexicontent "Items" menu option.
Last edit: 3 years 2 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago - 3 years 2 months ago #80657 by dan40
This is what I get when I click "Categories".
 
Last edit: 3 years 2 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago - 3 years 2 months ago #80660 by ggppdk
Hello

i have looked at the code this would happen if the cookie data are not as expected for some reason causing the method parsing them to return null

Will fix this for next release but now what you can do is clear all cookies for this particular website or use a different browser to access the backend

The fix is to replace the line 358 that is giving the error
Code:
$colsvisible = array_flip(flexicontent_html::getVisibleColumns($this->data_tbl_id));

with:
Code:
$colsvisible = flexicontent_html::getVisibleColumns($this->data_tbl_id); $colsvisible = is_array($colsvisible) ? array_flip($colsvisible) : array();

If you can test the above fix it will be helpful
 


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 3 years 2 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
3 years 2 months ago - 3 years 2 months ago #80686 by dan40
That helped, thanks very much! Now I can click on my Items and Categories with no further issues.

The issue not being able to see the preview thumbnails in the back end image field, I discovered simply by refreshing the page, I can see them again.

Dan
Last edit: 3 years 2 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.354 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline