T
T
taamminen2022-02-15 06:54:23
1C-Bitrix
taamminen, 2022-02-15 06:54:23

Why is meta robots not showing up in any way?

I add the meta name="robots" tag to header.php after the call , however, the function does not work before it either:<?$APPLICATION->ShowHead();?>

$APPLICATION->SetPageProperty("robots", "noindex, follow");


This tag does not appear on the page. In the ShowHead() function, the code is as follows:

echo '<meta http-equiv="Content-Type" content="text/html; charset='.LANG_CHARSET.'"'.($bXhtmlStyle? ' /':'').'>'."\n";
$this->ShowMeta("robots", false, $bXhtmlStyle);
$this->ShowMeta("keywords", false, $bXhtmlStyle);
$this->ShowMeta("description", false, $bXhtmlStyle);
$this->ShowLink("canonical", null, $bXhtmlStyle);
$this->ShowCSS(true, $bXhtmlStyle);
$this->ShowHeadStrings();
$this->ShowHeadScripts();


I tried editing ShowHead(), displaying robots via echo, but that didn't change anything either.
The same canonical that I specify in the same header.php is rendered without issue.
Adding a tag via echo or html to header.php didn't work either.

What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Shevchenko, 2022-02-15
@taamminen

Perhaps there is an OnEndBufferContent event handler that overwrites robots. You need to look at the code, look for a handler, or look at the b_module_to_module table, a handler can also be added there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question