Oops! WordPress broken, cannot redeclare
WordPress crashed – cannot redeclare
Beggar! A plug-in and/or function edit just broke the site. Normal service will resume in a minute!
… OK … this is not good :/
The fault, if you are curious is new and specific to one theme which previously worked fine and just fell over:
Fatal error: Cannot redeclare generate_post_image() (previously declared in /home/ackadia/public_html/ackadia.com/wp-content/themes/generate/functions.php:59) in /home/ackadia/public_html/ackadia.com/wp-content/themes/genesis/functions.php on line 66
It was pointing to line 138 (of 124 linesâ€¦) and undoing the edit didnâ€™t make any different, so I thought, beggar this and swapped it to Genesis while I fixed it. Or not, because it was still seeing the â€˜generate-boxâ€™ plug-in and wouldnâ€™t let me install any theme at all. Long story short, removed the theme and plug-in via ftp, downloaded a fresh copy of Generate, added theme â€“ and that fatal error is the result. Iâ€™ve tried a few others like Genesis and Education and they work fine, (though Iâ€™m still seeing the odd quirk).
A few minutes digging later
Sorted it, but Iâ€™ll leave this in should someone else run into it â€“ for some reason the edit seemed to have corrupted the parent framework. Using a default wp theme and deleting, re-installing the Genesis framework, then the theme fixed it.
(You can rename the offending theme too, the use a different one while you fix the issue. You do lose Widget settings swapping out themes and child themes, but they are easy enough to drag back.)
Just a shame about all the work I lost. No, wait, I didn’t, because I make backup’s of everything and use other backup strategies like Vaultpress. Paranoia for the win! If I was really paranoid I’d have tinkered on the trial site but where’s the fun in that? Having only a few minute to fix something is great for focusing your attention. It was only one or two lines of code, still, when I try again, I WILL use the test site instead!