Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
No browser title and error when anonymous user try to access forum
Avatar
thrasher
Member
sp_UserOfflineSmall Offline
Apr 29, 2017 - 10:58 am

Hi,

I'm a new member and I'm setting up a forum for my website.

Right now I'm experiencing two major problems.

1) when an anonymous user try to access the forum, page fails loading

It's a very strange problem. As soon as you try to access the forum while you're not logged in, the page crashes. On Google Chrome the error is an odd "The browser runs out of memory". You can check it here: http://www.creepyvisions.it/forum/

Of course this kind of issue doesn't happen on any of the other pages of my website, only in the forum.

2) browser title

I read a lot of other topics and articles about it, and I tried some different routes with no luck. When you access the forum, in the browser it's shown the URL instead of the title. I tried a lot of different combinations in Forum -> Component -> SEO, but nothing changed. I use Yoast Seo. My theme uses the Yoast Seo specifics for every page and post on my website, but as soon as I go to the forum section, things go different.

Thanks a lot for your help!

Avatar
thrasher
Member
sp_UserOfflineSmall Offline
Apr 29, 2017 - 11:19 am

Ok, I think I managed to solve the issue related to the first point. I solved it by avoiding caching on the forum page and every sub-URL. So one is down, one to go 🙂 but the second one is giving me some serious headache.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 29, 2017 - 12:34 pm

This issue has come up before - (https://simple-press.com/suppo.....ook-issue/) - but sadly, that user never came back to us to offer what the solution was. Or even if it was fixed.

As I use a Mac and my browser has no title bar, perhaps you could visit his site to see if he resolved the issue. Then if so - it would be worth just working through the few things we asked him to try to see if we can push this a little further and get a definitive answer to the problem.

andy-signature.png
YELLOW
SWORDFISH
Avatar
thrasher
Member
sp_UserOfflineSmall Offline
Apr 29, 2017 - 1:23 pm

Unfortunately that site has the same problem, still now. When the page is loading, the browser title briefly appears, then it's changed in the URL.

In the meanwhile, these are my current SEO Simple:Press configurations, if it can somewhat help:

SEOoptions.JPGImage Enlarger

Avatar
thrasher
Member
sp_UserOfflineSmall Offline
Apr 29, 2017 - 1:36 pm

I performed the two checks that you asked the other user to do:

1) Disabling Yoast: it didn't solve the issue. The browser title was still the page URL

2) Setting a WP default theme: it worked!

So it looks like the issue is caused by the theme (and not just mine, but also the ones of other users experiencing the same problem). Now, even if I'm a tech guy, I'm definitely not a PHP guy neither a WordPress framework expert. I guess this could be related to the way the team manages the title in the header.php file, right?

In that case, this is the code:

<title><?php wp_title( '|', true, 'right' );?></title>

 

Any idea?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 29, 2017 - 3:12 pm

Quite a few themes try and do something clever with the browser title which is fine until they encounter a plugin that adds new urls to the mix. Then they do not know what to do of course. Sadly while there are some great theme authors, many seem to completely forget that WP can make use of plugins as well which DO need catering for.

So while you are correct, this is the WP function doing the work, in all probability they have used on the filters available to do their own thing as well.

To be frank, it is probably better to take this to the theme team and ask them how this can be properly dealt with. They really must have encountered this situation before.

andy-signature.png
YELLOW
SWORDFISH
Avatar
thrasher
Member
sp_UserOfflineSmall Offline
Apr 29, 2017 - 3:54 pm

I further broke down the issue.

Well, I saw that the theme author added a filter related to wp_title function. This is what the code looks like:

function it_wp_title( $title, $sep ) {
global $paged, $page;

if ( is_feed() ) return $title;

# add the site name.
$title .= get_bloginfo( 'name' );

# add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
$title = "$title $sep $site_description";

# add a page number if necessary.
if ( $paged >= 2 || $page >= 2 )
$title = "$title $sep " . sprintf( __( 'Page %s', IT_TEXTDOMAIN ), max( $paged, $page ) );

return $title;
}

I can't find anything else that is linked to the title management. Do you see something that rings some bells? Maybe thinking about how the plugin manages the page titles?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 29, 2017 - 4:50 pm

I do no see why it would resolve into a url. If you stop the filter running does it then behave? Seems worth doing as then your Yoast SEO should also behave properly as should the SP SEO settings...

andy-signature.png
YELLOW
SWORDFISH
Avatar
thrasher
Member
sp_UserOfflineSmall Offline
Apr 29, 2017 - 6:19 pm

I just tried to remove the filter.

Everything seems ok in posts and pages, but when I go to the forum...same problem! However, there's something new: now if I inspect HTML source code I see that thetag contains values, whereas before it was empty Nevertheless the browser title is still the URL.

 

Edit: I can add some further info. Actually, if I view the source code via browser, thetag is correctly populated. This means that the HTML generated by the server is fine. When I inspect the DOM (Chrome Developer Tools, for example), thetag is empty. This should clear the stage from the PHP files, right? It could be some JS that manipulates the DOM.

I disabled WP Rocket caching on the forum page, I created a page rule in CloudFlare, I purged all the caches but still no luck...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 30, 2017 - 3:31 am

Yes - that would be javascript. So that has to be coming from a third party component. any js with the WP theme that could be responsible? Might not be in an actual js file of course...

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620