• Resolved Pieter Bos

    (@senlin)


    Hi guys,

    The other day I noticed something very strange and I am not sure where/what the problem is. I built a site and I used the Draw Attention plugin to put markers on a map.
    I developed locally and used a separate live domain for staging. On regular intervals I pushed the database to the staging environment using the Database Sync plugin and the map always worked with functioning hotspots too.

    Then late last week, the time had come to deploy the site to the live server. As the live site environment differed a bit from the staging https vs http the Database Sync plugin couldn’t connect, so I did a manual deployment.

    But after importing the tables into the database of the live site, none of the hotspots made it through. At first I thought I forgot something and I deployed the database again. I also tried by export/import, but nothing worked. I could clearly see the hotspots in the database and have no idea why they didn’t make it through.
    Eventually I gave up and I manually added the hotspots again which was a bit of a pain (8 hotspots in 3 languages), but I simply didn’t have time to troubleshoot it further.

    My questions are:
    – have you heard of/experienced this before?
    – could it be the difference between http and https?
    – could it be because I used the ACF Pro plugin and the Draw Attention plugin uses something that conflicts?

    Any ideas would be appreciated!

    Thanks,
    Piet

    https://www.ads-software.com/plugins/draw-attention/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Natalie MacLees

    (@nataliemac)

    Hello Piet!

    We’ve seen this happen when users do a simple search and replace for the URLs in the database instead of using one of the tools that helps to correctly update serialized strings in the database. It’s not clear if that might be what happened here.

    It’s possible that it could be the difference between your http and https domains, depending on how those were updated in the database.

    We’re not aware of any conflicts between ACF Pro and our plugin and I believe we’ve used the two plugins together ourselves without an issue.

    My best guess at this point would be that it has to do with how you changed the URLs in the database for the deploy to production.

    Thread Starter Pieter Bos

    (@senlin)

    Hi Nathalie,
    Thanks for getting back.
    This is the first time I hear that replacing path/URL manually would be problematic.

    If the Draw Attention plugin can only be used in an environment where (premium) tools are used to migrate environments, then I think you should add that somewhere to the plugin details.

    Plugin Author Natalie MacLees

    (@nataliemac)

    Hi Piet!

    This is related to how PHP serializes and stores data and is a common issue when migrating WordPress sites:

    https://www.ads-software.com/support/topic/migrating-without-losing-serialized-data

    When you do a find/replace you can’t simply do it in a text editor or in phpMyAdmin if the new domain is a different length than the one you’re replacing. It affects a lot of things (not just Draw Attention) including any widgets that contain that URL – you can lose whole sidebars and widgets if you do a simple find and replace.

    Here are a few write-ups which cover it in more detail and much better than I could:

    https://deliciousbrains.com/wp-migrate-db-pro/doc/serialized-data/

    https://wpengine.com/support/best-practice-wordpress-search-and-replace/

    Not all plugins need to store data this way, but it’s the best way to store large amounts of data — like all those coordinates for each clickable area — and still keep the plugin running quickly.

    It’s best to perform a find/replace with a tool that doesn’t break serialized data because many themes, plugins, and even WordPress itself use it in different situations. There are many free tools for accomplishing this, not jut premium ones.

    I’m particularly a fan of this script: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ which is free to use. The free version of WP Migrate DB will also allow you to export the database from a local or staging site with all of the replacements for the new URL done so the database is ready to import into the production site.

    Let us know if you have any other questions!

    Thread Starter Pieter Bos

    (@senlin)

    Thanks Natalie, I was aware of the various tools as I wrote in my initial ticket.

    I (still) would like to suggest to add somewhere in the description that Draw Attention makes use of serialised strings.

    Plugin Author croixhaug

    (@croixhaug)

    Hi Piet, we’ll look at adding that wording somewhere. We’re also hoping to build another export/import option (using JSON) into a future version of Draw Attention so we have an alternative option for users who migrate and run into this problem.

    Thanks,
    Nathan

    Thread Starter Pieter Bos

    (@senlin)

    That would be great, thanks Nathan!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hotspots not copied over on site migration’ is closed to new replies.