Posts: 6
Threads: 2
Joined: Sep 2011
Hi,
i have a Problem, after Upgrade from 2.4 of 2.5 have a error or a Message on Adminpage:
"The referrer has external origin.
You have arrived at this page from outside of the admin panel.
Please access this page through the menu above."
the upgrade have on localhost installed, on live system have the same error.
Posts: 2,890
Threads: 59
Joined: Jun 2010
Hi,
Do you get that message even when accessing the pages using the menu?
If so, open /commentics/admin/index.php and find this section (line 350):
PHP Code:
<?php
/* Check Referrer */
if (cmtx_setting('check_referrer')) {
if (isset($_SERVER['HTTP_REFERER'])) { //if referrer available
$referrer = cmtx_url_decode($_SERVER['HTTP_REFERER']); //get referrer
$domain = cmtx_url_decode(cmtx_setting('site_domain')); //get domain
if (!stristr($referrer, $domain)) { //if referrer does not contain domain
?>
<span class='negative'>The referrer has external origin.</span>
<p />
You have arrived at this page from outside of the admin panel.
<p />
Please access this page through the menu above.
<?php
die();
}
}
}
Then comment it out like this:
PHP Code:
<?php
/* Check Referrer */
/*
if (cmtx_setting('check_referrer')) {
if (isset($_SERVER['HTTP_REFERER'])) { //if referrer available
$referrer = cmtx_url_decode($_SERVER['HTTP_REFERER']); //get referrer
$domain = cmtx_url_decode(cmtx_setting('site_domain')); //get domain
if (!stristr($referrer, $domain)) { //if referrer does not contain domain
?>
<span class='negative'>The referrer has external origin.</span>
<p />
You have arrived at this page from outside of the admin panel.
<p />
Please access this page through the menu above.
<?php
die();
}
}
}
*/
You should be able to navigate the admin panel now. Then go to Settings -> System and make sure that the 'Site Domain' setting is correct. It should look similar to this: commentics.org
If it was incorrect and you corrected it, you should now be able to uncomment the previous code.