View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005103 | OXID eShop (all versions) | 2.3. Extensions (modules, themes) | public | 2013-05-05 16:56 | 2023-11-20 10:40 |
Reporter | saulius.stasiukaitis | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 4.7.5 / 5.0.5 | ||||
Summary | 0005103: Metadata -> blocks -> file do not handle correctly if paths do not start with '/' | ||||
Description | Currently 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 Reproduce | Create 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'), ) | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
Even if this would still be the case, it would be irrelevant since twig now handles the template override. See https://docs.oxid-esales.com/developer/en/7.0/development/modules_components_themes/module/using_twig_in_module_templates.html on how to do it. |