• Resolved macadk

    (@macadk)


    Hi there,

    I’ve been using Accessibility Checker and appreciate its functionality. However, after enabling debugging and preparing for a PHP 8.2 upgrade, I found this recurring notice in the logs:

    PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the ‘accessibility-checker’ domain was triggered too early.

    This seems to indicate that translations are being loaded before the init action, which is now flagged in WP 6.7+.

    Could you advise whether an update is planned to resolve this? I’d like to continue using the plugin post-upgrade without cluttering logs.

    Thanks for your support.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author williampatton

    (@williampatton)

    Hey @macadk,

    Thanks for using the plugin!

    I just searched through my logs and I don’t see any of these transation loading messages. I am using WordPress 6.8.1 and PHP 8.2. I looked before the change in WP 6.7 and believe I verified our plugin doesn’t throw the notice because we don’t call load_textdomain manually – allowing WordPress to call it correctly instead.

    Do you know what action I can take to trigger a notice with this plugins text domain? If I can find the path that causes it I will fix it and get it shipped in our next release early next week.

    Plugin Author williampatton

    (@williampatton)

    Hey @macadk,

    Just wanted to reach out here again and check if you could share any specific path that could cause this error to get logged. Looking at the code I don’t see how we would be calling this too early since we don’t call it but there may still be some user flow that I haven’t considered.

    I have tested a bunch to try and reproduce this, and even looked back through logs in my backups from months ago, and it has been months since this message has appeared in my logs. Any help to pinpoint what triggers it would be appreciated.

    Thread Starter macadk

    (@macadk)

    Hi Willian,

    This is all I have for you from the error log:

    PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the ‘accessibility-checker’ domain was triggered too early.

    I suspect it may be caused by my theme. I’m using Rara: Business. You might be able to test it with that to learn more.

    Plugin Author williampatton

    (@williampatton)

    Hi @macadk,

    I have spent a lot of time trying to test every single code path in this plugin that can be triggered from the admin or from the frontend and I haven’t been able to trigger this same message. I don’t have any of these messages in my logs from the last few days at all.

    I did test it with the same theme (and it’s companion plugin) that you are using and still don’t see anything.

    I don’t think that the notice is caused by anything in this plugin, perhaps some other plugin you have on your site is doing some background loading or alterations to how general hook order works on your site?

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

The topic ‘Early Translation Loading Triggering Notices in PHP 8.x Environments’ is closed to new replies.