Home Forums WoodMart support forum Notice: wp_add_inline_script was called incorrectly

Notice: wp_add_inline_script was called incorrectly

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #66114

    msgdev
    Participant

    Hello.

    I got the following error.

    Do not pass <script> tags to wp_add_inline_script(). Please see Debugging in WordPress for more information. (This message was added in version 4.5.0.) in in /home2/andrijasevic/public_html/wp-includes/functions.php on line 4148

    I tried disabling plugins and the error disappear when I disable Redux-framework.

    Also i have this at the bottom of page
    Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3730

    Can you help me solve this?

    #66118

    Artem Temos
    Keymaster

    Hello,

    Could you please disable all plugins that are not related to our theme and provide us your admin access so we can check it? Also, send us some screenshots where we can see those errors.

    Thank you in advance

    #66122

    msgdev
    Participant

    I have disabled all plugins not related to your theme.

    Attachments:
    You must be logged in to view attached files.
    #66125

    Artem Temos
    Keymaster

    Did you make any customizations in our theme’s files? Please, reinstall the theme and send us your FTP access so we can check it.

    #66133

    msgdev
    Participant

    Nope, I didn’t. I would use child theme if there were any need for that.

    The only thing i changed is the custom css strings added in theme options section.

    I will send you FTP access after I reinstall the theme.

    Thanks Artem

    #66270

    msgdev
    Participant

    Theme has been reinstalled.

    #66274

    Artem Temos
    Keymaster

    Sorry, but we can’t find the root for these errors. They point to core WordPress files and not to our theme’s files. We need to see some kind of PHP functions call stack if it is possible on your server. Otherwise, you can simply disable WordPress debug mode since they are simple notices and they can’t harm your website functionality or performance.

    #66277

    msgdev
    Participant

    Hi Artem, is your theme compatible with Loco translate?

    I got this error when trying to save translated word.
    Error: document.documentElement.className = document.documentElement.className + ‘ yes-js js_active js’. Check console output for debugging information.

    Maybe that plugin is causing the problem?

    #66278

    Artem Temos
    Keymaster

    Yes, it is fully compatible with Loco Translate. Could you please describe to us a step by step instruction where we can see this error.

    #66279

    msgdev
    Participant

    Go to Loco translate, choose Woocommerce Serbian language edit and choose one string. No matter which one. It can be one already translated. Hit save and you get this error.

    Site was few times down when I tried to save some strings. I set up PHP post_max_size on maximum and site doesn’t go down but I get this error now.

    #66280

    Artem Temos
    Keymaster

    And it happens with our theme only? Could you please install standard WordPress theme so we can test it?

    #66283

    msgdev
    Participant

    I didn’t check with any other theme. Standard WP theme has been installed.

    #66288

    Artem Temos
    Keymaster

    So please, check how it works with default WordPress theme to see if it is our theme issue or not.

    #66290

    msgdev
    Participant

    Ok. I have checked it with Twenty seventeenth. Loco works fine when translating theme files. The problem occurs while translating Woocommerce files no matter which theme is active.

    P.S. While I switched back to Woodmart theme all widgets on the site, some part of footer and on shop are gone. Why?

    #66292

    Artem Temos
    Keymaster

    The problem may occur when you switch between themes in Appearance -> Themes is that widgets may lose their positions. It is a WordPress behavior and we are not able to fix this in our theme scope. Now, you need to go to Appearance -> Widgets and move all widgets to appropriate positions.
    As a workaround, you can backup your widgets configurations using this plugin https://wordpress.org/plugins/widget-importer-exporter/

    #66294

    msgdev
    Participant

    Ok. Didn’t know that. Have to put all these back manually now. Thanks for plugin info.
    I have managed to remove the notice for Wp_add_inline_script. After I have removed Google analytics and Facebook pixel code the Notice has disappeared.

    The ob_end_flush(): failed to send buffer of zlib output compression (0) in /home2/andrijasevic/public_html/wp-includes/functions.php on line 3730 has nothing to do with the theme? I guess it’s a server issue. Correct me if I am wrong.

    Now the only problem left is a problem with Loco translate. Still can not save translated strings. Did you test any other plugin for translation?

    #66297

    Artem Temos
    Keymaster

    Usually, Loco Translate works for all websites without any troubles. This problem may be also caused by your server because it can’t complete the AJAX request to save the file.

Viewing 17 posts - 1 through 17 (of 17 total)