• [27-Nov-2024 13:27:26 UTC] PHP Notice:  Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>acf-image-aspect-ratio-crop</code> domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the <code>init</code> action or later. Please see <a href="https://developer.ww.wp.xz.cn/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /sites/josh/subdomains/example.com/production/wp-includes/functions.php on line 6114

    Hey Johannes

    Is it possible to patch this so this notice doesn’t everytime the plugin runs?

    Many Thanks
    Josh

Viewing 1 replies (of 1 total)
  • Same issue after 2 months. Since there’s currently no response from the plugin author, I fixed the issue by

    1) deleting the original load_plugin_textdomain() call from inside the npx_acf_plugin_image_aspect_ratio_crop class

    2) re-adding the function call outside of and before the class, as a function hooked to the init action.

    function acf_iarc_textdomain() {
    load_plugin_textdomain('acf-image-aspect-ratio-crop');
    }
    add_action( 'init', 'acf_iarc_textdomain' );

    3) blocking automatic updates for this specific plugin with the help of the Easy Updates Manager plugin – temporary fix, I just don’t want my update to be overwritten as long as we don’t have a confirmation about the issue being solved by the author.

    Can be useful for others hyper annoyed by those PHP notices in the debug.log file – and the above code update is based on the official-recommendation (see https://make.ww.wp.xz.cn/core/2024/10/21/i18n-improvements-6-7/).

Viewing 1 replies (of 1 total)

The topic ‘Load textdomain php notice’ is closed to new replies.