Is it possible to recreate a page using the data from the mfn-page-items in the post-meta table?

I need to recreate a page from a database backup I have. I can't find an export value in the tables anywhere but I was wondering if it was possible. 

Comments

  • I was able to find the serialized data, but I cant seem to find the format that is used when exporting and importing pages.
  • Hi,

    sorry but we do not understand what you are looking for exactly. Would be great if you can try to explain it once again more clearer.
  • edited October 2016
    I have a page that I created and then the page was deleted. Going back into a database backup I have, I still have the serialized data entry from the mfn-page-items value in the post-meta table. 

    Essentially, how would I go about taking the following code (not the full serialized data): and making it the same format as the code that is used when importing/exporting a page in the builder.

    Serialized code from database table:
    a:5:{i:0;a:2:{s:4:\"attr\";a:17:{s:5:\"title\";s:36:\"Add Background Image to this section\";s:8:\"bg_color\";s:0:\"\";s:8:\"bg_image\";

    What I am trying to turn it into (code that is given when you choose to export the builder contents from the page):

    YTo0OntpOjA7YToyOntzOjQ6ImF0dHIiO2E6MTc6e3M6NToidGl0bGUiO3M6MDoiIjtzOjg6ImJnX2NvbG9yIjtzOjA6IiI7czo4OiJiZ19pbWFnZSI7czo3MzoiaHR0cDovL3NhYy53c29sZGV2LmNvbS93cC1jb250ZW50L3VwbG9hZHMvMjAxNS8xMS9yZXNlYXJjaGVyLWluLWxhYi0xLmpwZyI7czoxMToiYmdfcG9zaXRpb24iO3M6MTg6Im5vLXJlcGVhdDtjZW50ZXI7OyI7czoxMjoiYmdfdmlkZW9fbXA0IjtzOjA6IiI7czoxMjoiYmdfdmlkZW9fb2d2IjtzOjA6IiI7czoxMToicGFkZGluZ190b3AiO3M6MToiMCI7czoxNDoicGFkZGluZ19ib3R0b20iO3M6MToiMCI7czo3OiJkaXZpZGVyIjtzOjA6IiI7czo5OiJkZWNvcl90b3AiO3M6MDoiIjtzOjEyOiJkZWNvcl9ib3R0b20iO3M6MDoiIjtzOjEwOiJuYXZpZ2F0aW9uIjtzOjA6IiI7czo1OiJzdHlsZSI7czoxMjoiZXF1YWwtaGVpZ2h0IjtzOjU6ImNsYXNzIjtzOjMzOiJiZ2NvdmVyIHRvcC1iYW5uZXIgc2NpZW5jZS1iYW5uZXIiO3M6MTA6InNlY3Rpb25faWQiO3M6MDoiIjtzOjEwOiJ2aXNpYmlsaXR5IjtzOjA6IiI7czo0OiJoaWRlIjtzOjA6IiI7fXM6NToid3JhcHMiO2E6MTp7aTowO2E6Mzp7czo0OiJzaXplIjtzOjM6IjEvMSI7czo1OiJpdGVtcyI7YToxOntpOjA7YTozOntzOjQ6InR5cGUiO3M6MTM6ImZhbmN5X2hlYWRpbmciO3M6NDoic2l6ZSI7czozOiIxLzEiO3M6NjoiZmllbGRzIjthOjg6e3M6NToidGl0bGUiO3M6NTY6Ikdyb3VuZGJyZWFraW5nIDxzcGFuIGNsYXNzPSJsaWdodC1wdXJwbGUiPlNjaWVuY2U8L3NwYW4+IjtzOjI6Im

    Overall, because wp revisions do not work on the builder, I am unable to roll back a page once it has been edited or changed. Is there a better way to do this?
  • Maybe you should to change format type of database stuff with Builder | Data Storage option under Theme options > Global > Advanced section? Sorry but except this option, we do not have any other solution.
  • When you go to export a page from the builder, what format is the generated code that is being given to the user for a later import? This is the format I am trying to get the serialized data into so I can import the page properly.
    image
  • The first thing we serialize the array and then we are using base64() to encode it.
  • Perfect. Thanks you for your help. :D
  • Sorry to bump this thread, but I am trying to achieve the same thing. I have the serialized data from the database - taken from the meta_value field with the 'mfn-page-items' meta_key - this definitely appears to be the Muffin Builder content for the page.

    If I update this field in the database with a value from a backup (to try and restore a page) the Muffin Builder (and therefore front end page) are empty.

    Based on your instructions to serialize and then encode with base64 I have tried using these tools to:
    - Serialize the value from the database: http://php.fnlist.com/php/serialize
    - Then encode it with base64 (in UTF-8 charset): https://www.base64encode.org/

    Importing the string this process produces still gives an empty Muffin Builder. Can anyone advise on how to complete this process correctly?
  • Hi,
    Be sure that both versions are the same.
    Do not copy anything from database, just use a Import/Export button near Muffin Builder

    Thanks
  • Thanks for the response. What do you mean by ensuring that both versions are the same though?

    I want to overwrite an existing page with an older version. I have the old content from a database backup in serialised form. I thought updating just that database row with the old content would work but it doesn't.

    If I take that serialised data and encode it with base64, then paste that into the Muffin Builder Import it doesn't work either.

    I'd just like to know if there's a way to make this process work.
  • I mean, that this code you want to paste have same version of BeTheme as this where you want to paste it.

    When you want to use this code from import/export, you don't have to use base64 encoding.
    Just simply copy and paste.

    Thanks.

Sign In or Register to comment.