View Issue Details

IDProjectCategoryView StatusLast Update
0005103OXID eShop (all versions)2.3. Extensions (modules, themes)public2015-12-01 12:32
Status acknowledgedResolutionopen 
Product Version4.7.5 / 5.0.5 
Target VersionFixed in Version 
Summary0005103: Metadata -> blocks -> file do not handle correctly if paths do not start with '/'
DescriptionCurrently only possible to write path to your block template with slash in front. That is wrong, as given path is relative, not absolute. Shop should handle bot way.
Shop tries to fallback for old versions in oxutilsview::_getTemplateBlock. Maybe would be better first to check if file exist and do fallback only if file do not exist.

Move those lines after check if file exist.

        // for < 4.6 modules, since 4.7/5.0 insert in oxtplblocks the full file name and path
        if ( basename($sFile) == $sFile ) {
            $sFile = "out/blocks/$sFile";
Steps To ReproduceCreate module with one block template. Add some information in block template. This information would not bee visible in footer.
    'blocks' => array(
        array('template'=>'layout/footer.tpl', 'block'=>'footer_main', 'file'=>'extend_block.tpl'),

Fix metadata, renew module information in database. Now information from block template is visible.
    'blocks' => array(
        array('template'=>'layout/footer.tpl', 'block'=>'footer_main', 'file'=>'/extend_block.tpl'),
TagsNo tags attached.
PHP Versionany
Database Versionany


There are no notes attached to this issue.