Bug #25303
closedjs/iecompatibility.js inclusion triggers compressor bug
0%
Description
When the linkvalidator modfunc is shown via Web-Info the log is filled with:
Core: Error handler (BE): PHP Warning: filesize(): stat failed for /var/www/conet/htdocs/typo3/atibility.js in /var/www/conet/htdocs/typo3_src-4.5.2/t3lib/class.t3lib_compressor.php line 342
In linkvalidator the BACK_PATH is set correctly. It also adds 3 JS files that are correctly compressed.
The problem lies in the template lib. linkvalidator creates an instance of template and calls setModuleTemplate(). In this method, $this->loadJavascriptLib('js/iecompatibility.js') is called, which calls $this->pageRenderer->addJsFile($this->backPath . $lib);
BUT the backpath is set only in insertHeaderData() which is for FE only!
Can the loadJavascriptLib() call be removed from setModuleTemplate(). According to my debug out iecompatibility.js was already added to the JS list before. If not, is there a way to automatically detect the backPath if the method is called from BE? A third option would be to add a setBackPath() method which has to be called from each BE module that uses the template lib, but this is not so nice...
(issue imported from #M17918)