WordPress.org

Ready to get started?Download WordPress

Forums

WYSIWYG Widgets / Widget Blocks
[Plugin: WYSIWYG Widgets] Fix for WordPress 3.3.1 (23 posts)

  1. skyer2000
    Member
    Posted 2 years ago #

    Here is a fix to get the editor working on the latest version of WordPress:

    Open /wp-content/plugins/wysiwyg-widgets/backend/js/wysiwyg-widgets.js

    Insert new line about line 75 (tinyMCE.execCommand("mceAddControl", false, id);)

    tinyMCE.init({ mode : "exact", theme : "advanced", theme_advanced_toolbar_location : "top" });

    So that code block should now read as:

    activate_editor : function (id) {
            jQuery('#'+id).addClass("mceEditor");
            if ( typeof( tinyMCE ) == "object" && typeof( tinyMCE.execCommand ) == "function" ) {
                WYSIWYG_Widgets.deactivate_editor(id);
                tinyMCE.init({ mode : "exact", theme : "advanced", theme_advanced_toolbar_location : "top" });
                tinyMCE.execCommand("mceAddControl", false, id);
            }
        },

    http://wordpress.org/extend/plugins/wysiwyg-widgets/

  2. Danny van Kooten
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks a lot Skyer, I've implemented this in 1.1.2 as a "temporary" fix for usage with WP 3.3+.

    I have been crazy busy in the last few weeks but hope to commit a complete fix real soon. Sorry for the inconvenience.

  3. skyer2000
    Member
    Posted 2 years ago #

    There is no such thing as inconvenience when you are donating your time to begin with! Thank you.

  4. mssbee
    Member
    Posted 2 years ago #

    Thanks Danny and Skyer. I love this plugin and my clients love it too! I appreciate the update.

  5. Marcel Bootsman
    Member
    Posted 2 years ago #

    Hmm, this code is in the 1.1.2 release of the plugin, but this doesn't solve te problem on WordPress 3.3.1.

  6. tisi
    Member
    Posted 2 years ago #

    yes indeed, the fix doesn't solve the problem :-/

  7. Travis Northcutt
    Member
    Posted 2 years ago #

    Same here, doesn't fix it.

  8. skyer2000
    Member
    Posted 2 years ago #

    I updated to 1.1.2 but it broke the plugin. I rolled back to 1.1.1 and manually applied the fix, and it's back to working again.

  9. Danny van Kooten
    Member
    Plugin Author

    Posted 2 years ago #

    Finally found some time to tackle this one, hopefully. WYSIWYG Widgets version 1.2 is there, which should be fully compatible with WP3.3.

  10. Marcel Bootsman
    Member
    Posted 2 years ago #

    Good job Danny! Thanks.

  11. TheWatcher2
    Member
    Posted 2 years ago #

    My version of the WYSIWYG Widgets editor (v1.2) already has the recommended fix in the plugin location /wysiwyg-widgets/backend/js/old.js, but in /wysiwyg-widgets/backend/js/wysiwyg-widgets.js there is no such line of code. Please be more specific in how to implement this fix, as the widget doesn't work as described when using WP 3.3.1.

    Thanks,
    Greg

  12. Marcel Bootsman
    Member
    Posted 2 years ago #

    I'm having the following problem.

    When I drag a WYSIWYG Widget to a sidebar, the editor cannot be used. Title can be used only. After a save and a refresh the widget can be used.
    I have made a screen recording of the behaviour.

    http://screenr.com/aWys

  13. jeffvand
    Member
    Posted 2 years ago #

    I am also still having problems with this. I am running 3.3.1 and the latest version 1.2, but still having the strange behavior when dragging it over and not being able to edit the content.

    If I save it and then refresh the widget sidebar it works fine. It is just that initial activation that seems to not be working.

    I'm not sure if I should try and implement the code above. Thoughts, suggestions? Thanks!

  14. jacwest
    Member
    Posted 2 years ago #

    I'm also running 3.3.1 and the fix mentioned above is not solving anything. I suggest removing the status resolved on this post until it's fixed.

  15. Ovidiu
    Member
    Posted 2 years ago #

    Same problem here, I thought it had to do with another widget and that widget author gave a good hint here: http://wordpress.org/support/topic/plugin-dynamic-widgets-possible-conflict-with-another-plugin

  16. d3sd3v
    Member
    Posted 2 years ago #

    !!It works so far for me, but use with caution!!

    Many thanks to Ovidiu and Qurl - they pinpointed the issue.

    FILE: frontend\WYSIWYG_Widgets_Widget.php

    Comment out lines 6-11.
    Add the following code beginning on line 12:

    public function __construct() {
    	parent::__construct(
    		'wysiwyg_widget', // Base ID
    		'WYSIWYG Widget', // Name
    		array( 'description' => __( 'A widget with a WYSIWYG / Rich Text editor - supports media uploading', 'text_domain' ), ) // Args
    		array('width' => 560, 'height' => 400) //size
    	);
    }

    edited 30 min later - forgot to set the size, rendering the WYSIWYG hard to use, since half of it was hidden. Fixed in code above

  17. Ovidiu
    Member
    Posted 2 years ago #

    I must be doing something wrong because if I edit that file as you said, I get this error:

    [Tue Apr 24 19:51:56 2012] [warn] [client 196.215.129.45] mod_fcgid: stderr: PHP Parse error: syntax error, unexpected T_ARRAY in /var/www/clients/client20/web36/web/wp-content/plugins/wysiwyg-widgets/frontend/WYSIWYG_Widgets_Widget.php on line 17, referer: https://www.premaman.co.za/wp-admin/widgets.php

    This is how my file looks after editing:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

  18. d3sd3v
    Member
    Posted 2 years ago #

    I can't see any immediate difference between your snippet and mine, beyond commenting method (which really shouldn't matter)

    If you'd like, I can send you the full file Ovidiu?

  19. Ovidiu
    Member
    Posted 2 years ago #

    can you post it onto pastebin.com please?
    I'd really appreciate that.

  20. d3sd3v
    Member
    Posted 2 years ago #

    Absolutely. My apologies for not doing that in the first place :)

    http://pastebin.com/ysAS14E1

  21. Ovidiu
    Member
    Posted 2 years ago #

    thanks. no mroe errors but it is only partially working for me: it doesn't collapse anymore but I can only use the HTMl editor, not the visual editor.
    good enough for the time being :-)

    Thanks for helping out!

  22. d3sd3v
    Member
    Posted 2 years ago #

    Were you running the most recent version of this plugin, before the edits, Ovidiu?

    I started with v1.2, on the off-chance this is the difference in results between your site and mine.

  23. Ovidiu
    Member
    Posted 2 years ago #

    1.2 here as well, but as you can see I have this thread and the other one linked above where I mentioned some probs. So it might as well be the other plugin interfering.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic