• Hi,

    I’m running on php 7.1.1 and WP 4.9.5.
    On the admin setting pages I get;
    ”Notice: screen_icon is deprecated since version 3.8.0 with no alternative available”
    and a whole bunch of
    ”Warning: A non-numeric value encountered in…”

    Any idea why this is? I would love to use this plugin but we don’t seem to be compatible ??

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Jonathandejong

    (@jonathandejong)

    Hi,

    Could you please post both warning and notice in full so I can see where it’s coming from?

    Also, these do not compromise your site so you can just turn them off if you like.
    Add this to your wp-config.php file:

    
    // Turns WordPress debugging on
    define('WP_DEBUG', false);
    
    // Tells WordPress to log everything to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    
    // Doesn't force the PHP 'display_errors' variable to be on
    define('WP_DEBUG_DISPLAY', false);
    
    // Hides errors from being displayed on-screen
    @ini_set('display_errors', 0);
    
    Thread Starter Mannisen

    (@mannisen)

    Hi Jonathan,

    Thanks for the reply.
    No need to turn debug off since this is from my dev environment.

    Here they are;

    Notice: screen_icon is deprecated since version 3.8.0 with no alternative available. in /wp-includes/functions.php on line 3841

    Warning: A non-numeric value encountered in /wp-includes/class-wp-rewrite.php on line 1002

    Warning: A non-numeric value encountered in /wp-includes/class-wp-rewrite.php on line 1004

    I use Xdebug so let me know if you need anything else from the call stack.
    Also, I get nothing in front end. Tried both with widget and do_action.

    Plugin Author Jonathandejong

    (@jonathandejong)

    The screen_icon part is pretty easy but I’m having a tough time figuring out why BTF would cause the non-numeric warnings.. Is is possible for you to pinpoint it with xdebug? the function regarding rewrite rules runs on the “generate_rewrite_rules” hook so it should occur if visiting/saving the permalink settings.

    I’m currently not using xdebug since I just got a new computer and haven’t had the time to setup everything in Atom yet ??

    Thread Starter Mannisen

    (@mannisen)

    Hi,

    Sorry for the late reply.
    It seems the two lines of <?php flush_rewrite_rules(); ?> in admin-display.php are causing the errors.

    Here is a screen shot of the non-numeric warnings.

    Plugin Author Jonathandejong

    (@jonathandejong)

    Well that’s odd..
    There’s no input to those functions except an optional boolean.
    To me it looks more like there’s an issue the generate_rewrite_rules function in WP Core which is called as a result of flush_rewrite_rules..

    Does the error disappear if you deactivate BTF?
    Looking into the core file it might actually rather be an issue with how I build up the new rewrite rules than with the flushing.

    Thread Starter Mannisen

    (@mannisen)

    I only see these errors on the BTF admin pages.

    Also, I’ve tried all options to output the filtering function in front end but I get nothing, no matter what php-version i use. No errors, no nothing.

    Plugin Author Jonathandejong

    (@jonathandejong)

    Okay I’ll have a look at the rewrite function to see if there could be an issue there.

    BTF should be compatible with PHP 5.6 < so 7.1 – 7.2 should be fine.
    I’ve used it myself on almost all php versions.

    How have you setup the BTF settings?
    Are you using the do_action call on your archive.php template?

    Thread Starter Mannisen

    (@mannisen)

    I’ve tried the widgets, do_action and the auto insertion on archive.
    Really strange…

    Thread Starter Mannisen

    (@mannisen)

    Actually, I just realized I also see the errors on wp-admin/options-permalink.php as well, even if BTF is disabled. I have to investigate this further.

    Plugin Author Jonathandejong

    (@jonathandejong)

    Ah yeah I think it’s possible its a core bug.

    So what are your BTF settings? Can you screenshot how it’s setup ??

    Thread Starter Mannisen

    (@mannisen)

    After some digging around I found the culprit. It seems the error is triggered when the custom post types are set to rewrite true. When changing them to false the errors goes away. I’ve changed that for now to exclude that problem. So… one down, one to go ??

    There is really not much to see in the options.
    In Basics Tab nothings is checked, in Advanced “Enable a “Clear all” link:” and “Hide empty terms in the dropdowns:” are checked. ”All option” is selected in ”Drop Down”.

    I’m not using /archive in my permalink structure. Might that affect something?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Errors on Admin Page’ is closed to new replies.