File set is not saving my re-ordering of images

Permalink
I have a fileset that I have created, I got into the Fileset to re-order them and after I save my re-ordering and I go back into the File Set is it not saving my changes, it reverts back. Why is this happening?

 
alpdog14 replied on at Permalink Reply
Really no one can help me on this, I still cannot re-order File Set, why is this? This is a major bug in the system
foster replied on at Permalink Best Answer Reply
foster
I ran into a similar problem, when I had files that were in multiple file sets.
If that is your case, the oldest file set creates the order and the order for the newer file set will not change.

Try this - a response from the bugtracker - which I will repost below.http://www.concrete5.org/developers/bugs/5-4-2-1/file-set-reorderin...


This seems to be working....(thanks @arcanepain)
I copied file_list.php from the folder "concrete/models" into the folder "models". Then I replaced line 126:
$this->filter(false,'f.fID IN (SELECT DISTINCT fID FROM FileSetFiles WHERE fsID = '.$db->quote($fsID).')');

with
$this->filter(false,'f.fID IN (SELECT DISTINCT fID FROM FileSetFiles WHERE fsID = '.$db->quote($fsID).') AND fsID = '.$db->quote($fsID).'');
alpdog14 replied on at Permalink Reply
wow this totally worked, I followed your direction and when I went to my file set and re-ordered it saved my changes. They need to change this code officially on the download files on concrete5 website. Thanks so much for your help.
foster replied on at Permalink Reply
foster
Awesome. Glad to help!
menostar replied on at Permalink Reply
Hello I'm running version 5.5.2.1 and there is no line 126 in file_list.php with the similar code mentioned in your post?

Any ideas?

Thanks in advance
menostar replied on at Permalink Reply
Hello I'm running version 5.5.2.1 and there is no line 126 in file_list.php with the similar code mentioned in your post?

Any ideas?

Thanks in advance
foster replied on at Permalink Reply
foster
Sometimes line numbers can change. Do you see anything in the entire file that matches the following line?
$this->filter(false,'f.fID IN (SELECT DISTINCT fID FROM FileSetFiles WHERE fsID = '.$db->quote($fsID).')');


If so, just replace with the new code from the post above and you should be good.