punktDe / pt_extbase

Tools for Extbase Development
https://punkt.de
24 stars 15 forks source link

Backend.css can't be loaded if TYPO3 runs in subdirectory #14

Closed liayn closed 4 years ago

liayn commented 9 years ago

siteurl: http://example.com/master/ requested url: http://example.com/typo3conf/ext/pt_extbase/Resources/Public/CSS/Backend.css

daniellienert commented 8 years ago

Does this issue still exists? Can you give me some more details?

liayn commented 8 years ago

Yes it does. Simply open the BE and check your browser's console - network panel - and see the 404 response. As denoted above, the instance runs in a subfolder of the webroot, but the CSS is included from webroot, which is wrong.

DavidBruchmann commented 7 years ago

I can confirm this issue.

DavidBruchmann commented 7 years ago

Actually I've another problem with it, it tries ot load:

http://domain.com/typo3/typo3conf/ext/pt_extbase/Resources/Public/CSS/Backend.css

The domain is running in the main-directory and not in a sub-directory like in the complaint of @liayn .

DavidBruchmann commented 7 years ago

Like this in ext_tables.php it works:

// Custom CSS include
if (TYPO3_MODE=="BE") {
    $extRelPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('pt_extbase');
    $TBE_STYLES['inDocStyles_TBEstyle'] .= '@import "'.$extRelPath.'Resources/Public/CSS/Backend.css";';
}
DavidBruchmann commented 6 years ago

Amazing, my old comment is still usable, good hint, David 😀