View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007183 | OXID eShop B2B Edition | B2B edition - sub | public | 2020-10-15 16:41 | 2021-07-29 13:31 |
Reporter | mprokopov | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | open | ||
Summary | 0007183: OxidEsales\EshopCommunity\Core\Config->getResourcePath doesn't work for modules | ||||
Description | JavascriptRegistrator.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 Reproduce | 1. 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. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
|
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. |
|
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 - |