Skip to content

Conversation

@jakub-gawryl
Copy link

I had a problem with sorting by 'rank' field in GalleryAlbums. The problem was that, when i had some parent Albums and then few Album-childrens inside, the rank field for childrens in each Album-parent was reset to 0, so sorting function work only for one Parent-Album. When i had many of that sets, sorting function did mess.

The problem was in line 461 in galalbum.class.php:
$c->sortby($sort,$dir);
This simple 'sortby' didn't include parent field.

The solution is replace that mentioned line by
$c->sortby('COALESCE(parent, rank) DESC, rank',$dir);

I hope you can understand what i mean :)

EDIT 23.05:

  • COALESCE in that configuration don't work correctly. I'm working on it...

danyaPostfactum and others added 30 commits December 27, 2012 20:27
Wrong path for documentation
Fixed drag'n'drop resort behaviour
Includes Pull Request #8 and Pull Request #5
Fix for Gallery and 'Access Denied' messages in the MODX Manager
theboxer and others added 28 commits January 5, 2015 14:14
* origin/pr/77:
  Update version
  Add changelog for fix
  Fix vulnerability related to the one fixed in 2.6.5
…nly_full_group_by)

Full error: Expression #13 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'premium.AlbumItems.rank' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
ERROR .../core/components/gallery/processors/mgr/item/ajaxupload.php 75
[Gallery] Album Type: # (number) - fix
@matdave matdave deleted the branch splittingred:develop June 11, 2022 15:12
@matdave matdave deleted the develop branch June 11, 2022 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.