View Issue Details

IDProjectCategoryView StatusLast Update
0006915OXID eShop (all versions)2.6. Administer orderspublic2018-10-26 17:35
Status acknowledgedResolutionopen 
Product Version6.0.3 
Target VersionFixed in Version 
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
PHP VersionAll
MySQL VersionAll



2018-10-26 15:57


order-list-fixed.png (14,326 bytes)
order-list-fixed.png (14,326 bytes)
order-list-with-bug.png (14,198 bytes)
order-list-with-bug.png (14,198 bytes)