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"
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
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
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:
Change it to read:
Not ideal, but it will make the error go away.
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.
I review github repository daily for fixes to issues like this and others. I hope to see this in there soon.