Preview function not working as expected

3 posts by 2 authors in: Forums > CMS Builder
Last Post: December 11   (RSS)

I've enabled the 'Preview' option on a section within CMS Builder and have set the preview URL to a PHP page but when clicking on the Preview link, I'm just taken back to the CMS list view and the message 'Record Saved' is displayed but there's no preview.

I'm using v3.73.

Is there a way to debug this?

Thanks, Paul.

Hi Paul, 

Good find, that's a bug.  We'll patch that in the next release, and if you're comfortable editing code you can apply this fix:

  • Open /lib/menus/default/edit_functions.js
  • Backup the file and then search for: typeof tinyMCE.triggerSave (around line 70 in editPreview() function)
  • Replace this
// force any tinyMCE controls to update their form elements
if (typeof tinyMCE.triggerSave == "function") { tinyMCE.triggerSave(); }
  • With this, adding: typeof tinyMCE !== 'undefined' && 
// force any tinyMCE controls to update their form elements
if (typeof tinyMCE !== 'undefined' && typeof tinyMCE.triggerSave == "function") { tinyMCE.triggerSave(); }

In a previous version, we stopped loading the WYSIWYG editor unless it was needed, but this code didn't get updated, so it's trying to get the latest content from a WYSIWYG that isn't there.

Let me know if that works for you.  Thanks!

Dave Edis - Senior Developer
interactivetools.com