Support » Fixing WordPress » A non-numeric value encountered in

  • Hi

    I got the following warning after updating Plugins and Themes (Website built in WordPress 5.7.2 with AstraPro and ElementorPro):

    Warning: A non-numeric value encountered in /home/httpd/vhosts/jooswolfangel.ch/sth-neu.jooswolfangel.ch/wp-content/plugins/astra-addon/addons/site-layouts/classes/dynamic.css.php on line 66

    With this issue I contacted the plugin-producers of Astra. Astra Pro Support told me, that they can’t help me, I should contact Elementor support.

    Thank you for supporting me with this problem.
    Kind regards
    Johannes

    • This topic was modified 3 months, 2 weeks ago by johannesjoos.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Since that is a commercial plugin, we ask that you please go to their official support channel, so you can get support from the people who know it best: https://elementor.com/support/

    Forum volunteers are not given access to commercial products, so they would not know why it is not working properly. Other community members who may have faced your issue might be able to help you but your best bet is your product’s developer. Keep in mind we encourage you to use the official support venues, as it allows the developers to be aware of issues with their code and gives back to the community in a more robust way.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Also, look in your hosting services documentation or ask them directly how to properly “disable error reporting” on the hosting service.

    Specifically, you want the display_errors setting in PHP to be turned off. The proper way to do this can vary from hosting to hosting. On some you may need to make a php.ini file, on others they will give you a line to add to .htaccess.

    Nevertheless, this setting should *never* be enabled on a live site, and yet it is almost always enabled by default. Turn it off and the “Warning” messages will go away.

    Thread Starter johannesjoos

    (@johannesjoos)

    @otto42
    Thank you Otto, I found the place where to turn off the «display error» function and did so. Now the message «A non-numeric value encountered in…» is gone.

    But does this really solve the problem? Or maybe the question should be asked different: Is it even not necessary to solve the problem that causes the «Warning»? The website works properly.

    @macmanx
    Thank you Macmanx for coming back and your advice: I will write the elementor support and try to fin the bug and solve the issue.

    Thanks again for your great support that helped me instantly.
    Kind regards
    Johannes

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    @johannesjoos Warnings are just warnings. They don’t halt the script operation in PHP. Actual errors would cause problems that could make the site not work properly, but warnings typically are found in code which doesn’t account for all cases properly. PHP can handle them just fine, for the most part.

    As of PHP 7, a fair number of “warnings” get graduated to “errors” and those would likely need to be fixed by then, but generally speaking simply not showing the issue is enough. Fixing it is up to you or the developer. For a non-numeric warning, I expect it is because some option in the plugin is not initialized properly, thus resulting in the warning message. But the code will likely just set it to zero anyway, as a default.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Also, while I’ve never used the Astra theme, After reading a bit of code real quick, I suspect that the problem is that your site doesn’t have a “blog max width” set. Try going to Appearance > Customize > Global > Container > Site Layout and making sure that the Max Width is set to some number, if the Site Layout option is set to “Max Width”.

    Thread Starter johannesjoos

    (@johannesjoos)

    Hi otto42

    Thank you for you feedbacks.
    I took a closer look in the customizer an found the Settings:

    Site Layout: Full width
    Container Width: 1200px
    Layout: Boxed

    Page Layout: Default
    Blog Post Layout: Default
    Archives Layout: Default

    Is that correct?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.