May 26, 2019 at 16:16 UTC - Views: 31 #59787
What’s going on here? A newly migrated site (artwinefusion.com) just stopped working properly, apparently reverted to the old site, and sent this message to my admin inbox.
In this case, WordPress caught an error with your theme, Weaver Xtreme.
An error of type E_PARSE was caused in line 1 of the file /home4/northshorecf/public_html/awf/wp-content/themes/weaver-xtreme/admin/admin-core/admin-page-posts-meta-boxes.php. Error message: syntax error, unexpected ‘if’ (T_IF)
Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
If your site appears broken and you can’t access your dashboard normally, WordPress now has a special “recovery mode”. This lets you safely login to your dashboard and investigate further.
However, when I try that I get “Recovery Mode not initialized”.May 26, 2019 at 16:57 UTC - Views: 30 #59789
No Problem here with WP 5.2.1 so @weaver may have more input.
make sure you have not been hacked, and eventually, Save and download settings, Switch to a different theme, delete Xtreme and Weaver plugins, and reinstall them.May 26, 2019 at 17:23 UTC - Views: 31 #59790
I just got into the new migrated site and am in admin mode, but when I try to go to the Dashboard I get:
<b>Parse error</b>: syntax error, unexpected ‘if’ (T_IF) in <b>/home4/northshorecf/public_html/awf/wp-content/themes/weaver-xtreme/admin/admin-core/admin-page-posts-meta-boxes.php</b> on line <b>1</b>
The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.
Looks like more of the same problem.May 26, 2019 at 17:24 UTC - Views: 29 #59791
Since I can’t get to the Dashboard, how do I change the theme?
I understand that I need to change the database template from weaver-xtreme to another theme that’s in the wp-content>>themes folder.
But I also see in the database that stylesheet is set to weaverx-child. Does that also need to be changed, and if so what should it be changed to?May 26, 2019 at 17:33 UTC - Views: 25 #59792
If you can access the files in Cpanel, you can rename the weaver theme folder, that should force it to revert to something else.
Then if all works out and you can reinstall fresh of everything, you can delete the renamed folder
But before reinstalling, you may want to check for hacking with your Host.
Are you using a security plugin like Wordfence?May 26, 2019 at 17:40 UTC - Views: 23 #59793
I tried changing the theme name but then it said I needed to install weaver-xtreme, probably because the stylesheet calls for that theme. Can I just blank out the stylesheet weaverx-child?
Yes, I’m using Wordfence.May 26, 2019 at 17:44 UTC - Views: 20 #59794
BTW – I had to FTP transfer the files to the new host. It indicated that all files transferred, but it could be that there was a glitch or a duplicate filename overwrite instead of a hack?May 26, 2019 at 18:03 UTC - Views: 19 #59795
I’m able to get into the Dashboard after changing the database template from weaver-xtreme and removing the stylesheet weaverx-child entry. Thanks for the help.May 26, 2019 at 23:20 UTC - Views: 16 #59796
The error message you got is very difficult to explain.
It is essentialy impossible to get an error on line 1 of any php file as it is almost always either a blank or ‘<?php’ – notihing that should ever trigger an “if” error.
This would indicate to me that somehow or another, the files have been corrupted. @scrambler‘s suggesting to re-install the theme would make the most sense.May 27, 2019 at 05:57 UTC - Views: 19 #59797
After I was able to get back into the Dashboard (changed template and blanked stylesheet in the database) I was able to reinstall weaver-xtreme and make weaverx-child the active theme. The homepage looked great (after setting the proper menu to primary), but everything else was ‘Page Not Found’. Reset Permalinks and everything was finally good.
Thanks for your advice. The file probably somehow got corrupted in the FTP transfer. Disabling the theme (and child theme) did the trick.
Thanks again, LloydMay 27, 2019 at 14:53 UTC - Views: 12 #59798
When I recently transferred to a new hosting company, I found it important to reset permalinks, too. That has to do with the .htacces file, which is often cleared when setting up a new directory for a site.
You must be logged in to reply to this topic.