Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
miket
tagDiv Member

Hi Mesotu,

No, it’s not ok to use that code, since it is going to block CSS and JS, too:
https://yoast.com/dont-block-css-and-js-files/

The 500 error IS a big deal, since Google thinks there is something wrong with your server and does report it as a server issue. Repeatedly. Weird enough, out of 15-20 themes I’ve been using, Newsmag is the ONLY one that has the issue, so there goes the ‘inherent WordPress problem’ theory. Secondly, we can’t really blame it on Google crawling those folders, because Google does not really care who’s fault it is. It either sends you more traffic or less traffic, and those errors are one of the important factors how it decides that. So, let’s not forget that we create websites so they can be SEEN by as many people as possible. If there is an issue that prevents that, no matter who’s fault it is, we have failed in accomplishing our main goal.
I have not seen a solution, yet, that is not spread over 3-4 support tickets. I am considering changing the theme just to get rid of this one problem.

miket
tagDiv Member

I don’t think that a generic article is going to help me fix this error.

Please read the related tickets that I linked to in my original request (above):
“Chris S #192272
Sep 7, 2017 at 1:44 am
This happens when you update theme or main WordPress …

nothing to fix; normally you will have one of these, unless hacker slamming that directory. So, with one you just mark as ‘fixed’ and move on.

That should so be in the WP documentation — which they are finally going to redo (won’t be called ‘codex’ any more for 2018!). ?”

“Chris S #192418
Sep 7, 2017 at 7:09 pm
I think we did something on one site for that,
we made an index.php file that had a refresh header …

although I think we then instead did an htaccess file for the them folder,
and did 301 redirect for index.php to home page of site. Something like that.

Downside is you need to replace those each time theme is updated.

Or, just grimace when you do theme update and month later see that single entry in your search console. I usually just go “(sigh) … stupid Google…”

I mean, how stupid do you have to be in the data mining business to not auto-ignore /wp-content/themes/ for indexing ANYTHING? Duh.”

I have found a possible solution on other support forums:

Hi!

Yes, having read the Yoast article https://yoast.com/dont-block-your-css-and-js-files/ i’d suggest not blocking all theme resources, however i think index.php should not be read directly by crawlers (or visitors) because it will always result on a PHP error, you could try one of these two workarounds:

Redirect theme index.php to root (this will apply to all visitors), .htaccess code (you could extend this to child theme directories or plugins):

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /wp-content/themes/enfold/index\.php\ HTTP/
RewriteRule ^wp-content/themes/enfold/index\.php$ http://DOMAIN.com/ [R=301,L]
Or simply disallow only index.php in the theme folder, robots.txt code:

User-agent: *
Disallow: /wp-content/themes/enfold/index.php

Please advise.

  • This reply was modified 8 years by miket.
miket
tagDiv Member

Thanks for making me jump through hoops.

I deactivated the child theme. I deactivated all the plugins besides tagdiv plugins and Visual Composer. I cleared the browser cache and Cloudflare cache. I still get the error.

I have other work to do, so I cannot wait until you decide if you’re going to inspect the site or not and I will reactivate some of the inactive plugins. Now, please let me know if you need the WordPress credentials to take a look at it or kindly offer a refund so I can look somewhere else.

Thanks

Thanks.

miket
tagDiv Member

Actually, on posts such as https://survivalreport.org/resilience/ I get the following error:
Uncaught SyntaxError: Unexpected token : (index):10
The only active plugins are:

  • Contact Form 7
  • Tag Div Social Counter
  • Tag Div Speed Booster
  • WPBakery Visual Composer

WP Rocket is deactivated, browser cache cleared, Cloudflare cache cleared, DNS dlushed, post opened in incognito window.

Kindly let me know if you can offer support. I can’t screw around, if you don’t I’ll gladly buy another theme and try to forget this happened.

Cheers.

Viewing 4 posts - 1 through 4 (of 4 total)