qtranslate / qtranslate-xt

qTranslate-XT (eXTended) - reviving qTranslate-X multilingual plugin for WordPress. A new community-driven plugin soon. Built-in modules for WooCommerce, ACF, slugs and others.
GNU General Public License v2.0
558 stars 107 forks source link

qtranslate-xt admin js not being loaded on certain ACF options pages #967

Closed hirasso closed 1 year ago

hirasso commented 3 years ago

Hi there!

I am registering an ACF options page like this:

// I have a custom post type 'product'
register_post_type('product', $args);
// And I am adding an option page as a child of this post type
acf_add_options_page([
  'page_title' => __('Product Options', 'rhseo'),
  'menu_slug' => 'options--product',
  'post_id' => 'options--product', 
  'parent_slug' => "edit.php?post_type=product", // <-- This puts the options page underneath the post type in the admin
]);

image

See the third Submenu item? This is my custom ACF options page.

This all works great, except that the qtranslate language switcher scripts are not being loaded, so I can't switch the language on this page. Could you look into this?

herrvigg commented 3 years ago

Sorry i won't have time to investigate more on this. The ACF part with Javascript is more complex than for the other plugins but this should be possible to do.

Tusko commented 3 years ago

+1

any suggestions?

Tusko commented 3 years ago

added i18n config file in my plugin. @herrvigg please check

https://uk.wordpress.org/plugins/acf-cpt-options-pages/

RublikFun commented 2 years ago

+1

the language switcher is missing on ACF Options Page :( and language tabs at fields don't work

WP V6.0 ACF PRO V5.12.2 qTranslate-XT V3.12.0

bichonnages commented 2 years ago

+1

Any clue?

herrvigg commented 1 year ago

I think this is solved by the last changes in master mentioned in #1233. A bit unclear why it didn't work with 3.12.0, there was a regression with 3.12.1. Please try with the master branch a report any issue with ACF custom options pages in #1233. There will be a new release soon.