Tamara and I have a self-hosted WordPress site where we sell greeting cards.
The e-commerce on the site is handled by a plugin named WooCommerce, that you may have heard of.
Recently I had an issue with an additional plugin used to make bundles of products.
It is built on top of WooCommerce and it is an official WooCommerce plugin but it is not built by the WooCommerce team themselves.
It is built by a third party team of three developers who go under the name of Somewhere Warm.
They are based in Greece, so when I raised the issue at WooCommerce I was directed to the developers to help me.
We worked to isolate the issue and eventually tracked it down to a permissions issue in the database that for some reason must have happened when I first added the plugin and it was talking to the database.
This is what Jason at Somewhere Warm said:
We had an internal discussion about this issue with our lead developer and it turns out that in the past, we’ve seen this caused by incorrect database access permissions: If thewp_woocommerce_bundled_itemmeta and wp_woocommerce_bundled_items tables don’t exist in your database, then this usually indicates that the DB user in your wp-config.php file doesn’t have the required permissions to create new tables.
In the end I had to delete some permission keys (they showed me how) and it’s fixed now and everything is running smoothly.
Why Did It Happen
The database user (that’s me) has full permissions, so there’s no reason that the permissions issue occurred. So why did it?
Anyone who has been running a website that involves a database (as WordPress does) will have seen the message ‘Error Establishing a Database Connection’ when the code is unable to speak to the database in the back end.
So maybe there was a temporary glitch when the connection was broken just when I was uploading the code.
Whatever the reason, how was I going to solve it? As it turned out, the developer was able to pinpoint a possible issue, and that worked.
If not though, what would I have done?
I have to be thankful that I have had no issues with WooCommerce in the time I have been using it, and luckily, the issue here was easily solved.
It made me think though that one of the issues that you get when running a website is that when things don’t work as you expect you can’t just complain to someone else and expect them to fix it.
If someone else is running the show then you can complain to them. When you build it yourself, you have to figure it out yourself.
Code is often built on libraries of more specific code. Over time it becomes like the Tower of Babel built on foundations that become increasingly shaky, endangering the structure above.
In the case of WordPress and WooCommerce I have added other plugins. Perhaps they were in conflict with this one?
I have added snippets of php code. Perhaps they were in conflict with this plugin?
As I’ve explained – it was a permissions issue and it was easy to correct. But if it had not been that, then what?
Great fixing on your part, and a well-written explanation here. Thanks, David 🙂
Thanks. I liken running a website to standing on a dormant volcano…
LikeLiked by 1 person