Hello,
In earlier versions of ZC, definition of 'ROBOTS_PAGES_TO_SKIP' was in 'meta_tags.php' file and looked like:
Code:
define('ROBOTS_PAGES_TO_SKIP','login,logoff,create_account,account,account_edit,account_history...
(Important: string with no spaces, etc)
Starting from v158 this definition is moved to 'extra_configures/robots_pages_to_skip.php' file and has formatted outlook:
Code:
/**
* list of pages that should not be indexed by robots
*/
define('ROBOTS_PAGES_TO_SKIP', '
account,
account_edit,
account_history,
account_history_info,
...
The problem is in spaces added - appropriate code in 'functions/html_output.php' (and also 'common/html_header.php') must now be modified from:
Code:
if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($page, explode(",", constant('ROBOTS_PAGES_TO_SKIP')))
to something like:
Code:
if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($page, explode(",", str_replace([" ", "\n"], ['', ''], ROBOTS_PAGES_TO_SKIP)))
otherwise it seems 'in_array' function won't be working correctly.
Sorry, if i understand something wrong...
Bookmarks