View Issue Details

IDProjectCategoryView StatusLast Update
0007183OXID eShop B2B EditionB2B edition - subpublic2021-07-29 13:31
Reportermprokopov Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionopen 
Summary0007183: OxidEsales\EshopCommunity\Core\Config->getResourcePath doesn't work for modules
DescriptionJavascriptRegistrator.php contains a reference to Config->getResourcePath to get a path for the JS/CSS resource and append file timestamp to the query string.

getResourcePath uses internal object variable _sResourceDir and this works only for the resources in the shop theme, but not for the module resources.

This leads to serving stalled JS/CSS resources even if new JS/CSS is in place.
Steps To Reproduce1. Create module JS file.
2. Call it from the template [{oxscript include=$oViewConf->getModulePath('mymodule','src/js/script.js') priority=10}]
3. The script.js is not included in the page render.

Expected behavior: browser network tab should contain the downloaded resource script.js with query string automatically added.
TagsNo tags attached.
Attached Files

Activities

QA

2020-10-19 13:35

administrator   ~0013331

So this is not a B2B specific but an OXID eShop bug. Therefore the project "OXID eShop B2B Edition" is wrong here.
Please enter the bug in the Project "OXID eShop (All versions), so that the bug here can be closed.
Thank you for your understanding.

QA

2021-07-29 13:31

administrator   ~0013469

You can use the following template snippet to include a JS file in a module, for example:
    [ { oxscript include=$oViewConf->getModuleUrl('mymodule','src/js/script.js') }]
In principle, you get the entire path of the file with the above call, including checking whether the file exists at all.

As mentioned this is not a B2B specific but an OXID eShop bug. Therefore the project "OXID eShop B2B Edition" is wrong here.
Please enter the bug in the Project "OXID eShop (All versions). This bug will be closed.
Tnx for your understanding.

- es -