MainWP child activation failed due to error

Hi.

I recently encountered an error that is preventing MainWP from running on a specific child site. The plugin was working perfectly until recently. It may only be a correlation but I only noticed the issue after I tried to execute a snippet using the snippet extension.

The site became inaccessible so I assumed that it was MainWP related. I quickly deactivated the plugin through FTP and the site loaded immediately. I then deleted the old child plugin and installed/activated it from the repository. This time around, WP did not allow me to activate it due to the following error:

Parse error: syntax error, unexpected '<', expecting end of file in ..wp-content/plugins/mainwp-child/class/class-mainwp-utility.php(87) : eval()'d code on line 1

The site is running on the latest WP version of 5.7.2.

I tried to search the issue but looks like no one has reported this on the forums. Obvious conclusion is incompatibility however, because I noticed it after attempted to execute a snippet (Google analytics code), it could be associated with that.

Thanks

I think the code snippet you used has an error that broke the site. You could fix this by removing the snippet from the database. See Remove a Code Snippet From a Broken Site - MainWP Documentation (option 2).

2 Likes

@josklever ,

Thank you so much for the prompt reply. I guess I was correct to assume that it was snippet related. Sorry to your waste your time. I totally screwed up adding the snippet. Your solution was the answer!

Thanks again!

You’re welcome! :slight_smile: You can close this topic by selecting my answer as the solution, so others will see it’s solved as well.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.