• Resolved jorisidis

    (@jorisidis)


    I have a problem that the custom tabs use to save multilanguages. Now it shows multilanguages of previous saved products. But when I save one of the only the currently shown language is saved.
    I figured that the tab is saved without any language tags what makes that the languages are lost/the same for all languages.

    Why does this happen and what can I do to fix it?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @jorisidis,

    Which translation/language plugin are you using?

    If your screen is showing older tab translations for new tabs, it might be that the old tab translations are cached. Do you have any caching plugin or way to flush your translation plugins cache?

    Let me know.

    Cheers,
    Kevin.

    Thread Starter jorisidis

    (@jorisidis)

    Hello @yikesitskevin

    We use qTranslate-X.

    The backend/wp-admin environment is not cached and there is where it goes wrong. It loads all data from the database correctly. But as soon as I press the save tabs button only one language is saved. But the editor shows all different translations upto a reload of the editor, then it reloads the saved data from the database which is only one language.

    Best regards,
    Joris

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi Joris,

    I’m not familiar with qTranslate-X or how the content is supposed to be inputted into the editor for qTranslate-X.

    Do you enter content into a saved tab’s editor in multiple languages? Do you translate the content in another place provided by qTranslate-X?

    Can you send a sample of what you’re trying to save to the database and explain to me where you enter this content?

    Thank you,
    Kevin.

    Thread Starter jorisidis

    (@jorisidis)

    Hello Kevin,

    The qTranslate-X plugin makes multiple language buttons which make it possible to switch between language. The plugin loads the wright language content in the textarea when you change the language.
    When you press save it should take all content concatenate it with tags ex: [:nl]content dutch[:en]content english[:fr]content french[:]
    Somehow the data sent back to the server is only the content of the textarea and not the concatinated content with tags.

    Example:
    I try to have the following show on the tab:
    Dutch: 1
    English: 2
    French: 3

    <div id="yikes_woocommerce_custom_product_tabs" class="panel wc-metaboxes-wrapper woocommerce_options_panel" style="display: block;"><div class="options_group"><div class="yikes-woo-tabs-hidden-how-to-info"><p class="yikes_woo_how_to_info">For help using Custom Tabs please visit our <a href="https://yikesplugins.com/support/knowledge-base/product/easy-custom-product-tabs-for-woocommerce/" target="_blank">Knowledge Base</a></p></div><div id="yikes-woo-help-me-icon" class="dashicons dashicons-editor-help yikes-tabs-how-to-toggle" title="Help Me!"></div><p class="form-field _yikes_wc_custom_repeatable_product_tabs_tab_title_1_field ">
    		<label for="_yikes_wc_custom_repeatable_product_tabs_tab_title_1">Tab Title</label><input type="text" class="yikes_woo_tabs_title_field" style="" name="_yikes_wc_custom_repeatable_product_tabs_tab_title_1" id="_yikes_wc_custom_repeatable_product_tabs_tab_title_1" value="[:nl]Downloads[:en]Downloads[:fr]Téléchargements[:]" placeholder="Custom Tab Title"> </p><div class="form-field-tinymce _yikes_wc_custom_repeatable_product_tabs_tab_content_field _yikes_wc_custom_repeatable_product_tabs_tab_content_1_field"><div id="wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_1-wrap" class="wp-core-ui wp-editor-wrap html-active"><div id="wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_1-editor-tools" class="wp-editor-tools hide-if-no-js"><div id="wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_1-media-buttons" class="wp-media-buttons"><button type="button" class="button insert-media add_media" data-editor="_yikes_wc_custom_repeatable_product_tabs_tab_content_1"><span class="wp-media-buttons-icon"></span> Media toevoegen</button></div>
    <div class="wp-editor-tabs"><button type="button" id="_yikes_wc_custom_repeatable_product_tabs_tab_content_1-tmce" class="wp-switch-editor switch-tmce" data-wp-editor-id="_yikes_wc_custom_repeatable_product_tabs_tab_content_1">Visueel</button>
    <button type="button" id="_yikes_wc_custom_repeatable_product_tabs_tab_content_1-html" class="wp-switch-editor switch-html" data-wp-editor-id="_yikes_wc_custom_repeatable_product_tabs_tab_content_1">Tekst</button>
    </div>
    </div>
    <div id="wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_1-editor-container" class="wp-editor-container"><div id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_toolbar" class="quicktags-toolbar"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_strong" class="ed_button button button-small" aria-label="Vet" value="b"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_em" class="ed_button button button-small" aria-label="Cursief" value="i"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_link" class="ed_button button button-small" aria-label="Link invoegen" value="link"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_block" class="ed_button button button-small" aria-label="Blockquote" value="b-quote"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_del" class="ed_button button button-small" aria-label="Verwijderde tekst (doorgestreept)" value="del"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_ins" class="ed_button button button-small" aria-label="Ingevoegde tekst" value="ins"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_img" class="ed_button button button-small" aria-label="Afbeelding invoegen" value="img"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_ul" class="ed_button button button-small" aria-label="Opsommingslijst" value="ul"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_ol" class="ed_button button button-small" aria-label="Genummerde lijst" value="ol"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_li" class="ed_button button button-small" aria-label="Lijstitem" value="li"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_code" class="ed_button button button-small" aria-label="Code" value="code"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_more" class="ed_button button button-small" aria-label="Lees-meer-tag invoegen" value="more"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_close" class="ed_button button button-small" title="Alle open tags sluiten" value="tags sluiten"><input type="button" id="qt__yikes_wc_custom_repeatable_product_tabs_tab_content_1_fusion_shortcodes_text_mode" class="ed_button button button-small" value=" "></div><input name="qtranslate-fields[_yikes_wc_custom_repeatable_product_tabs_tab_content_1][nl]" type="hidden" class="hidden" value="1"><input name="qtranslate-fields[_yikes_wc_custom_repeatable_product_tabs_tab_content_1][en]" type="hidden" class="hidden" value="2"><input name="qtranslate-fields[_yikes_wc_custom_repeatable_product_tabs_tab_content_1][fr]" type="hidden" class="hidden" value="3"><input name="qtranslate-fields[_yikes_wc_custom_repeatable_product_tabs_tab_content_1][qtranslate-separator]" type="hidden" class="hidden" value="["><textarea class="wp-editor-area qtranxs-translatable yikes_woo_custom_editor_styles" rows="20" autocomplete="off" cols="40" name="_yikes_wc_custom_repeatable_product_tabs_tab_content_1" id="_yikes_wc_custom_repeatable_product_tabs_tab_content_1">3</textarea></div>
    <div class="uploader-editor">
    		<div class="uploader-editor-content">
    			<div class="uploader-editor-title">Sleep bestanden om te uploaden</div>
    		</div>
    	</div></div>
    
    </div><section class="button-holder" alt="1"><p class="yikes_wc_override_reusable_tab_container" id="_yikes_wc_override_reusable_tab_container_1" style="display: none;"><input type="checkbox" class="_yikes_wc_override_reusable_tab" id="_yikes_wc_override_reusable_tab_1" data-tab-number="1" title="Check this box to override the saved tab"><label id="_yikes_wc_override_reusable_tab_label_1" for="_yikes_wc_override_reusable_tab_1" class="_yikes_wc_override_reusable_tab_label"> Override Saved Tab</label><input type="hidden" name="_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_1_action" class="_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_action" id="_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_1_action" value="none"><input type="hidden" name="_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_1" class="_yikes_wc_custom_repeatable_product_tabs_saved_tab_id" id="_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_1" value=""></p><div class="yikes_wc_move_tab_container"><p class="yikes_wc_move_tab">Move tab order</p><span class="dashicons dashicons-arrow-up move-tab-data-up"></span><span class="dashicons dashicons-arrow-down move-tab-data-down"></span></div><a href="#" onclick="return false;" class="button-secondary remove_this_tab"><span class="dashicons dashicons-no-alt"></span>Remove Tab</a></section><div id="duplicate_this_row"><p class="form-field hidden_duplicator_row_title_field ">
    		<label for="hidden_duplicator_row_title">Tab Title</label><input type="text" class="yikes_woo_tabs_title_field yikes_woo_tabs_title_field_duplicate" style="" name="hidden_duplicator_row_title" id="hidden_duplicator_row_title" value="" placeholder="Custom Tab Title"> </p><p class="form-field-tinymce hidden_duplicator_row_content_field">       <textarea class="yikes_woo_tabs_content_field" name="hidden_duplicator_row_content" id="hidden_duplicator_row_content" placeholder="HTML and text to display." rows="2" cols="20" style="width:100%; min-height:10rem;"></textarea> </p><section class="button-holder" alt=""><p class="yikes_wc_override_reusable_tab_container _yikes_wc_override_reusable_tab_container_duplicate" id="_yikes_wc_override_reusable_tab_container_duplicate" style="display: none;"><input type="checkbox" class="_yikes_wc_override_reusable_tab" id="_yikes_wc_override_reusable_tab_duplicate" title="Check this box to override the saved tab"><label class="_yikes_wc_override_reusable_tab_label_duplicate">Override Saved Tab</label><input type="hidden" class="_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_action" id="_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_action_duplicate" value="none"><input type="hidden" class="_yikes_wc_custom_repeatable_product_tabs_saved_tab_id" id="_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_duplicate" value=""></p><div class="yikes_wc_move_tab_container"><p class="yikes_wc_move_tab">Move tab order</p><span class="dashicons dashicons-arrow-up move-tab-data-up"></span><span class="dashicons dashicons-arrow-down move-tab-data-down"></span></div><a href="#" onclick="return false;" class="button-secondary remove_this_tab"><span class="dashicons dashicons-no-alt"></span>Remove Tab</a></section></div><div class="add_tabs_container "><span id="yikes_woo_ajax_save_feedback"></span><a href="#" class="button-secondary _yikes_wc_add_tabs" id="add_another_tab"><i class="dashicons dashicons-plus-alt inline-button-dashicons"></i>Add a Tab</a><span class="yikes_wc_apply_reusable_tab_container"><span class="button-secondary _yikes_wc_apply_a_saved_tab _yikes_wc_add_tabs" id="_yikes_wc_apply_a_saved_tab"><i class="dashicons  dashicons-plus-alt inline-button-dashicons"></i>Add a Saved Tab</span></span><input name="save" class="button button-primary" id="yikes_woo_save_custom_tabs" value="Save Tabs" type="button"></div><input type="hidden" value="1" id="number_of_tabs" name="number_of_tabs"></div></div>

    When I push the save button the following data is send to the server:
    action:yikes_woo_save_product_tabs
    post_id:4543
    number_of_tabs:1
    security_nonce:d17ae72a43
    _yikes_wc_custom_repeatable_product_tabs_tab_title_1:[:nl]Downloads[:en]Downloads[:fr]Téléchargements[:]
    _yikes_wc_custom_repeatable_product_tabs_tab_content_1:1
    _yikes_wc_custom_repeatable_product_tabs_saved_tab_id_1:
    _yikes_wc_custom_repeatable_product_tabs_saved_tab_id_1_action:none

    Here I would expect that the tab content would be language tagged.

    I hope this example helps…

    Best regards,
    Joris

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Joris,

    Thank you for that explanation.

    I think the problem is that qTranslate-x has two different components for saving translations. They hook into the editor to add their translation buttons and most likely hook into the action that saves a post to handle the concatenation.

    Our saved tabs are not posts; they are a custom entity we created. I think that’s where the problem arises.

    I’ve read just the home page of the plugin’s WordPress.org page and I see this note:

    In-line syntax ‘[:en]English Text[:de]Deutsch[:]‘ or ‘<!–:en–>English Text<!–:–><!–:de–>Deutsch<!–:–>‘ for theme-custom fields gets them translated – See FAQ for more information.

    I think you will have to treat our saved tabs like custom theme fields and manually input the translation tags. Can you try that?

    Thank you & apologies for the inconvenience.

    All the best,
    Kevin.

    Thread Starter jorisidis

    (@jorisidis)

    Hello Kevin,

    The weird thing is that it worked before. I do not know what has changed that broke it.
    I do also see that the plugin has not been updated for 2 years. Maybe it is time to move to a different plugin, as we have to invest time to get this sorted..

    Best regards,
    Joris

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi Joris,

    Do you know of any plugin updates that occurred over the past few weeks? (Or since the translations stopped working?)

    There was a core update last week – did you upgrade to that?

    The plugin is old but we haven’t pushed any plugin updates for a while so it must be a theme/WordPress Core/plugin conflict that caused it to stop working. You could check for plugin updates by disabling plugins one by one (it’s a pain, sorry, I know).

    Alternatively, you could try a different plugin. We’re compatible with WPML and are trying to increase that compatibility at the moment.

    Naturally you should do what you think is best though.

    Let me know if you need any more help.

    Cheers,
    Kevin.

    Thread Starter jorisidis

    (@jorisidis)

    Hello Kevin,

    We have moved to a different server. I found out that if you do not use the save tab button, but the update page button it does work. Than all hidden input fields get parsed, concatenated and saved properly. So it seams to be a partial user fault.

    I read that you can make an integration by adding i18n-config.json file to the plugin in which you define which elements the qTranslate plugin has to hook-on to and which functions should be handled.

    Best regards,
    Joris

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi Joris,

    That makes perfect sense – qTranslate-X is relying on the post’s “save” actions that get fired when the post (product) is updated.

    I hope this is a workable solution for you.

    All the best,
    Kevin.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘multilanguage’ is closed to new replies.