Viewing 15 replies - 1 through 15 (of 17 total)
  • Same here. I can switch between WYSIWYG and HTML on the main content block, but not the added block – just HTML.

    For me, the tabs are broken (they don’t toggle), the tinymce buttons are missing, and content entered does not show up on the front end. (Pre-3.3 entered content continues to display on the front end.)

    I have a solution for this issue which seems to be working so far.

    Edit the plugin and find this section:

    echo '<textarea id="multiplecontent_box-'.$fieldName.'" tabindex="2" name="multiplecontent_box-'.$fieldName.'" cols="158" class="theEditor" rows="15">';
    			$content = get_post_meta($post->ID, '_ot_multiplecontent_box-'.$fieldName , true);
    			echo apply_filters('the_editor_content', $content);
    		echo '</textarea>';

    Replace it with the following:

    wp_editor( get_post_meta($post->ID, '_ot_multiplecontent_box-'.$fieldName , true), 'multiplecontent_box-'.$fieldName, $settings = array() );

    Just about that you’ll also see this:

    echo '<a id="edButtonHTML" class="hide-if-no-js" onclick="switchEditors.go(\'multiplecontent_box-'.$fieldName.'\', \'html\');">HTML</a><a id="edButtonPreview" class="active hide-if-no-js" onclick="switchEditors.go(\'multiplecontent_box-'.$fieldName.'\', \'tinymce\');">Wysiwyg</a>';

    Just comment it out like so:

    //echo '<a id="edButtonHTML" class="hide-if-no-js" onclick="switchEditors.go(\'multiplecontent_box-'.$fieldName.'\', \'html\');">HTML</a><a id="edButtonPreview" class="active hide-if-no-js" onclick="switchEditors.go(\'multiplecontent_box-'.$fieldName.'\', \'tinymce\');">Wysiwyg</a>';

    This replaces the old style editor with the new editor they’ve introduced in the new version. Again, I haven’t fully tested this implementation yet, but it seems to work for me so far ??

    That works great! Thanks, Under_Dog!

    That fixed the editor for me, however I still cannot publish new content or edit previous content and have it show on the front end.

    try the “Use Google Libraries’ plugin. made the tabs on editor work again for me.

    Thanks Under_Dog…. your solution works like treat!

    Plugin Author Trendwerk

    (@trendwerk)

    I’ve just updated the plugin with this solution, thanks Under_Dog!

    Thanks so much, Ontwerp. I discovered the cause of my problem with publishing and editing (which I coincidentally introduced around the time of the upgrade). Due to your lines 120 and 122, my line formatted as
    get_the_block( 'myblock' )
    was causing the problem. I removed the spaces so it reads
    get_the_block('myblock')
    and now everything works fine. Would you consider modifying those lines so they are not dependent on ones code formatting style?

    Plugin Author Trendwerk

    (@trendwerk)

    Done as well.

    It’s quite hard to interpret everybody’s coding style perfectly, but I also believe this was one that we should support.

    Sadly, it’s not possible to make them independant from one’s coding style, because I have to read and interpret the code in the template file.

    It baffles me that there’s still no support for additional content blocks in WP3.3, but this seems to be the only (plug-and-play) option.

    Thread Starter onetrev

    (@onetrev)

    Thanks for fixing this! And yes I totally agree, it is mind boggling with all the CMS advancements WP has made that there is no built in support for multiple content blocks.

    There is discussion on content blocks here: (https://www.ads-software.com/extend/ideas/topic/multiple-content-blocks) with people asking for it to be brought into WP, but amazingly it seems some core developers don’t think it is needed. Maybe if more folks can ask for content block support it will cause the core developers to re-think it.

    Thanks a million! I agree this needs to be core functionality. I’ll chime in on the discussion over there later. But in brief, I think that people who don’t think it should be core are people who don’t understand how we’re using this — cms style.

    Part of the confusion is terminology. It took me a very long time to find this plugin, because I was googling “different sidebar per page” and things like that. Which led to solutions using conditional sidbars, conditional widgets, etc. That doesn’t work for a site with 200 pages.

    Further complicating matters is WordPress’s use of “sidebar” to mean any area that is widget ready, whether it’s on the side or not.

    Hopefully, HTML5’s “aside” element will help developers understand The Nature of Content, while they work on an easy way for us to put our page-specific asides in, say, … the bar on the side…

    THis is still broken for me on latest wordpress, — I also have qTranslate installed in case that’s relevant.

    I looked at the code and see that the patch above is applied.

    The switch between html and visual doesn’t work on the individual blocks, but if i switch to HTML/VISUAL on the normal editor boxes (not multiple blocks ones) then update the page, ALL the editors will switch to html/visual at once (including multiple block)

    Here’s some debug:

    Uncaught TypeError: Cannot read property ‘value’ of null post.php:578
    switchEditors.go post.php:578
    switchEditors.switchto load-scripts.php:408
    onclick post.php:1066

    Looking at the code it appears to be qTranslate that replaces the language switch function but does not give the multiple languages functionality at the same time.

    If someone has an idea about how to make the two work together that would be amazing

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Plugin: Multiple content blocks] Editor tabs (Wysiwyg and HTML) broken’ is closed to new replies.