unable to search/replace Beaver created links in postmeta table

Hey Peter,

I got the exact same thing as you. I’d like to know, is this the database from the already live site then transferred to the clone site? I ask this because if it is, then it already has some of the entries changed to the live site which is www.austincollege.edu which could have caused the problem. Do you have a copy of the database before you migrated it to the live site? When it was still purely in acwebtest.austincollege.edu? Also, just wondering, when you ran the search and replace script on the live site, did you run it on all tables or only in selected tables?

Ben

We ran the search/replace on post and postmeta tables on acwebtest (dev site).
When that didn’t work, we copied for you (acwebtest2) and also copied to the live site (where we have temporary fix in place for all the dev links).
I will ask to see if there is a copy available before the original search/replace.

However, at this point, we need to get it to work on the live site, which already has the initial search/replace applied (just like the copies). How would search/replace not work even if it was already partially done? Shouldn’t running it again (on all tables) just fix the issue (although that doesn’t seem to be working)?

You are welcome to search/replace on the copy and return everything back to www… or acwebtest… or whatever you need to troubleshoot.

Hello,

If i may, i had exactly the same problem with the It script and the postmeta links.

I tried this plugin and everything was fine :

https://wordpress.org/plugins/wp-migrate-db/

Hi Peter and Adelino,

I do remember Adelino’s issue similar to this which was resolved by using the said plugin. You may try that. Another thing I would like to suggest to you is to run the search/replace on the live site on all tables, replacing acwebtest.domain.com with www.domain.com. Or, if you had the original database, i.e., before any search/replace was ran, upload it to the live site and do the search/replace on all tables for the same values. I did encounter an error when running it saying something about a table for gravity forms not having an independent value or something but I don’t think that really matters, just informing you ahead of time. I’d love to really check what could have went wrong but since I’ve limited access to the site files/database, I can’t do much. I really do apologize for having to through all this this isn’t usually a problem.

Ben

Ben - We ran several tests on a new copy of the live site (again).
We ran a full and DB backup of the site.
We keep getting the same results as shown above – either the search/replace doesn’t find all instances, or else finds them all and breaks all Page Builder pages.
After the last search/replace we did failed, I restored the full backup – and yet the Page Builder pages are still broken: http://acwebtest2.austincollege.edu/
Could this have something to do with the Page Builder cache, that I am resetting each time, after running search/replace? Is that data stored somewhere else besides the normal WP folders or DB?

Also, can you tell us exactly which tables store data for Page Builder, and if any other folders besides plugin folder are used for live site data (like the cache)?

Finally, is there any other advanced support available to help us troubleshoot – i.e. can we get someone from Beaver to join our developers in a call/screen share to work through it together?

Hey Peter,

I have already assigned this to the other members of the team so they can check further.

Ben

Hey Peter,

Sorry you’re having trouble here. I am trying to catch up on what’s happened so far…

Is there a copy of the database that hasn’t had any search/replaces run on it? That is, a fresh export from the original dev site? If yes, can you email that to me so I can do a test or two?

robby [at] fastlinemedia [dot] com

To answer your questions, the page builder stores all of the page data in the wp_postmeta table and, I believe, we also store some settings data in the wp_options table. Regardless, though, you’ll want to run a search and replace on every table in the DB.

We can schedule a call or screen share if need be, but I’d like to check out the database first. I don’t think this issue has anything to do with the cache. It sounds like something went wrong during the database search/replace or export/import.

Thanks, Peter!

[Content Hidden]

Peter,

I downloaded the April 3rd database and it has http://www.austincollege.edu as the siteurl. You guys were developing on a subdomain, correct?

Also, you mentioned using a plugin that uses the interconnect.it engine? Were you using this plugin to do the search and replace on this site?

We recommend using the beta version of the interconnect.it script (v 3.0.0). I am afraid that the plugin you mentioned might be using an older version of the script/engine and that’s why it’s not working?

Can you let me know which tool you were using to do the search/replace. Also, if you weren’t using the beta (3.0.0) version, give that a try. I think that might be the problem. Thanks!

Robby - We usually use this plugin for our Beaver sites (with no issues):
https://wordpress.org/plugins/better-search-replace/
(based on the same interconnect engine)
For this site we used the plugin first (on live) and when that didn’t work, we have used the BETA script since then on all the test sites. Of course our goal is to be able to run the script on the live site, w/o breaking the Builder pages.
We were developing on a subdomain, and we have home_url and site_url set in wp-config, so the DB entry probably has ‘www’ but you can see on the settings page it is set to dev:
https://acwebtest2.austincollege.edu/wp-admin/options-general.php
When you set *_url in wpconfig, it overrides the settings. Is Builder somehow using the *_url data from the DB? I wouldn’t think it would make any difference, since the search/replace would replace those items in DB as well…

Okay. Thanks for clarifying.

We’ve never had any issues using the 3.0.0 version of the script. I think the best bet would be to get a fresh copy of the database from the development server, import it to the live site, and run the 3.0.0 search/replace script on a fresh copy of the database. Please let me know if that resolves the inconsistencies with the URLs.

As memory serves, we actually ran the search/replace plugin on the dev server to make sure it would work (since it was such large DB) just before we were going to launch later that day. (We usually run immediately post-launch.)
When it didn’t work, we went ahead and launched and set up the dev site redirects so the live site would work.
Is there any reason why the search/replace would fail or Page Builder would fail based on the actual site URL (or the site URL in the DB/settings)?

Unfortunately, there is no current copy of the DB w/o the search/replace applied, except for April 3 – and of course there have been many changes to the site since then.

Another of our developers would like to run some tests on the COPY site, so let me know if you need it left alone for any reason for further examination. We would also like to set up a call, because the client would like this issue resolved by next week. See next post for my direct email address. Thanks!

[Content Hidden]

Peter, have you guys tried using the search/replace script or are you only using the plugin?

There is no reason why the search/replace script or BB would fail because of the site URL being set in the wp-config file.

Sorry if I wasn’t clear earlier – we only tried the plugin once. Since then we have been using the beta script. And the script is causing the Page Builder pages to fail (all the content is being converted into ONE Text Editor field).

Let’s try approaching from another direction:

  1. Is there is a way to FIX the content after search/replace?
    Please take a look at Home page content on site COPY - press the Page Builder button to edit - and you’ll see what I’m talking about - it’s all converted to one text field.

  2. OR is there a way to copy the content from one site to another, page by page? We could create another copy of LIVE, run search/replace on LIVE. Then how do we export the pages we need from the new copy? Does Builder allow for this? Or perhaps we find another plugin to export/import all pages from the new copy to live?

Please let me know what ideas you have for #1 & #2 above. Thanks!

Peter,

I really wish I had a good answer for you here. I want to help, and I hate to say it, but it sounds like the database may have been corrupted. If you don’t have a backup of the original database, I am not sure if there is much we can do to help.

Just to rule out any edge cases, you mentioned that you were setting the site URL in the wp-config file, right? Is this still the case on the live site? If yes, you might try changing the site URL in the WordPress settings panel. Also, was there a particular reason that you were changing it in wp-config versus from the settings panel or a database search/replace? After doing that, you could try running the search/replace script again to see if that may have been the root of the issue…

Next question, how many pages were built with Beaver Builder? I am curious if it would be time efficient to consider rebuilding the pages on the live site instead of trying to fix the database issue.

I see what you mean on the dev site. This happens when the serialized objects get corrupted. The IT script has been used successfully on thousands of sites. Can you think of anything else that might be different about your setup that could have caused something to go wrong?

Regarding question #2, you can save pages as templates and export the templates. I am not sure if this would be the most efficient way to go about it, though (depending on how many BB pages there are).

Let me know…

Hi Robby,

I work with Peter and I looked into this issue and when I did a dry run using the interconnect Search and Replace I discovered that it’s not serializing the search and replace. See here http://screencast.com/t/jX20eUybC on the left the old URL character length is S:83 but on the right the new URL is also S:83 when it should be S:77 because the new URL is 6 characters less than the old URL. This would cause BeaverBuilder to break after the Search and Replace which leads me to believe that the script is not working correctly for some reason. Can you suggest another tool we could use instead or anything else we could try to fix this issue?

-Aaron W.

Hi there! Where are you seeing at the serialized data from your screenshot? The dry run shouldn’t apply any changes to the database. It just shows what changes would be made if you ran the live script.

You could shoot an email over to the IT guys about this. I have not tested any other tools/plugins, but I believe the WP Migrate DB plugin handles serialized data:

https://github.com/bradt/wp-migrate-db

You could give that one a try. Sorry again for all the trouble. Keep us in the loop on any progress…

When I click “View Changes” it shows me what it would look like if I had made the changes http://screencast.com/t/Y2amyScWYRX8 after clicking that a window appears and that is where I got the screenshot from and it’s not showing that it’s searilizing the data. However are you saying that it wouldn’t show me the serialized results in that window?

I have notified them about it and I’m just waiting to hear back.

I will give that plugin a try and see if it works.

Ah, okay. I just did a quick test and when I view changes on a dry run the serialized data is updated, so there is something strange going on there. Did you hear anything back from IT? Also, which site were you testing the search and replace on? I wonder of the serialized data was already corrupted and that’s why the script wasn’t working.

Where is the database from the development version of the site? Did you guys point the live instal at the development database and run the search and replace? Just curious if there still might be a fresh copy of the database hiding around somewhere.

Thanks, Aaron.