Fixing "Sort children by" on folders containing folder breaks

What was the issue? 

There was an issue when changing the “Sort children by” option on folders that contain folders.

How did you solve it? 

The issue was caused because the method getLatestVersion was called on a folder, so I just added a simple check so the method would only be called on objects that are not folders.

Why is this fix important?

This is important because it fixes a bug and now the “Sort children by” option on objects is working as intended.

How does it feel to contribute to a platform such as Pimcore? 

It's always a nice feeling to find and fix a bug on a platform we all work on!

And if you want to check out this pull request, just follow the link! 

Looking for Exponential Growth? Let’s Get Started.
Explore next

Pimcore guides & How to

Collection of latest concepts, viewpoints and examples from the Pimcore word written by Pimcore industry experts.

Discover more