Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Never Settle

    (@neversettle)

    What is the name of your custom table? Is it a global table? Or a table per site that your plugin is used in? As long as your table adheres to the WP table prefix ( like wp_ ) and includes the current site id (like wp_123_ for Site with ID: 123) then the Cloner will automatically clone it with that site and all the rest of that site’s tables. Otherwise, there is no way for the Cloner to know about it, and a custom table could have a nearly infinite number of possible names to guess at. If you follow the convention wordpress uses for it’s own individual site tables per site, the Cloner should have no problem automatically cloning those custom tables along with the standard ones. Hopefully that helps.

    Thread Starter FaceLord

    (@facelord)

    Thanks for getting back to me.

    The table in question is not a global table. There is one created for each site that the plugin is used on. The plugin adheres to the WP table prefix. In this case, the prefix is “bl0g_”, therefor a site with an ID of 123 has a table named bl0g_123_client_info.

    Is it possible that it’s not working correctly because I’m using a custom table prefix? Or could there be any other reason this isn’t working?

    Oh snap… I just figured out the problem. It’s an issue with the plugin. It has a column in it’s table that defines the site ID. Probably under the assumption that all sites share a global table. Since the table is cloned to a new one, the blog site ID doesn’t change.

    This should be an easy fix in the plugin now that I know what’s happening. Sorry to unnecessarily bug you. And thank you so much for your time.

    Plugin Author Never Settle

    (@neversettle)

    No worries! Glad you figured it out! Sometimes it just takes walking it through or bouncing it off someone to get all the pieces together. We do that all the time too! All the best!

    I see this as well with the WooCommerce Advanced Notifications plugin. It creates “advanced_notifications” but not “advanced_notification_triggers”

    It’s not too hard to create it with a SQL command, but it would be a little more convenient to have it work automatically.

    Any ideas?

    Plugin Author Never Settle

    (@neversettle)

    Thanks, Jeff! Can you please double-check to make sure you are on the latest version (2.1.4.6). This was a tricky bug that had been lurking for a while now and we finally isolated it and release an update to fix it a couple days ago. However, if you’re on 2.1.4.6 and it still isn’t fixed we definitely want to know that and dive deeper into why. Please let us know either way!

    Here’s the description from the last release notes:

    2.1.4.6
    Fixed critical bug that was causing incompatibilities with some plugins that install their own tables to the database and in some cases the cloning operation was leaving a single custom table behind in the clone. This primarily affected Calendar plugins or other plugins where the table name began with higher letters (a, b, c) after the prefix like wp_a*, wp_b*, wp_c*

    Many thanks!
    NS

    Hi,

    That did it. I was a version behind. Updated and it works perfectly now.

    Thank you!
    Jeff

    Plugin Author Never Settle

    (@neversettle)

    Right on! Thanks for closing the loop!
    NS

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Missing a database table when cloning’ is closed to new replies.