Woocommerce issue in Product Description editor
-
Hi when I enable this plugin, in Woocommerce products, the product description field editor is missing features and it won’t accept shortcodes anymore. See the screenshots here :
without mqtranslate (normal) :
https://hijabmag.com/wp-content/themes/socute-child/mqtranslatewoocommerce.PNGwith mqtranslate (issue) :
https://hijabmag.com/wp-content/themes/socute-child/mqtranslatewoocommerceissue.PNG
-
Hoping for a fast resolution, here is the html code with the plugin (issue)
<div id="postexcerpt" class="postbox "> <div class="handlediv" title="Cliquer pour inverser."><br></div><div class="mqtranslate_lang_div" id="qtrans_switcher_postexcerpt_fr"><img alt="fr" title="Fran?ais" src="https://hijabmag.com/wp-content/plugins/mqtranslate/flags/fr.png"></div><div class="mqtranslate_lang_div" id="qtrans_switcher_postexcerpt_en"><img alt="en" title="English" src="https://hijabmag.com/wp-content/plugins/mqtranslate/flags/gb.png"></div><h3 class="hndle"><span>Description courte du produit</span></h3> <div class="inside"> <div id="wp-excerpt-wrap" class="wp-core-ui wp-editor-wrap html-active"><style>#wp-excerpt-editor-container .wp-editor-area{height:175px; width:100%;}</style> <div id="wp-excerpt-editor-tools" class="wp-editor-tools hide-if-no-js"><div id="wp-excerpt-media-buttons" class="wp-media-buttons"><a href="#" id="insert-media-button" class="button insert-media add_media" data-editor="excerpt" title="Ajouter un média"><span class="wp-media-buttons-icon"></span> Ajouter un média</a><a id="add_shortcode" style="display:none" href="https://hijabmag.com/wp-content/themes/socute/core/templates/admin/tinymce/lightbox.php?post_id=1197&TB_iframe=1&width=640&height=205" class="hide-if-no-js thickbox" title="Add shortcode"><img src="https://hijabmag.com/wp-content/themes/socute/core/assets/images/tinymce/icon_shortcodes.png" alt="Add Shortcode"></a></div> <div class="wp-editor-tabs"><a id="excerpt-html" class="wp-switch-editor switch-html" onclick="switchEditors.switchto(this);">Texte</a> <a id="excerpt-tmce" class="wp-switch-editor switch-tmce" onclick="switchEditors.switchto(this);">Visuel</a> </div> </div> <div id="wp-excerpt-editor-container" class="wp-editor-container"><div id="mce_23" class="mce-tinymce mce-container mce-panel" hidefocus="1" tabindex="-1" role="application" style="visibility: hidden; border-width: 1px; display: none;"><div id="mce_23-body" class="mce-container-body mce-stack-layout"><div id="mce_24" class="mce-toolbar-grp mce-container mce-panel mce-first mce-stack-layout-item" hidefocus="1" tabindex="-1" role="group"><div id="mce_24-body" class="mce-container-body mce-stack-layout"><div id="mce_25" class="mce-container mce-toolbar mce-first mce-stack-layout-item" role="toolbar"><div id="mce_25-body" class="mce-container-body mce-flow-layout"><div id="mce_26" class="mce-container mce-first mce-flow-layout-item mce-btn-group" role="group"><div id="mce_26-body"><div id="mce_5" class="mce-widget mce-btn mce-first" tabindex="-1" aria-labelledby="mce_5" role="button" aria-label="Bold"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-bold"></i></button></div><div id="mce_6" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_6" role="button" aria-label="Italic"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-italic"></i></button></div><div id="mce_7" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_7" role="button" aria-label="Strikethrough"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-strikethrough"></i></button></div><div id="mce_8" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_8" role="button" aria-label="Bullet list"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-bullist"></i></button></div><div id="mce_9" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_9" role="button" aria-label="Numbered list"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-numlist"></i></button></div><div id="mce_10" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_10" role="button" aria-label="Blockquote"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-blockquote"></i></button></div><div id="mce_11" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_11" role="button" aria-label="Insert horizontal rule"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-hr"></i></button></div><div id="mce_12" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_12" role="button" aria-label="Align left"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-alignleft"></i></button></div><div id="mce_13" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_13" role="button" aria-label="Align center"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-aligncenter"></i></button></div><div id="mce_14" class="mce-widget mce-btn mce-last" tabindex="-1" aria-labelledby="mce_14" role="button" aria-label="Align right"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-alignright"></i></button></div></div></div><div id="mce_27" class="mce-container mce-flow-layout-item mce-btn-group" role="group"><div id="mce_27-body"></div></div><div id="mce_28" class="mce-container mce-last mce-flow-layout-item mce-btn-group" role="group"><div id="mce_28-body"></div></div></div></div><div id="mce_29" class="mce-container mce-toolbar mce-last mce-stack-layout-item" role="toolbar"><div id="mce_29-body" class="mce-container-body mce-flow-layout"><div id="mce_30" class="mce-container mce-first mce-last mce-flow-layout-item mce-btn-group" role="group"><div id="mce_30-body"><div id="mce_15" class="mce-widget mce-btn mce-menubtn mce-fixed-width mce-listbox mce-first" tabindex="-1" aria-labelledby="mce_15" role="button" aria-haspopup="true"><button id="mce_15-open" role="presentation" type="button" tabindex="-1"><span>Paragraphe</span> <i class="mce-caret"></i></button></div><div id="mce_16" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_16" role="button" aria-label="Underline"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-underline"></i></button></div><div id="mce_17" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_17" role="button" aria-label="Justify"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-alignjustify"></i></button></div><div id="mce_18" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_18" role="button" aria-label="Clear formatting"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-removeformat"></i></button></div><div id="mce_19" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_19" role="button" aria-label="Decrease indent"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-outdent"></i></button></div><div id="mce_20" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mce_20" role="button" aria-label="Increase indent"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-indent"></i></button></div><div id="mce_21" class="mce-widget mce-btn mce-disabled" tabindex="-1" aria-labelledby="mce_21" role="button" aria-label="Undo" aria-disabled="true"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-undo"></i></button></div><div id="mce_22" class="mce-widget mce-btn mce-last mce-disabled" tabindex="-1" aria-labelledby="mce_22" role="button" aria-label="Redo" aria-disabled="true"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-redo"></i></button></div></div></div></div></div></div></div><div id="mce_31" class="mce-edit-area mce-container mce-panel mce-stack-layout-item" hidefocus="1" tabindex="-1" role="group" style="border-width: 1px 0px 0px;"><iframe id="excerpt_ifr" src='javascript:""' frameborder="0" allowtransparency="true" title="Zone de texte enrichi. Appuyer sur ALT-F9 pour accéder au menu. Appuyer sur ALT-F10 pour accéder à la barre d’outils. Appuyer sur ALT-0 pour l’aide." style="width: 100%; height: 100px; display: block;"></iframe></div><div id="mce_32" class="mce-statusbar mce-container mce-panel mce-last mce-stack-layout-item" hidefocus="1" tabindex="-1" role="group" style="border-width: 1px 0px 0px;"><div id="mce_32-body" class="mce-container-body mce-flow-layout"><div id="mce_33" class="mce-path mce-first mce-flow-layout-item"><div role="button" class="mce-path-item mce-last" data-index="0" tabindex="-1" id="mce_33-0" aria-level="0">p</div></div><div id="mce_34" class="mce-last mce-flow-layout-item mce-resizehandle"><i class="mce-ico mce-i-resize"></i></div></div></div></div></div><textarea class="wp-editor-area" rows="20" autocomplete="off" cols="40" name="excerpt" id="excerpt" style="display: none;" aria-hidden="true"></textarea><textarea name="qtrans_textarea_excerpt_fr" id="qtrans_textarea_excerpt_fr" cols="40" rows="20" style="display: inline-block;"></textarea><textarea name="qtrans_textarea_excerpt_en" id="qtrans_textarea_excerpt_en" cols="40" rows="20" style="display: none;"></textarea></div> <div class="uploader-editor"> <div class="uploader-editor-content"> <div class="uploader-editor-title">Déposez vos fichiers pour les mettre en ligne</div> </div> </div></div> </div> </div>
Here is the code without the plugin :
<div id="postexcerpt" class="postbox "> <div class="handlediv" title="Cliquer pour inverser."><br></div><h3 class="hndle"><span>Description courte du produit</span></h3> <div class="inside"> <div id="wp-excerpt-wrap" class="wp-core-ui wp-editor-wrap html-active"><style>#wp-excerpt-editor-container .wp-editor-area{height:175px; width:100%;}</style> <div id="wp-excerpt-editor-tools" class="wp-editor-tools hide-if-no-js"><div id="wp-excerpt-media-buttons" class="wp-media-buttons"><a href="#" id="insert-media-button" class="button insert-media add_media" data-editor="excerpt" title="Ajouter un média"><span class="wp-media-buttons-icon"></span> Ajouter un média</a><a id="add_shortcode" style="display:none" href="https://test.hijabmag.com/wp-content/themes/socute/core/templates/admin/tinymce/lightbox.php?post_id=1175&TB_iframe=1&width=640&height=205" class="hide-if-no-js thickbox" title="Add shortcode"><img src="https://test.hijabmag.com/wp-content/themes/socute/core/assets/images/tinymce/icon_shortcodes.png" alt="Add Shortcode"></a></div> <div class="wp-editor-tabs"><a id="excerpt-html" class="wp-switch-editor switch-html" onclick="switchEditors.switchto(this);">Texte</a> <a id="excerpt-tmce" class="wp-switch-editor switch-tmce" onclick="switchEditors.switchto(this);">Visuel</a> </div> </div> <div id="wp-excerpt-editor-container" class="wp-editor-container"><div id="qt_excerpt_toolbar" class="quicktags-toolbar"><input type="button" id="qt_excerpt_strong" accesskey="b" class="ed_button button button-small" title="" value="b"><input type="button" id="qt_excerpt_em" accesskey="i" class="ed_button button button-small" title="" value="i"><input type="button" id="qt_excerpt_link" accesskey="a" class="ed_button button button-small" title="" value="link"><input type="button" id="qt_excerpt_shortcodes" class="ed_button button button-small" title="" value="add shortcodes"></div><textarea class="wp-editor-area" rows="20" autocomplete="off" cols="40" name="excerpt" id="excerpt"></textarea></div> <div class="uploader-editor"> <div class="uploader-editor-content"> <div class="uploader-editor-title">Déposez vos fichiers pour les mettre en ligne</div> </div> </div></div> </div> </div>
I have a similar problem with the product short description / excerpt. It shows raw html text and changes to that field are not saved.
A workaround solution was to disable the visual editor globaly in my profile. But because I need the visual editor for other fields, I disabled tinymce for the excerpt editor:
woocommerce\includes\admin\post-types\meta-boxes\class-wc-meta-box-product-short-description.php
replace
'tinymce' => array( 'theme_advanced_buttons1' => 'bold,italic,strikethrough,separator,bullist,numlist,separator,blockquote,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,separator,undo,redo,separator', 'theme_advanced_buttons2' => '', )
with
'tinymce' => false,
thank you cj, I tried exactly what you wrote but when I do this it disables totally the short description, there is only the title but no box at all anymore. I think I will wait for mqtranslate to fix this issue before I translate my site ??
- The topic ‘Woocommerce issue in Product Description editor’ is closed to new replies.