View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006631 | OXID eShop (all versions) | 2.3. Extensions (modules, themes) | public | 2017-05-05 20:15 | 2024-04-12 19:20 |
Reporter | gerldental | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | acknowledged | Resolution | open | ||
Product Version | 4.10.4 / 5.3.4 | ||||
Summary | 0006631: Problem by loading font-awesome.min.css in modul Visual CMS in subshop | ||||
Description | Browser can't load font if requested URL has other domain as current in backend, and domain in backend is always from main shop. In console this ends up with error "Bad URI or cross-site access not allowed". As result no icons are visible. That's makes difficult to work with modul. | ||||
Steps To Reproduce | Say, your main shop is configured for www.myshop.com Change to subshop with differen domain (f.e. www.mysubshop.com) and activate Modul Visual CMS (your backend URL in browser address field remains www.myshop.com !) font-awesome.min.css trying to load font through @font-face, but browser not allowing to do that | ||||
Additional Information | The reason, while it happens: in modules/ddoe/visualcms/out/src/css/ddoevisualcmsadmin_ui.tpl URL for font-awesome.min.css geberated by [{oxstyle include=$oViewConf->getModuleUrl('ddoevisualcms','out/src/css/font-awesome.min.css')}] $oViewConf->getModuleUrl() generates it from www.mysubshop.com, not from main shop f.e. http://www.mysubshop.com/modules/ddoe/visualcms/out/src/css/font-awesome.min.css Workaround would be in this case to use relative URL, like href="/modules/ddoe/visualcms/out/src/css/font-awesome.min.css" ( without domain ) I didn't find any function in Oxid thats generates such URL for modul-ressources, but its relativ simple to make one ( expands oxviewconfig ) public function getModuleRessourceRelativePath($sModuleId, $sFile = '') { $sUrl = str_replace( rtrim($this->getConfig()->getConfigParam('sShopDir'), '/'), '', $this->getModulePath($sModuleId) ); return $sUrl . $sFile; } and then use it in template ddoevisualcmsadmin_ui.tpl like: <link href="[{$oViewConf->getModuleRessourceRelativePath('ddoevisualcms','out/src/css/font-awesome.min.css')}]" rel='stylesheet' type='text/css'> | ||||
Tags | No tags attached. | ||||
Theme | All | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||