Support Forum

No browser title and error when anonymous user try to access forum

TH thrasher
thrasher
Member

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!

14 Answers

New Answer

TH thrasher
thrasher
Member

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.

YS Yellow Swordfish
Yellow Swordfish
Member

This issue has come up before – (https://simple-press.com/support-forum/sp5-general-topics/page-title-not-showingfacebook-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.

TH thrasher
thrasher
Member

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.JPG
TH thrasher
thrasher
Member

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?

YS Yellow Swordfish
Yellow Swordfish
Member

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.

TH thrasher
thrasher
Member

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?

YS Yellow Swordfish
Yellow Swordfish
Member

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…

TH thrasher
thrasher
Member

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…

YS Yellow Swordfish
Yellow Swordfish
Member

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…

TH thrasher
thrasher
Member

This is really driving me mad. confused

If I analyze the forum page with Google, I get the title correctly set. And also, when I write the URL in the browser, it correctly gets the page title and shows it.

The only issue that I’m still not able to detect and solve is the browser title. I’m quite sure that Google indexing will be just fine, but I want the browser title to show correctly too. I tried to have a look to the JS files of the WP theme, but I didn’t find anything that seems title related in any way.

Edit: another odd fact: while I was checking the forum on the mobile emulator via browser, the title looked correctly set! However, turning back to the desktop view and refreshing, the title disappeared again.

YS Yellow Swordfish
Yellow Swordfish
Member

I seem to remember that you said with the WP default theme all was well so perhaps it is time to throw in the towel and have a chat with the theme authors… They should be able to point to the right place and explain what is happening…

TH thrasher
thrasher
Member

Yeah, of course, but what’s stopping me is that I should buy an extension of supporto from the theme’s author just to get this answer. 50 bucks for a question is a bit too much, so I’ll try to investigate further even if I have very few ideas at the moment.

TH thrasher
thrasher
Member

I was left with no remaining ideas about how to solve the title issue, so I ended up requesting support to the theme creator. I’ll update the topic as soon as I have some further info.

I decided to go for the support because I found some further integration problems when I activated some plugins. I’ll double check it with the theme creator and with you in the appropriate section.

YS Yellow Swordfish
Yellow Swordfish
Member

Please do keep us updated. Most curious to know the answer.