Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong jQueryPath in Backend #17

Closed
paintsmultimedia opened this issue Feb 27, 2017 · 5 comments · May be fixed by #18 or #19
Closed

Wrong jQueryPath in Backend #17

paintsmultimedia opened this issue Feb 27, 2017 · 5 comments · May be fixed by #18 or #19

Comments

@paintsmultimedia
Copy link

Hi,

when saving a content-element in backend. jQuery will be loaded from wrong url. There is a duplicate typo3 in path. (eg: https://test.domain.local/typo3/typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery/jquery-2.1.4.min.js)

I searched in the sourcecode and found, that generating GLOBALS['TSFE'] in function initFrontend in Class Mittwald\Varnishcache\Service\FrontendUrlGenerator causes this.

Why is this nessesary?

I commented it out and this solves my problem:
`

   $GLOBALS['TSFE'] = GeneralUtility::makeInstance(
            'TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController',
            $GLOBALS['TYPO3_CONF_VARS'],
            $uid,
            0
    );
    $GLOBALS['TSFE']->connectToDB();
    $GLOBALS['TSFE']->initFEuser();
    $GLOBALS['TSFE']->determineId();
    $GLOBALS['TSFE']->initTemplate();
    $GLOBALS['TSFE']->getConfigArray();

`

Regards
Heiko

@paintsmultimedia
Copy link
Author

I digged a little bit deeper into this.
The TypoScriptFrontendController is nessesary, but creating it will fail in the part $GLOBALS['TSFE']->determineId(); if a page is of type folder (254) or menu separator (199).

If I change content on a page the clearCachePostProc fills the pageIdArray with all pages which are on the same level as the page i worked on.
Therefore the script (Mittwald\Varnishcache\Hooks\Cache::clearCachePostProc) iterates over all these IDs it could happen, that there is a page of type folder or seperator.

I think there should be a check if the pid is a valid id for frontend display before initializing the TypoScriptFrontendController.

@pstranghoener
Copy link
Member

Hey @paintsmultimedia

feel free to make an pull request for that ;)

Best Regards Philipp

@paintsmultimedia
Copy link
Author

Do you have any hints why travis failed with my pull request?

@kai-plusb
Copy link

the Frontend sets the backPath in the PageRenderer to "typo3/" whereas in the Backend, the backPath should be NULL. Added my suggestion to a new pull request.

@derhansen
Copy link
Contributor

Closing issue, since it is not relevant to recent versions and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants