• Resolved activecoder

    (@activecoder)


    Hi, I have a fresh install of WordPress 5.5.1 running with PHP 7.4.10 (built-in php web server), When I go to WP Admin under “Appearance > Theme > Add New button”, I see the following message on screen:

    An unexpected error occurred. Something may be wrong with www.remarpro.com or this server’s configuration. If you continue to have problems, please try the support forums.

    But the site continue to function without problems.

    And on the server log, I see this message:

    [Fri Sep 25 09:08:14 2020] PHP Warning: Invalid argument supplied for foreach() in /path/to/wordpress/wp-admin/includes/theme.php on line 586

    Has anyone encounter this?

    • This topic was modified 4 years, 1 month ago by activecoder.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p

    (@t-p)

    Try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins).

    Thread Starter activecoder

    (@activecoder)

    Hi t-p, thanks for the help. Yes it turns out it was the “Custom Post Type UI” plugin that I have installed caused the issue. I had version 1.8.0 installed, and there is a newer version 1.8.1 pending. I didn’t want to upgrade, but it seems that having simply a pending upgrade can cause these warning message? It seems odd. Anyway, after I upgraded the plugin, then error message is gone.

    Moderator t-p

    (@t-p)

    Glad its sorted ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Got “invalid foreach()” warning message when Add New theme’ is closed to new replies.