Waymark triggers _load_textdomain_just_in_time too early on WordPress 6.8.3 (repeated PHP notice, likely initialization issue)
When Waymark is active on WordPress 6.8.3 (tested with PHP 7.4 and 8.4.5), the following notice appears repeatedly in the debug log:
[15-Oct-2025 04:27:56 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>waymark</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.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /kunden/136285_6840/websites/lusser/wordpress/wp-includes/functions.php on line 6121
The notice appears many times while loading the WordPress admin area (e.g. when opening the block editor). On my installation this leads to a "There has been a critical error on your website" message when editing posts or pages. I assume that because it seems to be the only problem with the Waymark plugin in the logfile.
Steps to reproduce
- Install and activate Waymark on WordPress 6.8.3 (PHP 8.4.5).
- Enable debugging (WP_DEBUG_LOG).
- Open any post in the block editor.
- Check debug.log.
Expected behavior The text domain should load during or after the init hook, not before.
Environment
- WordPress 6.8.3
- PHP 7.4 and 8.3 and 8.4.5 tested
- Waymark 1.5.8
Additional context The notice did not appear in previous WordPress versions. It seems the plugin is calling load_plugin_textdomain() too early, causing premature initialization and possibly further backend issues.
Full debug.log available upon request.
Hi @HanSolo68,
Thank you for raising this, I see these also after a recent WordPress update.
The notice appears many times while loading the WordPress admin area (e.g. when opening the block editor).
My understanding is that these notices only appear (in both logs and on the front-end) when debug mode (WP_DEBUG) is enabled, or if PHP notices are enabled.
I also believe that translations are still working correctly, but please let me know if this is not the case for you.
Having looked in to this, it is indeed an initialisation problem where Waymark is trying to use translation strings too early. This is a fundemental issue with how the plugin loads and I am yet to find a solution.
I do plan on getting to this, but it may be a fairly large amount of work, so I can not say when this will happen.
Cheers,
Joe