• In 6.7 a new notice was added Function load_plugin_textdomain was called incorrectly. This notice now appears also when the plugins_loaded is used to call load_plugin_textdomain. I have tested with other hooks (including after_setup_theme), and the translations do not load.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator James Huff

    (@macmanx)

    Same problem here with WP 6.7 beta 1. Many plugins throw the same warning:

    Notice: Function load_plugin_textdomain was called incorrectly. Attempted to load translations for the ultimate-category-excluder domain too early. Translations should be loaded after the after_setup_theme action has fired, to ensure that the current user is already set up. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in xxxxx\wp-includes\functions.php on line 6099

    Notice: Function load_plugin_textdomain was called incorrectly. Attempted to load translations for the wp-statistics domain too early. Translations should be loaded after the after_setup_theme action has fired, to ensure that the current user is already set up. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in xxxxx\wp-includes\functions.php on line 6099

    Notice: Function load_plugin_textdomain was called incorrectly. Attempted to load translations for the autodescription domain too early. Translations should be loaded after the after_setup_theme action has fired, to ensure that the current user is already set up. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in xxxxx\wp-includes\functions.php on line 6099

    Notice: Function load_plugin_textdomain was called incorrectly. Attempted to load translations for the blacklist-updater domain too early. Translations should be loaded after the after_setup_theme action has fired, to ensure that the current user is already set up. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in xxxxx\wp-includes\functions.php on line 6099

    Notice: Function load_plugin_textdomain was called incorrectly. Attempted to load translations for the limit-login-attempts-reloaded domain too early. Translations should be loaded after the after_setup_theme action has fired, to ensure that the current user is already set up. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in xxxxx\wp-includes\functions.php on line 6099

    Notice: Function load_plugin_textdomain was called incorrectly. Attempted to load translations for the polylang domain too early. Translations should be loaded after the after_setup_theme action has fired, to ensure that the current user is already set up. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in xxxxx\wp-includes\functions.php on line 6099

    Thread Starter Iulia Cazan

    (@iulia-cazan)

    @leemon, I marked it as resolved because it makes sense we are updating the hooks in our code.
    Initially I did switch to using after_setup_theme hook, and it did not work, the translations were not picked up. After playing with the hook priority (do not leave it to the default priority), I got it to work as intended and also the notices are gone. So, this was a false positive issue, using the hook suggested in the notices makes things work as intended, but only when we do some higher priority.

    • This reply was modified 1 month, 2 weeks ago by Iulia Cazan.

    @iulia-cazan Are you saying it works with after_setup_theme with a different priority? What did you change the priority to?

    I’ve tried it with 10 (default), 11, 1, and even PHP_INT_MAX and 0 - PHP_INT_MAX to test the extremes, and I can’t make the notice go away. (Interestingly, get the notices twice for my plugins. Using this hook makes one go away, but another persists. I can’t figure out why, but this is happening in a Multisite setup with Network Active plugins, so perhaps that’s the issue.)

    Scratch my previous reply.

    Tip for fellow plugin developers who are running into this issue:

    1. You probably don’t need to call load_plugin_textdomain() at all because WordPress has a just-in-time loader for translations in all versions after 4.6. I deleted the code from my plugins and the translations are still working without it, but I still got the warning, because…
    2. I poked around a bit further and determined that the call that is generating the notice is at line 151 in?wp-admin/includes/plugin.php?in the?_get_plugin_data_markup_translate()?function. That private function is called by the public function?get_plugin_data()?which I do use in my plugins, fairly early. I see that function has a parameter to bypass translation, so that seems to be my fix.

    So, if you’re still getting the error after removing the direct call in your plugin, check if you’re using the get_plugin_data() function, and be sure to set its third input parameter ($translate) to false.

    • This reply was modified 1 month, 2 weeks ago by room34.
    02usthmnursyamsudin

    (@02usthmnursyamsudin)

    Sekilas?Kami :Al Hijaz Tour TravelAgen Travel Umroh dan Haji Banten Terpercaya

    travel umroh haji resmi banten

    Di Al Hijaz Tour and Travel, kami percaya bahwa ibadah umroh dan haji Anda harus menjadi pengalaman transformasional. Kami melayani Paket Ibadah Umroh Haji Banten, Travel Umroh Haji Resmi Banten, Biro Travel Umroh Banten, Biro Perjalanan Haji Banten, Tour Travel Umroh Banten.

    Kami berdedikasi untuk memastikan bahwa perjalanan Anda ke kota suci Makkah dan Madinah nyaman dan terjangkau. Selain itu juga membangkitkan semangat spiritual Anda. Bergabunglah dengan kami dalam perjalanan suci ini, dan biarkan kami menjadi teman terpercaya Anda dalam ibadah umrah dan haji Anda

    Kantor Pusat

    Graha Alhijaz :

    Jl. Dewi Sartika No. 239A Cawang, Jakarta Timur
    Telepon: 021-801111

    WA CS :?0853-1179-6051
    website :https//alhijazjakarta.web.id
    website ://httpsalhijaz.com (domain hosting Niaga Hoster )

    Perwakilan Tangerang Selatan

    Ruko Green Cove Blok B36/ 218 , Citra Raya Maja [Samping Pintu Gerbang Cluster Green Cove Citra Maja]

    Rekening Bank

    BSI : 707-367-5598 (Rp)

    BCA : 006-0008-012-225 (Rp)

    Mandiri : 273-221-1111 (Rp)

    BSI : 706-774-5587 (US$)

    a/n. PT Alhijaz Indowisata
    Matthew

    (@mhdizmni)

    Hi @leemon,

    I’m pleased to inform you that we have released version 14.10.3 of WP Statistics, which resolves the incompatibility issue with WordPress version 6.7.

    Please update the plugin to the latest version and enjoy!

    Regards

    Thread Starter Iulia Cazan

    (@iulia-cazan)

    @macmanx, I reopened the issue as it seems this is still replicable in 6.7 and now maybe it seems more relevant https://github.com/woocommerce/woocommerce/issues/52646

    Additionally, for some plugins the text domain do not get picked up anymore, regardless of the hook used.

    Does anyone know where is the new/updated documentation regarding the plugins translations – if available – after the new changes introduced in 6.7?

    • This reply was modified 1 week, 1 day ago by Iulia Cazan.
    • This reply was modified 1 week, 1 day ago by Iulia Cazan.
Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.