Archived topic
Unable to log in to my WordPress Admin when GP theme is enabled
4 replies · Started by Tahir Malik on July 14, 2020
I can't log in to Wordpress admin when GP theme is enabled. The frontend of the site is working fine. I get the following errors in my error_log file in cpanel
[14-Jul-2020 20:54:28 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home3/alltesto/public_html/wp-content/themes/generatepress/inc/structure/post-meta.php:1) in /home3/alltesto/public_html/wp-includes/pluggable.php on line 1284
[14-Jul-2020 20:55:09 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home3/alltesto/public_html/wp-content/themes/generatepress/inc/structure/post-meta.php:1) in /home3/alltesto/public_html/wp-includes/pluggable.php on line 1281
[14-Jul-2020 20:55:09 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home3/alltesto/public_html/wp-content/themes/generatepress/inc/structure/post-meta.php:1) in /home3/alltesto/public_html/wp-includes/pluggable.php on line 1284
[14-Jul-2020 21:05:14 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home3/alltesto/public_html/wp-content/themes/generatepress/inc/structure/post-meta.php:1) in /home3/alltesto/public_html/wp-includes/pluggable.php on line 1281
[14-Jul-2020 21:05:14 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home3/alltesto/public_html/wp-content/themes/generatepress/inc/structure/post-meta.php:1) in /home3/alltesto/public_html/wp-includes/pluggable.php on line 1284
[14-Jul-2020 21:06:54 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home3/alltesto/public_html/wp-content/themes/generatepress/inc/structure/post-meta.php:1) in /home3/alltesto/public_html/wp-includes/pluggable.php on line 1281
[14-Jul-2020 21:06:54 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home3/alltesto/public_html/wp-content/themes/generatepress/inc/structure/post-meta.php:1) in /home3/alltesto/public_html/wp-includes/pluggable.php on line 1284
I am using Dispatch theme that is available in GP's library. I had the hosting company switch the theme to the default one and wp admin started working fine afterwards.
I got an email from wordpress saying that the site is having issue with the theme.
Here are some additional details provided by the wordpress sanity service.
When seeking help with this issue, you may be asked for some of the following information:
WordPress version 5.4.2
Current theme: GeneratePress (version 2.4.2)
Current plugin: (version )
PHP version 7.0.33
Error Details
=============
An error of type E_PARSE was caused in line 401 of the file /home3/alltesto/public_html/wp-content/themes/generatepress/inc/structure/navigation.php. Error message: syntax error, unexpected '
Hi there,
has there been any modifications made to the parent theme files or are there any custom functions or hooks that have been added?
No change in core files whatsoever. Site was working fine.
The only hook added is for the breadcrumb that has Yoast SEO's shortcode in it and "Execute Shortcode" is checked.
Also, I restored the site from a backup and it started working fine. Tried logging in a few times and it worked flawlessly. A couple hours later I got the email from wordpress saying there's a problem with the theme, GeneratePress. Logged in again as same issue is there.
Does this theme run any cron jobs that could be causing this?
Can you check that the /themes/generatepress/inc/structure/post-meta.php template in your theme matches this:
https://github.com/tomusborne/generatepress/blob/master/inc/structure/post-meta.php