@josklever Thank you for your input. As a non-developer, I totally understand what you are saying. That being said, rolling back is not always possible. If the script sends emails, for instance, when it’s sent, it is sent. Also whatever action was completed between the installation and the rollback will be lost. That could be a huge issue.
@bojan Thank you for validating.
As I was unsure about the code status, I took a tool to compare the code between the current production version and the new version you posted here. In general, when I see “can you please try this?”… what I really read is “I haven’t fully tested, can you do it for me?”. This is not targeted to you as it seems you are not the programmer here.
Usually, when there is a bug, it needs to reproduced at will to be fixed. I provided everything you (MainWP) needed to do that. So the answer could’ve been : “we have officially released a new version that fixes the issue, please update your plugin”.
Unfortunately, that is not what I got…
Just by looking at the code, I can certify that this code was never successuflly tested. See this new code from the provided ZIP file:
The red arrow points to a column that does not exist anywhere in the database. I don’t even have to install the plugin to know for sure this won’t work.
And as the get_results()
function is not handled properly in your code, the site does not crash but this function is useless.
But as you asked to try it, I took an hour to evaluate the code, create a DEV, create fake websites and upgrade the plugin. Then, I went to the Settings and clicked on “Save” as asked.
My debug.log is filled with SQL errors as expected:
Conclusion : whoever did this code never tested it successfully. It does not matter how many websites you have or if you use websites containing “www.” or “/”. It just doesn’t run.
I’m pretty sad and frustrated about the situation as I took probably 3 hours in total to report, investigate, test and write all this.
Note : English is not my first language. Nothing in this comment is intended to hurt or insult.