• Resolved Bike Gremlin

    (@bikegremlin)


    Hi,

    The good news is that this plugin does seem to work with PHP 8.4 (the latest & greatest).

    It does show this PHP warning – and I hope that can be fixed going forward:

    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. Please see Debugging in WordPress for more information.

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

    (@optimizingmatters)

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

    Thread Starter Bike Gremlin

    (@bikegremlin)

    No problem, no rush – it works, and fixing will matter mostly in terms of making future updates easier (hopefully – the pace of PHP and other stuff updates feels hectic, at least to me).

    I can’t help with development, but I could at least help with testing. ??

    Keep up the good work and thank you very much.

    Relja

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    thanks Relja ??

    wesatintellitonic

    (@wesatintellitonic)

    @optimizingmatters It’s a super simple fix — just moving the textdomain loading into a function hooked to init, instead of directly on plugin loading. I’ve submitted a pull request with the fix: https://github.com/futtta/wp-youtube-lyte/pull/45

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    thanks wesatintellitonic, much appreciated! I’ll have a look shortly ??

    wesatintellitonic

    (@wesatintellitonic)

    You know @optimizingmatters , I dug in a little more after this and I see there is more to do. Hooking the textdomain loading on init solves the notice, but may break the translation, and in any case it leaves four or so files that are running immediately on plugin load and calling the translation functions, which have now been delayed… The bigger issue is the direct function calling in all these files — they should really all be using constructors and hooked. Probably wouldn’t be more than 3–4 hours to refactor, but not the 15-minute fix I so cleverly thought I had found…

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