Errors editing file set names

Permalink
Just recently, whenever I edit the name of a fileset in my site, I get the following error coming up after clicking "Save"
Warning: Invalid argument supplied for foreach() in /home/wallbrin/public_html/concrete5/updates/concrete5.5.1/concrete/models/file_set.php on line 98
Warning: Cannot modify header information - headers already sent by (output started at /home/wallbrin/public_html/concrete5/updates/concrete5.5.1/concrete/models/file_set.php:98) in /home/wallbrin/public_html/concrete5/updates/concrete5.5.1/concrete/libraries/controller.php on line 357

This is after upgrading to 5.5.1 as you can see. The edit to the fileset name still saves ok, but it would be nice to not have this come up each time.

Any ideas?? BTW I haven't touched any of the files mentioned above.

Richard

stretchrt
 
jstn128 replied on at Permalink Reply
I am having the same issue. I am about to go live with a large local government site that has ~50 users contributing and editing pages and files. I will be using file sets extensively to control group access to files and this is a major issue for me. I hope this moves to the top of the issues to fix.

I review github repository daily for fixes to issues like this and others. I hope to see this in there soon.
xaritas replied on at Permalink Reply
The bug won't happen if there is even one file in the FileSet. It only happens on empty FileSets, as far as I can tell. So it's pretty harmless, assuming your business model isn't based on creating and then renaming lots of empty FileSets.

If you want more of a band-aid, you can patch controllers/dashboard/files/sets.php. Around line 87, you should see the following:
parse_str($this->post('fsDisplayOrder'));
$file_set->updateFileSetDisplayOrder($fID);

Change it to read:
parse_str($this->post('fsDisplayOrder'));
if ($fID) $file_set->updateFileSetDisplayOrder($fID);


Not ideal, but it will make the error go away.