Home>Support>Page Builder 1.4.11: Preview not working and sometimes widget content gets lost

Page Builder 1.4.11: Preview not working and sometimes widget content gets lost

By rswad, 10 years ago. Last reply by Andrew Misplon, 9 years ago.

Hi Andrew,
as I already described here:

Visual Editor Not Working with Page Builder


sometimes the widget content gets lost. Here again my last post:

“Everything is updated (WP 3.9, PageBuilder 1.4.11, Black Studio TinyMCE Widget 1.3.3), all plugins are deactivated (except PB and BSTMW) and I’m using standard Twenty Fourteen theme)… but still not working! :( It occurs when I’m pasting rich html content (for example copy & paste a table) into the visual editor widget and then clicking “Done” and then clicking on the WP preview button => the widget is not shown in preview mode. Same when pressing the publish button and showing the page. Sometimes, especially when I’m opening the visual editor widget, clicking on “Done” (without changing anything) and then leaving the edit page without saving, the widget content gets lost. It’s gone the next time I want to edit the page. Other widgets are still present. No JS errors shown in console window (on editing, or clicking any buttons).”

Can’t you reproduce that problem?

Thank & greetings,
rswad

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 4 months ago rswad

    I can reproduce the same problem with the standard WP text widget. So it is not necessarily related to the Black Studio TinyMCE Widget… Maybe it’s a problem when serializing the rich html content? I will do some tests later…

  2. 10 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Please can you send me a link to a page with the problem. Is it possible the widget is there in Twenty Fourteen but the text is just white?

  3. 10 years, 4 months ago rswad

    Hi Andrew,
    no, the text is not just white, I’ve checked this. But I think i have figured it out. I tested it with the standard WP text widget. If I paste “This is a h1” everything is just fine, content is shown in preview. When I paste “This is a h1” the content gets lost. So it’s the quotes around the class attribute! I’ve checked that in the database. They are not escaped… Is that possible?

    Here is an example. Unfortunately you cannot see what’s not there, but there is an empty div with class “textwidget” below the one with the h1:
    http://wptest.extranet.netzeffekt.de/test/

    I can send you login data if that helps…

    Greetings,
    rswad

  4. 10 years, 4 months ago rswad

    I have to mention: The problem does not occur if there is any content in the WP default editor tab. So for example when the page builder option “Copy Content to Post Content” is set or you enter some text in the default editro, the problem seems to be solved. But I’m not sure, if it’s absolutely solved…

  5. 10 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Thanks, I’ll check this out ASAP. It’s worth mentioning that you should manage a page or post exclusively in Visual/Text OR the Page Builder tab. So if you’re working a page in Page Builder then you should first remove all the content from the Visual tab.

    • 10 years, 4 months ago rswad

      Yes, i agree with you. But when I remove all content from default editor tab (because I’m working with Page Builder) – especially in that case, the problem occurs.

  6. 10 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Ok got you. That combination of setup has been reported before as triggering the issue. Please send me set of temporary login details to [email protected] and I’ll take a look ASAP.

    • 10 years, 4 months ago rswad

      Ok, thanks. I’ve sent it to you.

  7. 10 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Thanks.

    This thread has moved to email.

  8. 10 years, 4 months ago DanielB

    I’ve seen the same problem on two sites. It only happens if you use the preview page button. I would love to be kept in the loop on the fix.

  9. 10 years, 4 months ago DanielB

    FYI I believe it started happening with 1.4.10. I was hoping 1.4.11 would fix it but it didn’t.

  10. 10 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Hi Daniel

    Can you open a new thread for me please and I’ll take a look.

    Thanks

  11. 10 years, 4 months ago Fernando Cezar Chaves

    Hi Andrew,
    My problem is similar, it does not appear settings editor to insert html elements, when I click done it does nothing and when clixo x to close it closes the box but is open overlay

  12. 10 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Hi Fernando

    Please open a new thread and I’ll do my best to assist this evening.

  13. 10 years, 4 months ago rswad

    Hi Andrew,
    are you still working on this problem or are there any updates for this issue? Unfortunately I didn’t receive any mails from you yet.

    By the way I did some code testing and I am almost sure, it’s a problem with the escaping of the quotes in html-content while saving the widget content to the database. But i couldn’t figure it out why it is not working…

    Thanks for a short answer & kind regards,
    rswad

  14. 10 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Hi Rswad. Let me chat to Greg again tomorrow and see where we are with this. Thanks for the follow-up.

  15. 10 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    At the moment we’re hoping the next Black Studio update to 1.4 will resolve this issue. We’ll pick it up again if it doesn’t.

    • 10 years, 4 months ago rswad

      Hi Andrew,
      thanks for your support. I don’t think, that the Black Studio Update will fix that, because the same problem occurs with the standard WordPress text widget… :(

      Kind regards,
      rswad

  16. 10 years, 4 months ago rswad

    Okay, I’ve another indication. When I use the standard WP text widget in Page Builder and I’m adding a H1 with content “Headline” and a paragraph with content “Text”, in preview mode it shows me the paragraph with an “n” before. So the output is “Headline nText”…?! Where does the “n” come from?! Maybe it comes from the newline special char (backslash n)? As soon as I add an attribute with quotes to the H1, it shows nothing in preview mode…

    In this case I’m not using the Black Studio Visual Editor at all. So the problem is related to page builder, I think…

  17. 10 years, 4 months ago rswad

    Hi Andrew,

    I think I’ve figured it out. It’s in the function ‘siteorigin_panels_get_panels_data_from_post’ in the file ‘copy.php’ (line 107). I’ve seen that there the content of $form_post[‘widgets’] sometimes comes with double slash escaped (especially when saving post) and sometimes not (especially in preview mode). But the function always ‘stripslashes_deep’ the $form_post[‘widgets’] in line 109… So in preview mode, all special chars are not escaped anymore. I simply added an if statement wether it’s in preview mode or not and depending on that do “stripslashes_deep” or not:

    if ( isset($_POST[ ‘wp-preview’ ]) && $_POST[‘wp-preview’] )
    $panels_data[‘widgets’] = array_values( isset( $form_post[‘widgets’] ) ? $form_post[‘widgets’] : array() );
    else
    $panels_data[‘widgets’] = array_values( stripslashes_deep( isset( $form_post[‘widgets’] ) ? $form_post[‘widgets’] : array() ) );

    Anything seems to work fine but I don’t know, if that’s the right solution. But maybe it helps finding a bugfix soon! :)

    Kind regards,
    rswad

  18. 10 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Thanks very much rswad, I’ve passed this all onto Greg for him to review. Appreciate the effort!

  19. 10 years, 3 months ago rswad

    Hi,
    I’ve updated to version 1.4.12, but unfortunately this is still not resolved. How can you just keep ignoring that? I’m sorry, you did a good job with the plugin but concerning this issue I don’t get it.

    Greetings,
    rswad

  20. 10 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    Hi Rswad

    Are you referring to preview issues or content loss issues?

    • 10 years, 3 months ago rswad

      Hi Andrew.
      Both! Preview not working AND content is lost. I’ve described this a lot above. Serialization is not working properly…

  21. 10 years, 3 months ago rswad

    Nothing new with that?

  22. 10 years, 3 months ago Greg Priday
    Hi, I Work Here

    Hi rswad

    We haven’t been able to recreate the issue on our side. It does sound similar to an issue we had with another plugin called Social Network Auto Poster. The issue was that plugin was modifying the global $_POST variable which was causing problems. We worked with the developer and that issue has been fixed though.

    https://siteorigin.com/thread/incompatibility-social-network-auto-poster/

    It’s possible that you’re having the same issue with another plugin or a drop-in. Where is your site hosted? What version of WordPress are you running? Do you have any drop-ins installed (they’re displayed in the plugins page, under a separate tab)?

    • 10 years, 2 months ago rswad

      WordPress 3.9.1, PageBuilder 1.4.12, Theme: TwentyFourteen 1.1, no other plugins or drop-ins activated

  23. 10 years, 3 months ago Josh Meyer

    I too am having the same issue with “Preview changes” button completely removing the pageBuilder content. It happens with any and all plugins that are placed. This is a huge problem. Is there any update on this?

  24. 10 years, 3 months ago DanielB

    I have the exact same problem. I had to move to a different page builder system for new sites. This has been going on too long. I know I can’t complain after all you are doing this for free. But you really should give this problem more time if you plan to continue this project.

  25. 10 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    Hi Josh and Daniel, thanks for your contributions. If you have a moment please could you let us know the conditions that you are seeing or previously saw this happen. As soon as we can re-create the problem we’ll be able to attend.

  26. 10 years, 3 months ago Greg Priday
    Hi, I Work Here

    Just to double check, is the content actually disappearing from Page Builder when you hit preview, or is the preview just not working?

    The preview has worked in the past, but WordPress changed how the preview works in a recent update, and we haven’t been able to get it working again. If widgets are losing content when this button is pressed, I can make Page Builder disable or hide the preview button when it’s active and code up it’s own preview functionality.

    • 10 years, 2 months ago rswad

      Hi Greg, preview is just not working. The content is lost when you click preview and then move to another WP page. I will describe that in an extra comment below…

  27. 10 years, 3 months ago Greg Priday
    Hi, I Work Here

    I’ve spent about an hour today investigating this issue and as yet, still haven’t been able to recreate it. Would it be possible for anyone experiencing this issue to provide the following.

    * Page Builder version
    * WordPress version.
    * Plugins and drop-ins installed
    * Theme used
    * Any JS errors when the preview button is pressed – http://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors#Step_3:_Diagnosis

    If possible, could anyone provide a video that shows the issue in action. This might help.

    http://www.screenr.com/

    Thanks for your contributions. Hopefully we can figure out exactly what’s causing the issue.

  28. 10 years, 2 months ago rswad

    Hi Greg, thank you for your help. This is how you can recreate it:
    – WordPress 3.9.1, PageBuilder 1.4.12, Theme: TwentyFourteen 1.1, no other plugins or drop-ins activated
    – Create a new page with no content in tabs “visual” and “text”
    – Switch to tab “Page builder” and add one standard WP text widget
    – Content of text widget: Test (or any html code with brackets!!)
    – Click Publish/Save => everything fine
    – Click Preview => Oh, no! Nothing is shown in preview mode.
    – Switch back to browser tab where you have edited the page (but make no any changes)
    – Move to any other WP Page in the menu (maybe “All pages” because I want to edit another page)
    – Go back and edit the page again => Content of text widget is completely lost. Oh no!!!!!

    So the loss of the content always happens, when I click “Preview” and then move to another WP page without publishing/saving the page again. Preview is working when I add some content in the “text” oder “visual” tab. This is how I can prevent loss of content. But next time I edit the page and do a preview again (without changing the content of the text-tab) it happens as described above. So it’s not because there actually was content in the text-tab, but changing the content of the text-tab prevents content loss only one time.

    By the way: No JS errors. It’s all fine in the edit tab (all seems to work). It not happens while editing the page (client-side), but while saving/previewing (server-side)… Hope it helps to get rid of this! :)

    • 10 years, 2 months ago rswad

      Content of text widget must be:

      Test

      (or any html code with brackets!!)

      My html-code was deleted in the comment above…

      • 10 years, 2 months ago rswad

        Damn! The content of the text widget has to be any html code with brackets. Maybe an h1 with class=”something”.

  29. 10 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Hi Rswad

    I have the same issue as when we chatted before, I’m unable to replicate this. Would you mind making us a quick screencast of these steps?

    http://www.screenr.com/

    Thanks

    • 10 years, 2 months ago rswad

      Hi Andrew,
      here is a screencast:
      http://www.screenr.com/GzKN

      It’s just an example how to replicate this. But it’s not unrealistic. I often edit multiple pages, click preview, edit some other wordpress setting (menus and so on) and in this case, the content is often lost as shown in the screencast.

      rswad

  30. 10 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Thanks for the effort, much appreciated. I’ll ask Greg to take a look your video ASAP.

  31. 10 years, 2 months ago Greg Priday
    Hi, I Work Here

    As hard as Andrew and I have tried to replicate this issue, we haven’t been able to recreate this.

    I see you’re using this locally. Do you only get this issue on your localhost or are you getting it on other servers as well? One other thing I can try is using the same translation of WordPress that you’re using. It’s a long shot, but maybe the translation is somehow causing the issue. What language are you using?

    • 10 years, 2 months ago rswad

      Hi Greg,
      it occurs locally and on the server (Ubuntu+Apache2). I’m using the German version of Worpress (de.wordpress.org)….

    • 10 years, 2 months ago rswad

      By the way: Same problem with english installation of wordpress…

  32. 10 years, 2 months ago rswad

    Unfortunately still the same problem with version 1.5… :(

  33. 10 years, 2 months ago LVC Creative

    Hello,

    Thanks for this thread. I was looking at the same problem as rswad described it. The preview button seems to erase contents and once you click the publish , content is gone already.

    I hope someone can share possible solutions on the matter.

    Thanks all.

  34. 10 years, 2 months ago Greg Priday
    Hi, I Work Here

    As soon as we can recreate this issue, we can solve it. Unfortunately I have still not been able to recreate it. This might take a lot questions, trial and error, but I am committed to figuring out and fixing this issue.

    LVC Creative, is there anything unusual about your configuration? What plugins are you using? Where are you hosting your site? What browser are you using? Do you have any other information that might help?

    • 10 years, 2 months ago LVC Creative

      Hi Greg,

      Kindly checkout Ben van Kruistum’s screencast below. This is exactly how I described it as well. Hope we find a fix for this soon.

      Thanks and regards

  35. 10 years, 2 months ago LVC Creative

    Hi Greg

    Thanks for your quick response. The thing is it happens when you create an article and try to revisit your work again, the preview button seems to erase things as you go edit the article

    1. Create a new post
    2. Add title
    3. Add first content using Visual editor (using Black Studio Magic) : try to input simple text first like, “text here”
    4. Add second content using again Visual editor (using Black Studio Magic) : try to use an image this time and embed it from your media gallery
    5. Click Publish
    6. Click Preview (supposedly you will successfully see your text and your image).
    7. Now try to navigate away from editing your post (which you would do if you will leave your work for today and continue later on), for example, by going to the Dashboard or the Post type overview or just by closing your browser.
    8. Now, go back to that same article, this time Click on Preview. (Which you would normally do to check where you left off before you continue again)
    9. You will notice that your work is gone in the preview! But when you check your Visual editor contents once again, the two items you entered are still there!
    10. Now here is the part where it gets erased. again try to navigate away (like go to the Dashboard or close your browser) from the editor page WITHOUT clicking the Update button. Then try to go back to your post, you will notice that you have lost all your content.

    The thing is Preview seems to misfire and not show the latest content you inputted, and it saves exactly what is reflected on your browser, once you miss to click Update .

    Also , the Autosave behaves like this and contributes to the problem but that is another story. (that is why I lengthened the value for the timebeing).

    I hope with this instruction you can try to reproduce it.

    Btw, I am using the latest version of black tinymce, WordPress and page builder 1.4.12 running on both LAMP and tested also on WAMP setups.

    Used Chrome latest version to date.

    Regards

  36. 10 years, 2 months ago LVC Creative

    @Greg: Correction please Black Studio Magic is supposed to be Black Studio Tinymce ;)

  37. 10 years, 2 months ago Ben van Kruistum

    Yesterday i created a post but it didn’t appear somehow, so i try again.

    Thanks for this thread, sadly enough we also encounter the same problem.
    We encounter the same issue as rswad.

    I have uploaded a screencast to youtube:
    https://www.youtube.com/watch?v=cs2Krh_5yr0

    And added a screenshot of my activated plugins here:
    http://awesomescreenshot.com/0fc34i0r7c

  38. 10 years, 2 months ago LVC Creative

    Thanks Ben for posting the video, same thin happens to me

  39. 10 years, 13 hours ago tpa_james

    Has there been any developments with this issue? I have the same problems reported above.

    Steps I take to reproduce the bug are:

    1. Edit the page built with Page Builder within WP Admin
    2. Click “Preview”
    3. All widgets appear in the preview with the exception of the content that was stored within the “Visual Editor” aka “Black Studio TinyMCE Widget”.
    4. The live version of the page will also have deleted the content stored in the Visual Editor widget.

    Note: When clicking “Preview” it doesn’t delete the content stored in the Visual Editor widget 100% of the time, but the majority of times it will be deleted.

    If there’s any more information I can provide to help resolve this problem, please let me know.

  40. 9 years, 11 months ago Scott Green

    I have the exact same problem and have found that if you click “Preview” for a second time, the content re-appears. Let me know if this works for you?

  41. 9 years, 6 months ago Chris Buckley

    I’m having exactly the same problem.

    WordPress 4.1.1
    Page Builder 2.0.7
    Black Studio TinyMCE Widget 2.2.3

    I change any Text or Visual Editor content when using Page Builder, click “Preview Changes” and none of the new additions are shown. It just shows the previously saved content instead.

    • 9 years, 6 months ago Andrew Misplon
      Hi, I Work Here

      Hi Chris Buckley

      We’d like to help you, but can you please start a new thread with your question? We can only offer you the best support possible when you’re the owner of a thread.

      Page: New Thread

      If you’re a premium user, please be sure to enter your order number so we can properly prioritize your thread.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More