Contributions 1 min read

# Fixing “Sort children by” on folders containing folder breaks

Our Pimcore team has found another bug - and it's fixed ASAP! Check out how Dino, our Pimcore developer, fixed this issue and made sure that the "Sort children by" option works as intended

Last updated on 29 August, 2025

## Key takeaways

1. Changing the Sort children by option in Pimcore broke on folders that contained other folders.
2. The error occurred because the getLatestVersion method was called on a folder rather than only on objects.
3. Factory added a check so the method runs only on non-folder objects, and the Sort children by option now works as intended.

## **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](https://github.com/pimcore/pimcore/pull/9869), just follow the link!

## Related

[Contributions **Option to allow free input in select editable** More power is given to the developers through this fix. Now, it's up to them allow editors even more freedom when working in Pimcore. Find out what's new. 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/free-input-select-editable) [Contributions **Validation errors with subItems without context stack fix** Our Pimcore developer, Tomislav, has solved another issue on the Pimcore platform. Find out why this pull request is important and what use will users have from this… 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/validation-errors-fix) [Contributions **Added async option to headscript fix** Check out one of our Pimcore developers helped add the async option to the headscript, and bringing closer the release of Pimcore X! 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/added-async-option-headscript-fix)

---

Source: https://factory.dev/pimcore-knowledge-base/contributions/sort-children-by-folders-fix
