Page missing but content is still in the postmeta table

Thanks Justin. I may have done a quick search and replace without migrate db or other script to account for serialized data. Can’t actually remember doing it but have been working long hours so may have made a careless error while delirious. I did try changing the URLs back to the originals, then back to the new ones with the script, but it didn’t work.

I discovered another thing that breaks the BB pages due to the serialized data storage as well. If the character encoding is changed, all of the BB posts disappear except for the title due to the different number of characters in various places. I needed to change the encoding in wp-config from ‘utf8’ to ‘’ to fix some import problems. It did fix the problems but the BB pages were all blank so had to change back the encoding and fix the import problem manually for each entry.

It would be good to have a way to recover the BB pages from the postmeta table when there are changes to the site that affect string lengths.

Best,
Lori

Hi Lori,

Unfortunately, I don’t know of an easy way to fix serialized data that has become corrupted. I did a Google search and it looks like there are some scripts that people have hacked together, but nothing that I can see looks like an official solution for fixing serialized arrays.

I also want to point out that this isn’t actually a Beaver Builder issue, but a WordPress issue. We’re not actually serializing any data ourselves, WordPress is when we use core functions such as update_post_meta to save builder data to the database. So, this issue could potentially affect many other plugins (themes using the Customizer) as all sorts of data is stored as serialized arrays in the database.

I really hate to leave you hanging like this and wish I had a better answer. You might try doing a Google search yourself and seeing if any of the solutions for “fix wordpress serialized data” would work for you.

Thanks,
Justin

Thanks for your help. I don’t usually run into problems with serialized data, but since it is page content, it has a big effect. If I run into the problem again I may write a script to fish the HTML data out of the postmeta entry and convert the style info to inline styles, then save it to posts.post_content. That would save the time of recreating the pages from scratch even though they would lose much of the BB awesomeness.

Hey Lori,

You’re welcome and sorry again for the hassle. No promises, but I’m playing around with some scripts that are supposed to fix serialized data and turning them into a plugin. I’m going to bang my head against this for a bit and see if I can get something working. I’ll let you know how it goes.

Justin

Hi Lori,

Good news! I was able to get a script working in the form of a plugin that appears to be fixing corrupted Beaver Builder data. I hope it works for you!

It’s a rudimentary plugin but it gets the job done. Here’s how to use it…

  1. Take a backup of your database :slight_smile:
  2. Download and install the plugin.
  3. To run it, visit your website while logged in as an admin at http://www.mywebsite.com/?bb_data_fix

That’s it! Once you’re done be sure to delete the plugin. Fingers crossed that it works for you.

You can download it from here…

http://forum.wpbeaverbuilder.com/downloads/bb-data-fix.zip

Justin

You are awesome. Thanks for doing that! Not sure if there is any more missing data but still have a few more days on the temp URL to mess things up again :wink:

You’re welcome! Did it work?

Haven’t had to try it yet. Have been fixing the errors manually for now. Had the same problem today when the user changed the permalink for a post. Luckily it was easy to fix because only one character was different.

Sounds good. If you do need to use it, let us know how it goes :slight_smile: I’ve tested on my end and it should work.

I got to use it and it worked perfectly! Thank you for that. I am concerned that this is still happening though. Have asked the client if any changes were made to the page but have not received an answer yet. Is it possible that page caching can have something to do with it? Not sure how it can, but can’t think of other reasons either.

Hi Lori,

I’m glad to hear that it worked!

I am concerned that this is still happening though.

Do you know what steps can be taken to recreate the issue? Let me know and we’ll look into it. Caching definitely shouldn’t be breaking the data.

Justin

I don’t know. A few times my client has informed me that the page just disappeared. Not even sure if he had edited it the last time. If it happens again, I will try to get a full report of steps leading to the problem.