Bug #20022

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

Added by Dennis Schulz over 6 years ago. Updated about 5 years ago.

Status:Resolved Start date:2009-02-16
Priority:Should have Due date:
Assigned To:Chris topher % Done:

0%

Category:- Spent time: -
Target version:-
TYPO3 Version:4.2 Is Regression:
PHP Version:5.1 Sprint Focus:
Complexity:

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)


Related issues

related to Core - Bug #22701: Remove old_backend Closed 2010-05-23
duplicated by Core - Bug #21338: Menu in alt_main does not react to clicks Resolved 2009-10-22

History

#1 Updated by Lars Mathwig about 6 years ago

Thanks for the solution. It fixes my 4.2.8 with old backend

#2 Updated by Chris topher about 5 years ago

After the old BE was removed in #22701:

Resolved no change required.

Also available in: Atom PDF