Issue Bug Closed

#20022old/classic BE --> top.rawurlencodeAndRemoveSiteUrl is not a function

Dennis Schulz 02/16/09, 11:00 updated 10/02/18, 12:27

Description

If running the old Backend, you are not able to select the modules from the WEB Category (WEB->Page for example).
If you click on “Page” it is producing a JavaScript error Message:

“top.rawurlencodeAndRemoveSiteUrl is not a function”

Solution:
I figured out, the function is missing in the old BE javascript code.
If I add the code to the alt_main.php file it is working again.

############

$this->mainJScode=‘
…..
##########

/**
    * Function to similar to PHPs  rawurlencode() which removes TYPO3_SITE_URL;
*/
   function rawurlencodeAndRemoveSiteUrl(str)    {    //
var siteUrl = “’ . t3lib_div::getIndpEnv(‘TYPO3_SITE_URL’) . ‘”;
return rawurlencode(str_replace(siteUrl, \’\’, str));
}
…..

(issue imported from #M10445)

Reviews 0

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