Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

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

Closed
liayn opened this issue May 5, 2015 · 6 comments
Closed

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

liayn opened this issue May 5, 2015 · 6 comments

Comments

@liayn
Copy link

liayn commented May 5, 2015

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

@daniellienert
Copy link
Member

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

@liayn
Copy link
Author

liayn commented Feb 11, 2016

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
Copy link

I can confirm this issue.

@DavidBruchmann
Copy link

DavidBruchmann commented Jul 23, 2017

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
Copy link

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
Copy link

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

@liayn liayn closed this as completed Jun 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants