Notifications
Clear all

wpForo 1.x.x Error 2253 Staging Issue

12 Posts
5 Users
1 Likes
4,397 Views
mitchcan
Posts: 23
Topic starter
(@mitchcan)
Eminent Member
Joined: 4 years ago

Hello,

I'm trying to test wpforo for possible implementation to replace bbp. In testing on the staging site, I get the above referenced error code. In talking to host support, I get the following reply.

It appears that the plugin is not compatible and it does not work correctly with our staging environment. Let me explain - when creating a new staging site, the tool does not update URLs in its database. The new site would keep using the same home and siteurl. There are apache modules responsible to redirect the requests and the traffic to (site), such as mod_substitute and mod_headers.

After Vasil added the custom define rules to specify new home and siteurl values, the plugin started working correctly. However, these rules got in conflict with the staging environment and the home and admin pages of the site stopped working. This is what happens in most of the cases when you make any changes in home and siteurl values of a staging site.

They said I should see if you had a possible resolution for this so I could test the plugin.

Thanks.

Topic Tags
11 Replies
Robert
Posts: 9269
Admin
(@robert)
Support Team
Joined: 6 years ago

You should set correct URLs for the staging website. Navigate to Dashboard > Settings > General admin page and put the staging subdomain to the settings:

Then navigate to Dashboard > Forums > Settings admin page and click on Update Options button to reset wpForo Base URL.

Then navigate to Dashboard > Forums > Dashboard admin page and click on [Delete all caches] button.

Reply
mitchcan
Posts: 23
Topic starter
(@mitchcan)
Eminent Member
Joined: 4 years ago

Thanks, but it is my understanding that the way that SiteGround constructs staging that will not work. I will double check with them. I guess worst case scenario I have a non-staging dev site that I could test on, but it is a shared server vs. managed wp cloud hosting, so I'm not sure if it will give wpforo a fair test for performance.

Reply
Robert
Posts: 9269
Admin
(@robert)
Support Team
Joined: 6 years ago

Then you can disable this error. Open this file:

/wp-content/plugins/wpforo/wpf-includes/functions.php

Find this part of code:

if( $mode == 'ref' || $mode == 'full'){
if( !isset($_SERVER['HTTP_REFERER']) || !$_SERVER['HTTP_REFERER'] ) {
exit('Error 2252 | Please contact to forum admin.');
}
$ref = $_SERVER['HTTP_REFERER'];
$url = get_bloginfo('url');
$ref_domain = trim(strtolower(parse_url($ref, PHP_URL_HOST)));
$web_domain = trim(strtolower(parse_url($url, PHP_URL_HOST)));
if( $ref_domain != $web_domain ){
  exit('Error 2253 | Please contact to forum admin.');
}
}

Add "//" comment on front of the red marked lines.

if( $mode == 'ref' || $mode == 'full'){
if( !isset($_SERVER['HTTP_REFERER']) || !$_SERVER['HTTP_REFERER'] ) {
//exit('Error 2252 | Please contact to forum admin.');
}
$ref = $_SERVER['HTTP_REFERER'];
$url = get_bloginfo('url');
$ref_domain = trim(strtolower(parse_url($ref, PHP_URL_HOST)));
$web_domain = trim(strtolower(parse_url($url, PHP_URL_HOST)));
if( $ref_domain != $web_domain ){
//exit('Error 2253 | Please contact to forum admin.');
}
}
Reply
mitchcan
Posts: 23
Topic starter
(@mitchcan)
Eminent Member
Joined: 4 years ago

Hey Robert,

This worked, thanks!

I'm looking forward to testing wpForo. I found out about you guys over on the PeepSo forum. Hoping to see if they can place nice together. 

Have a great day.

Reply
Page 1 / 3
Share: