• When i use your plugin i get this error in debug.log:

    [11-Mar-2021 15:13:06 UTC] PHP Notice: WP_Scripts::localize was called <strong>incorrectly</strong>. The <code>$l10n</code> parameter must be an array. To pass arbitrary data to scripts, use the <code>wp_add_inline_script()</code> function instead. Please see <a href="https://www.ads-software.com/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 5.7.0.) in /home/customer/www/…/public_html/wp-includes/functions.php on line 5313

Viewing 6 replies - 1 through 6 (of 6 total)
  • I have also been getting this error, and have had to convert my own (mis)usage of localize to the recommend function.

    I can confirm this plugin is causing a lot of debug data. This is a trace from Query Monitor plugin:

    wp-includes/functions.php:5313
    WP_Scripts->localize()
    wp-includes/functions.wp-scripts.php:221
    wp_localize_script()
    wp-content/plugins/post-smtp/Postman/PostmanViewController.php:173
    PostmanViewController->registerStylesAndScripts()
    wp-includes/class-wp-hook.php:292
    do_action('admin_init')
    wp-admin/admin.php:175

    @alexandrubr How do you trace it? I have Query Monitor installed, but I do not know how to trace the source of such notices.

    My log in flooded with these as well.

    Yup, was just going to report this as well.

    I started a fresh thread along the same lines. With all plugins deactivated and using the WP 2020 theme it’s definitely an error. Weird is that I have this installed on 20 sites with my same set up and there is no error. The new site I just spun up today and bam, it breaks when activated.

    New thread: https://www.ads-software.com/support/topic/error-when-activating-plugn/

    Any news on a fix?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Since WP 5.7: debug.log gets flooded with $l10n’ is closed to new replies.