• Hi azaozz,

    I was trying to leave a comment on your site as below, but every time I tried to leave a comment everything went a bit mad and the site stopped loading. I’m hoping I didn’t cause any issues!

    So, I recently left a comment there about TinyMCE and WP-Mailing List from http://www.tribulant.com. Since then I think I’ve found out a bit more about what was causing errors!

    I had a client in a bit of an urgent rush to get these errors fixed so with the help of firebug (best extension ever), I’ve found out a good chunk more.

    It appears that the issue was actually being caused by purl not being defined – which I traced back to cforms 2! cforms has an option to include a cform button in the editor. I worked this out when I disabled TinyMCE advanced, cleared my cache, reloaded and suddenly no toolbars were appearing, either in Write screens or in the Mailing List Plugin. On disabling the cforms “WP Editor Button support”, all editor toolbars returned. I re-enabled Tinymce Advanced, and everything seems to be working fine now, in both Mailing list and normal write screens.

    I then re-enabled the cforms button support and on full refresh of the normal write screen the cforms button re-appeared along with TinyMce Advanced toolbar.

    On returning to the Mailing List plugin the editor I again received a js error of purl is not defined at the following url:
    wp-content/plugins/cforms/js/editor_plugin25.js?ver=311/eval/pi4JQgoPhH1FE7qthKpREg%3D%3D

    Again, disabling this button support in cforms global options sorted it out.

    I’m not sure exactly where the root cause of the conflict is, ie whether it’s cforms, the mailing list, tiny mce advanced, or some combination (I’d say it’s the latter as they all play nicely together when one of the 3 is dropped!).

    I can only imagine it’s hella-confusing.

    If I can be of any more assistance in testing, please don’t hesitate to ask. I will contact both Oliver and Antonie and update them on the issue by directing them to this thread.

    Hopefully WordPress will make it easier to avoid such conflicts in the future. A plugin maker’s life must not be an easy one!

    Cheers,
    Alex

    http://wordpress.org/extend/plugins/tinymce-advanced/

Viewing 4 replies - 1 through 4 (of 4 total)
  • [***] post went awol after editing (???), so here is it again:

    when the cforms plugin is installed
    purl not being defined
    may appear under these circumstances:

    1. WP’s own WRITE/EDIT POST/PAGE having troubles loading the cforms admin header (including the part the defines purl)
    2. or some other plugin is utilizing the TinyMCE editor in a different area that doesn’t load the above mentioned cforms admin header

    cforms by choice doesn’t add it’s own header data to every admin page to keep overhead to a minimum (see editor.php / ~190).
    However, its button would still get added to all (admin) TinyMCE editor instances, due to the rather globally functioning ‘mce_external_plugins‘ filter.

    here are the options to ‘fix’ this, or in other words make it work with other plugins that require TinyMCE to work outside of the usual place:

    1. turn off the cforms TinyMCE editor button (cforms config)
    2. change editor.php (~190) to make cforms include it’s header on all admin pages
    3. have the other plugin call cforms’ insert_cforms_script() function to add the cforms header to their page and thus define purl

    I’m still not convinced that generally adding the cforms header to all admin pages is a good thing, so I won’t change that behavior going forward, but I’ll see if I can implement a check before adding the button to TinyMCE whether or not the user is on a “write/edit post/page” page.

    Which on the other hand would not allow any other TinyMCE instance to make use of the cforms icon without coding again – but I guess there is no perfect solution.


    Please also visit the cforms forum »

    Thread Starter alexleonard

    (@alexleonard)

    Hey Oliver!

    Thanks for getting back to us on that one.

    I had a feeling it was a multi plugin conflict and I’m glad that I know roughly what’s going on now.

    I guess in most cases, from a cforms point of view, that the ability to embed a cform is only really going to be required on the write post/page screens (although I’m sure someone else will think otherwise!).

    Certainly in the case of a mailing list you wouldn’t need it. Other places I can think where people are using plugins to include the native editor would include excerpts, shopping cart descriptions(?), um, I’m sure there’s loads of others..

    I’m currently playing around with adding the native editor to a “Store Description” for a custom google maps store finder that I’ve been working on for a client. However, I’m still stumbling around a bit on that one.

    Fingers crossed I can work it into a proper WP plugin at some point (but I’ve got a lot to learn yet).

    Cheers!

    A

    Thread Starter alexleonard

    (@alexleonard)

    Hey Oliver

    I see you’ve updated cforms already! Legend work.

    Cheers,

    Alex

    @alexleonard comments seem to be working good now, perhaps was some problem at the host. I’m glad olivers solved the problem.

    @olivers yes, when including external scripts in TinyMCE plugins it’s a good idea to check if they are actually loaded/functions and vars defined, etc. Easiest is

    if ( typeof myvar != 'undefined' )
    do_something...

    and if it fails, return an empty string or object so TinyMCE continues to load.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: TinyMCE Advanced] Plugin Conflicts (appears I can’t comment on laptoptips.ca)’ is closed to new replies.