• denis24

    (@denis24)


    I am getting many instances of this error in debug.log:

    [15-Jan-2025 15:21:00 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-youtube-lyte 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 init action or later.

    Can this be fixed?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    it’s on my radar but have not had the time to look into it yet Denis, if these notices bug you, you can use this code snippet (not mine) to stop these from being logged.

    Thread Starter denis24

    (@denis24)

    Thanks for the quick reply, but the code snippet provided does not quiet the warning messages.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    based on the title of the snippet, this has to be in the mu-plugins folder, did you try it like that?

    Thread Starter denis24

    (@denis24)

    No, I missed that detail.

    But when i added the file to mu-plugins, I got a critical error:

    [15-Jan-2025 19:26:35 UTC] PHP Fatal error: Uncaught Error: Class “QM_Collectors” not found in /home/dh_fq6kjb/jamalong.org/wp-content/mu-plugins/quiet-load-textdomain-warning.php:35

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    darn, seems @afragen was assuming Query Monitor was running, if not you’ll have to change

    remove_action( 'doing_it_wrong_run', array( QM_Collectors::get( 'doing_it_wrong' ), 'action_doing_it_wrong_run' ) );

    into

    remove_action( 'doing_it_wrong_run', array( 'action_doing_it_wrong_run' ) );

    You might just want to comment out the part dealing with Query Monitor.

    I had a look, but it doesn’t seem to be that simple to fix it. One thing is the calls to “load_plugin_textdomain”. Those should happen in an init hook which is easy to change. But then, there are calls to __(), which also should not happen before the init call. Start by looking at the player_sizes include file. This sets up variables which are then called as globals. Not so easy to refactor, at least without better knowledge of this plugin’s code base.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    afraid I can confirm @ammaletu ; I started doing changes and kept on bumping into new issues. when I have time I’ll continue but this sure feels like pandora’s box .. :-/

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.