Google Report an error on theme

Posted in: Newsmag
Post count: 45

Hello and Happy new Year!!!

Google give me error on the follow URL – Googlebot couldn’t access the contents of this URL because the server had an internal error when trying to process the request

http://www.example.com/wp-content/themes/Newsmag/

It seems this page should be redirects on 403 forbidden right ?

For http://www.example.com/wp-content/themes/Newsmag/ we noticed that following errors in log files:

2015/01/02 01:18:13 [error] 17438#0: *149247786 FastCGI sent in stderr: “PHP message: PHP Fatal error: Call to undefined function get_header() in /var/www/example.com/htdocs/wp-content/themes/Newsmag/index.php on line 6
PHP message: PHP Stack trace:
PHP message: PHP 1. {main}() /var/www/example.com/htdocs/wp-content/themes/Newsmag/index.php:0”, client: 182.72.47.66, server: example.com, request: “GET /wp-content/themes/Newsmag/ HTTP/1.1”, host: “www.example.com”

Could you please check this issue ?

Post count: 6600

Hi,

This happens because you try to access the theme’s index.php file directly and this is caused by the theme’s inability to locate the WordPress get_header function as it dose not passed trough WordPress when the request is made and in that case the function doesn’t “exist”.
You can read more about this and also have a solution for this here: http://ardamis.com/2011/06/02/fix-for-php-fatal-error-get_header-in-wordpress/

Thanks

Post count: 45

Hi,

I would like to explain me the fix and how can implement in to my Newsmag theme.
I like to trust here only the theme authors since is your code.

Thanks in advance.

Post count: 9544

Not a theme issue; it’s because something tried to access the theme folder directly which nobody should do. Just like somebody trying to access /wp-includes/ or similar.

Normally you will get a 500 error or similar when changing / updating theme, one time. This is normal and not a flaw/bug; but how WordPress works and Google accessing something at same time update is being done, or if somebody trying to hack your site by testing the theme folder for vulnerability.

If you continue to get the error over and over beyond the normal happening from theme switch, you need to modify your WordPress install as noted here – it’s *not* a theme issue:
https://ardamis.com/2011/06/02/fix-for-php-fatal-error-get_header-in-wordpress/

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newsmag’ is closed to new topics and replies.