What happened?
Description
When trying to get all structure elements from an array of elements, The fillGapsInElements is not returning all elements from the structure, it's depending on the sort order of the given elements.
Example:
when passing in 2 elements into the function with the following structure:
- fietsen/heren/starters-racefiets/starters-racefiets
- fietsen/racefietsen/starters-racefiets
The lft value of the first element is 117, the second 14
When passing the elements in this order the returned array is missing the fietsen/racefietsen entry.
When I would change the order of the passed in elements the fietsen/racefietsen entry is returned as well
Craft CMS version
5.4.10.1
PHP version
8.3.13
Operating system and version
Ubuntu 24.04
Database type and version
mysql 8.0
Image driver and version
No response
Installed plugins and versions
What happened?
Description
When trying to get all structure elements from an array of elements, The
fillGapsInElementsis not returning all elements from the structure, it's depending on the sort order of the given elements.Example:
when passing in 2 elements into the function with the following structure:
The
lftvalue of the first element is117, the second14When passing the elements in this order the returned array is missing the
fietsen/racefietsenentry.When I would change the order of the passed in elements the
fietsen/racefietsenentry is returned as wellCraft CMS version
5.4.10.1
PHP version
8.3.13
Operating system and version
Ubuntu 24.04
Database type and version
mysql 8.0
Image driver and version
No response
Installed plugins and versions