Issue Bug Rejected

#76667getUpdateJS wrongly calls createVersionNumberedFilename

Franz Holzinger 06/16/16, 19:53 updated 06/24/16, 17:41

Description

I have discovered that the typo3_src-6.2.25/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php wrongly calls the method GeneralUtility::createVersionNumberedFilename in method getUpdateJS.

$GLOBALS['TSFE']->additionalHeaderData['JSincludeFormupdate'] = '<script type="text/javascript" src="' . GeneralUtility::createVersionNumberedFilename(($GLOBALS['TSFE']->absRefPrefix . 'typo3/js/jsfunc.updateform.js')) . '"></script>';

It should have been with the absRefPrefix outside of createVersionNumberedFilename.

$GLOBALS['TSFE']->additionalHeaderData['JSincludeFormupdate'] = '<script type="text/javascript" src="' . $GLOBALS['TSFE']->absRefPrefix . GeneralUtility::createVersionNumberedFilename('typo3/js/jsfunc.updateform.js') . '"></script>';

This is because absRefPrefix can contain the full domain name.

static public function createVersionNumberedFilename($file, $forceQueryString = FALSE) {
   $lookupFile = explode('?', $file);
   $path = self::resolveBackPath(self::dirname(PATH_thisScript) . '/' . $lookupFile[0]);

The lookup file cannot be found, if absRefPrefix has been passed inside the $file variable.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.