qtranslate-xt icon indicating copy to clipboard operation
qtranslate-xt copied to clipboard

Editor Mode Langiage Switching Buttons missing

Open schalkjoubert opened this issue 2 years ago • 1 comments

Since version 3.12.1, the language Switching buttons are missing, even though that is selected under Editor Mode Instead the Simple Language Mode is used.

If I revert back to 3.12.0, the buttons show, but then the front en display both language with theur tags, ie.

:en]The family’s philosophy is structured around a simple principle: selecting the best terroir and partners: Sancerre and Provence in France, Stellenbosch in South Africa and Sicily in Italy, relying on local expertise in each of these estates.[:]

This only happens for custom fields on Options Pages. Standard wordpress Pages and Post do however display the buttons.

Please see screenshots attached, Thank you qtranslate Domains_–_Oddo_Vins___Domaines

schalkjoubert avatar Oct 12 '22 08:10 schalkjoubert

This only happens for custom fields on Options Pages.

What do you mean with Option Pages, which one? How did you configure the Field Group to be active on such pages?

As a side note - with ACF 6 there's a brand new UI and I can't find the language buttons for the Field Group Title for example, this seems broken... But it's another problem, better create separate issues.

image

herrvigg avatar Oct 18 '22 22:10 herrvigg

I created an Option page for each of my main "Features", and then in ACF set the Rule to Options. I prefer to work this way to simplify he UI for the client. They don't have to go to pages then. See attached screenshots.

`if( function_exists('acf_add_options_page') ) { acf_add_options_page(array( 'page_title' => 'Domain', 'menu_title' => 'Domain', 'menu_slug' => 'tsum-domain', 'capability' => 'edit_posts', 'redirect' => false, 'icon_url' => 'dashicons-awards', // 'position' => 2, )); }

add_action( 'storefront_before_content', 'tsum_before_content_domain_header', 1 ); function tsum_before_content_domain_header () { if( is_page(array('domains','domaines')) ) : ?>

schalkjoubert avatar Oct 21 '22 04:10 schalkjoubert

WP Dash Screenshot acf-domain

schalkjoubert avatar Oct 21 '22 04:10 schalkjoubert

The options page are only available in the PRO version that I don't have 😕 https://www.advancedcustomfields.com/add-ons/options-page/ There used to be a free addon plugin just for the options page... but obviously they have removed it - how annoying 😞
Ideally I should have a copy of ACF PRO for debugging, But can't this addon plugin be retrieved somewhere?

herrvigg avatar Nov 05 '22 11:11 herrvigg

Since version 3.12.1, the language Switching buttons are missing, even though that is selected under Editor Mode Instead the Simple Language Mode is used. If I revert back to 3.12.0, the buttons show, but then the front en display both language with theur tags

Between 3.12.0 and 3.1.22.1 I refactored the ACF structure in #1191 but it was supposed to maintain all the existing functionalities. What is surprising is that you also had issues in 3.12.0. Has this page already worked before?

@ChristophJeworutzki do you observe the same problem? Did it work with 3.12.0, and if not, did it work before?

herrvigg avatar Nov 05 '22 11:11 herrvigg

@schalkjoubert @ChristophJeworutzki I found the problem with the LSB in ACF options page, it was a regression in 3.12.1 with the init sequence, now fixed in master. I don't know about the problem on the front-end with the tags, I expect it to work normally. Could you test the current version on master?

Note there's a known problem with ACF 6 for the field group name but that's another topic, see #1227.

herrvigg avatar Nov 13 '22 22:11 herrvigg

Strange, why is this working for me?

WP 6.1.1 (Twenty Twenty-One) ACF PRO 6.0.4 / 6.0.5 (Option page) QTX 3.12.1

Edge, Firefox

MKRD-SUPPORT avatar Nov 19 '22 20:11 MKRD-SUPPORT

Strange indeed, but the fix from 7a660fe6bd1fefd83b858a1c506618639e08006a is needed. Before that, the QTX_Module_Acf_Admin would be initialized too late on plugins_loaded priority 3. It sets a qtranslate_admin_config filter but this is needed in qtranslate_init_language called first on plugins_loaded priority 2 and the result is cached in a static variable... This init sequence is quite tricky. If it works without that fix there must be something else that changes that regular scenario.

herrvigg avatar Nov 19 '22 22:11 herrvigg

Many ACF fixes released in 3.13.0.

herrvigg avatar Dec 23 '22 10:12 herrvigg