• Resolved nfong

    (@nfong)


    I’m trying to track down this warning with the latest pods and wordpress.

    Happens every morning at the same time

    [28-Mar-2026 12:15:10 UTC] PHP Notice:  Function
    _load_textdomain_just_in_time was called <strong>incorrectly</strong>.
    Translation loading for the <code>pods</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 /home/a2076/domainname.com/wp-includes/functions.php
    on line 6131

    ==

    My code doesn’t call _load_textdomain_just_in_time.

    I deleted one template that might be suspect and still errors out.

    No cron running on my test server.

    I deleted wp-cron.php on test server, still happens every morning.

    No traffic on my test server per the apache log and it still happens.

    Any tips on tracking this down?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support pdclark

    (@pdclark)

    The notice for timing for text domain loading in WP 6.7 and later was addressed in the Pods core plugin, so unless the requirement has regressed, the most likely cause would be an additional plugin or custom code which initializes Pods without using a hook or filter

    For example, hook init with priority 20 should be fine, while code put into a plugin or theme without an action or filter wrapping it could cause the notice.

    The message doesn’t have any functional repercussions at this time, other than writing to the logs.

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    @nfong I covered all of the known cases. It sounds like you found one other weird case that may have been difficult to find.

    Here’s what I usually have to do to track down the real source and since you are already modifying your WP core files it sounds like you could do this too. I was doing this on my local installation so it didn’t matter too much but you can do this on your staging if you see it there too.

    In the function _load_textdomain_just_in_time within wp-includes/l10n.php, right before the _doing_it_wrong() call — you can add $backtrace = json_encode( array_splice( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ), 3, -4 ), JSON_PRETTY_PRINT );

    Then I just add that content to the end of the second argument in _doing_it_wrong to append the debug message. This should get you the additional information you need here.

    Thread Starter nfong

    (@nfong)

    Thanks for the suggestion. backtrace found the culprit: Cpanel’s wp-toolkit daily task, so this will affect others.

    ....
    {
    "file": "\/home\/a2076\/test.server.com\/wp-content\/plugins\/pods\/classes\/PodsInit.php",
    "line": 2505,
    "function": "pods_container_register_service_provider"
    },
    {
    "file": "\/home\/a2076\/test.server.com\/wp-includes\/class-wp-hook.php",
    "line": 341,
    "function": "run",
    "class": "PodsInit",
    "type": "-&gt;"
    },
    {
    "file": "\/home\/a2076\/test.server.com\/wp-includes\/class-wp-hook.php",
    "line": 365,
    "function": "apply_filters",
    "class": "WP_Hook",
    "type": "-&gt;"
    },
    {
    "file": "\/home\/a2076\/test.server.com\/wp-includes\/plugin.php",
    "line": 522,
    "function": "do_action",
    "class": "WP_Hook",
    "type": "-&gt;"
    },
    {
    "file": "\/home\/a2076\/test.server.com\/wp-settings.php",
    "line": 593,
    "function": "do_action"
    },
    {
    "file": "\/usr\/local\/cpanel\/3rdparty\/wp-toolkit\/plib\/vendor\/wp-cli\/vendor\/wp-cli\/wp-cli\/php\/WP_CLI\/Runner.php",
    "line": 1394,
    "args": [
    "\/home\/a2076\/test.server.com\/wp-settings.php"
    ],
    "function": "require"
    },
    {
    "file": "\/usr\/local\/cpanel\/3rdparty\/wp-toolkit\/plib\/vendor\/wp-cli\/vendor\/wp-cli\/wp-cli\/php\/WP_CLI\/Runner.php",
    "line": 1313,
    "function": "load_wordpress",
    "class": "WP_CLI\\Runner",
    "type": "-&gt;"
    },
    {
    "file": "\/usr\/local\/cpanel\/3rdparty\/wp-toolkit\/plib\/vendor\/wp-cli\/vendor\/wp-cli\/wp-cli\/php\/WP_CLI\/Bootstrap\/LaunchRunner.php",
    "line": 28,
    "function": "start",
    "class": "WP_CLI\\Runner",
    "type": "-&gt;"
    },
    {
    "file": "\/usr\/local\/cpanel\/3rdparty\/wp-toolkit\/plib\/vendor\/wp-cli\/vendor\/wp-cli\/wp-cli\/php\/bootstrap.php",
    "line": 84,
    "function": "process",
    "class": "WP_CLI\\Bootstrap\\LaunchRunner",
    "type": "-&gt;"
    }

    Thread Starter nfong

    (@nfong)

    This warning shows up only on staging server that does not get any traffic. On our production server it works fine.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.