View Issue Details

IDProjectCategoryView StatusLast Update
0006915OXID eShop (all versions)2.6. Administer orderspublic2024-06-05 10:36
Reporterberkmueller Assigned To 
Status resolvedResolutionfixed 
Product Version6.0.3 
Summary0006915: Inconsistency when multiple modules extend templates but don't use explicit sort order
DescriptionDue to a missing default sort order some inconsistencies (e.g. in admin's order list view) can happen where column headers do not match the values in the data rows because of a displacement.

The reason for this is that the default sort order for template blocks (see `\OxidEsales\EshopCommunity\Core\Module\ModuleTemplateBlockRepository::getBlocks()`) is
`order by oxpos asc, oxtheme asc, oxid asc` (
That means when two modules extend the same block but have the default oxpos (0), it depends on the generated OXID. Due to the fact that newly generated OXIDs are not lexicographically ordered,
it could be the case that for example module A comes first for extending a tables header in admin but module B is first for extending the data row template. This can lead to inconsistencies as
can also seen in the screenshots provided.

As a simple fix, just change
order by oxpos asc, oxtheme asc, oxid asc";
order by oxpos asc, oxtheme asc, oxmodule asc, oxid asc";
and the problem is solved.
Steps To Reproduce1.) Given the admin enables the modules fcPayOne and oePayPal (which both extend admin templates in the order list view (header and row templates))
2.) When an order was placed
3.) And a backend user goes to the admin order page
4.) Then the header and rows of the columns "payone", "payment type" and "shop payment status" do not match.
TagsAdmin, Admin Template, Module, Template Blocks
Attached Files
order-list-with-bug.png (14,198 bytes)   
order-list-with-bug.png (14,198 bytes)   
order-list-fixed.png (14,326 bytes)   
order-list-fixed.png (14,326 bytes)   
PHP VersionAll
Database VersionAll



2024-06-05 10:36

administrator   ~0016951

There is now a defined order in OXID 7 determined not by module id, but module order in the chain.
See for more info and on how to fine-tune it.