Answer the question
In order to leave comments, you need to log in
What is the Bitrix error?
Hello!
What could be the errors. While I'm in the admin panel, everything is OK, as soon as I get out there are such problems - prntscr.com/j13ysz ? It was advised to check the line in the header:
yes it was not there, for its place were: $APPLICATION->ShowHead();
<? $APPLICATION->ShowHeadStrings(); ?>
<? $APPLICATION->ShowHeadScripts(); ?>
replaced - prntscr.com/j13zkb , but the result is still unsatisfactory: prntscr.com/j141bzAnswer the question
In order to leave comments, you need to log in
Try to add in the header: CJSCore::Init ();
If it doesn't help, then write in init
AddEventHandler("main", "OnEndBufferContent", "deleteKernelJs");
function deleteKernelJs(&$content) {
global $USER, $APPLICATION;
if((is_object($USER) && $USER->IsAuthorized()) || strpos($APPLICATION->GetCurDir(), "/bitrix/")!==false) return;
if($APPLICATION->GetProperty("save_kernel") == "Y") return;
$arPatternsToRemove = Array(
'/<sc ript.+?src=".+?kernel_main\/kernel_main\.js\?\d+"><\/sc ript\>/',
'/<sc ript.+?src=".+?bitrix\/js\/main\/core\/core[^"]+"><\/sc ript\>/',
'/<sc ript.+?>BX\.(setCSSList|setJSList)\(\[.+?\]\).*?<\/sc ript>/',
'/<sc ript.+?>if\(\!window\.BX\)window\.BX.+?<\/sc ript>/',
'/<sc ript[^>]+?>\(window\.BX\|\|top\.BX\)\.message[^<]+<\/sc ript>/',
);
$content = preg_replace($arPatternsToRemove, "", $content);
$content = preg_replace("/\n{2,}/", "\n\n", $content);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question