Location issue after re-installing plugin
-
We had a problem with the My Calendar plugin (one for another day) that was resolved by uninstalling the plugin with the delete database and settings options set. This deleted all the locations so I set about adding the 10 or so locations back but hit a bit of showstopper. I added a location called “Bridgend Centre” which ended up with ID #11. However, when this location was used against a new event, it displayed the location as “Poachers Inn”.
Now this confused me as I hadn’t re-added Poachers Inn as a location. It used to be in there but isn’t needed anymore so I hadn’t re-added it. So where was it getting this text from?? I dumped the SQL database into text and did a search – yes, there were “echos” of the Poachers Inn in the database. Not done a full list but places like wp_options and wp_postmeta.
I’m not a WP internals specialist but I’m guessing that these are cache entries of HTML fragments to speed things up, i.e. when the Poachers entry was added, the HTML for the address display was maybe added to the database.
Restoring backups it reveals that the Poachers Inn was indeed ID #11 in the old table so that explains where it was coming from.
However, when you add a new location, shouldn’t this metadata be rebuilt? Or should it be deleted when the plugin was uninstalled with the delete database option selected?
I was in a hurry and had a brainstorm – I added 200+ dummy entries to the locations table via the SQL console and then deleted them. This meant that new locations had completely new IDs way above what had been used before. A sketchy workaround but it worked for me as I had a deadline.
The topic ‘Location issue after re-installing plugin’ is closed to new replies.