My WordPress livesite says "An error has occurred. Please reload the page and try again" when I try to edit the sidebar widget text of a twentysixteen child theme. I copied the website to localhost and I did not receive the same error message (I could edit the text just fine). The error occurs with the livesite child theme even with only a "functions.php" file and a "style.css" file. I tried disabling all plugins but I received the same error.
The picture below shows me attempting to change the "Directories" name causing error.
My WordPress livesite says "An error has occurred. Please reload the page and try again" when I try to edit the sidebar widget text of a twentysixteen child theme. I copied the website to localhost and I did not receive the same error message (I could edit the text just fine). The error occurs with the livesite child theme even with only a "functions.php" file and a "style.css" file. I tried disabling all plugins but I received the same error.
The picture below shows me attempting to change the "Directories" name causing error.
Share Improve this question edited Mar 18, 2020 at 2:45 Antoine Alfawdaa asked Mar 18, 2020 at 1:54 Antoine AlfawdaaAntoine Alfawdaa 13 bronze badges1 Answer
Reset to default 0I fixed the issue. From error_log in public_html/wp-admin I found:
I looked some to see whether it was specific to my livesite, something like indexing, but the error was that I closed my functions.php with a "?>" and there may have been whitespace afterwards that was attempted to be sent which caused conflict. I erased the ending "?>" in functions.php for my child theme and I no longer get the error. I'm not currently completely sure why when I duplicated the livesite to localhost of why I did not receive an error in editing the localsite the same way but it's possible that the whitespace was removed.