Please or Register to create posts and topics.

Code outputs the noindex metatag

It looks like the last update has a code that outputs the noindex metatag.

My technician has commented it out temporarily, so that our content is indexed by google again.

Can you check if this is correct, from your point of view.

Hello @pstavrum

In the last update some measurements got included to ensure that inaccessible content is not getting indexed by search-engines. Please double-check for which content this occur on your website. Search-engines always see a website like a logged-out users. If logged-out users dont have access to your forum or certain topics, this content of course also does not get indexed.

All other content which is also accessible for guests should get indexed without any problems.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

@asgaros. The main problem is, according to my people, that Asgaros puts a meta-tag with noindex on all pages/posts in Wordpress for outlogged users, and not only on forum posts in Asgaros.

@pstavrum I checked it again and the noindex meta-tag is only generated for pages which contain the forum-shortcode. Can you provide a link to a page which contains the noindex-metatag on a non-forum page generated by Asgaros Forum so I can have a look?

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!
From my technician:
We have run some tests, and the metatag is added to all posts and pages as long as the user is not logged in.
Once you’re logged in with a administrator user, the metatag is gone.
We have checked several pages and posts which does not contain the forum shortcode, and can see in the source code that the metatag is added.
If I comment out the metatag in asgaros-forum/includes/forum-appearance.php:127, the metatag is gone all together.
I have uncommented line 127 now, so you should be able to see the metatag no matter which page or post you visit.

@pstavrum I see, this is very strange. I will try to debug this issue.

Can you please try the following for me:

  • Open the asgaros-forum/includes/forum-shortcodes.php file
  • Find the following code:
public function checkForShortcode($object = false) {
        $this->postObject = $object;
  • Replace it with the following:
public function checkForShortcode($object = false) {
        echo '### DEBUG ###';
        print_r('<pre>');
        var_dump($object);
        print_r('</pre>');
        $this->postObject = $object;
  • After applying the changes, open the non-forum-page you have linked in your post above

Can you post me the exact debug-output which should get generated somewhere on your site?

If you want you can also contact me via mail: developer (at) thomasbelser.net

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!