Support » Fixing WordPress » ‘Creating default object from empty value in’ while creating new page

  • susafri

    (@susafri)


    Hi all,
    I have duplicated a site that was working fine, installed it on the server with a database that is basically the same as before and now I am unable to make a new page. I get the following error: ‘Creating default object from empty value in’ ….wp-admin/includes/post.php on line 639

    I know that recently the php on my hosts server has been updated to 5.6.
    I am running WordPress 4.6.1 all my plugins are up to date
    I have googled the problem and all the answers point to the php upgrade as the culprit. What can I do?? any ideas?
    Thanks

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

    (@macmanx)

    Volunteer Moderator

    I doubt the PHP upgrade itself is the conflict, we recommend 5.6 after all: https://wordpress.org/about/requirements/

    With that said though, an existing plugin or theme function could be conflicting with the newer PHP version.

    Try deactivating all plugins. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, try switching to the Twenty Sixteen theme to rule-out a theme-specific issue (theme functions can interfere like plugins).

    susafri

    (@susafri)

    Hi James, Thanks for your quick answer.
    I deactivated all of the plugins and tried out Twenty sixteen and could not add a new page. Same error
    Any other ideas? Should i revert to the last version of WordPress?

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Not yet, let’s rule out core file damage next.

    Try downloading WordPress again, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, and delete then replace your copies of everything on the server except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings.

    Some uploaders tend to be unreliable when overwriting files, so don’t forget to delete the original files before replacing them.

    • This reply was modified 4 years ago by James Huff.
    susafri

    (@susafri)

    OK update: I deleted all the files except wp-config and wp-content folder and re-uploaded, same problem. deactivated all plugins again and tried twentysixteen, could not make a new page. Maybe I have to start from the beginning?
    I did notice there were a lot of really long _transient files in the database, not sure if that has anything to do with the problem.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Possibly, try flushing them out safely with https://wordpress.org/plugins/wp-sweep/

    susafri

    (@susafri)

    Latest update: I used sweep to clean my database.No result. I deleted all of the plugins and my theme and just used twentysixteen: same problem. When I go to Customize in the dashboard I get this message : ( I replaced the url with …)

    Fatal error: Uncaught exception ‘Exception’ with message ‘Illegal widget setting ID: nav_menu_item[]’ in /home/dawn2011/….com/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php:182 Stack trace: #0 /home/dawn2011/…..com/wp-includes/class-wp-customize-nav-menus.php(594): WP_Customize_Nav_Menu_Item_Setting->__construct(Object(WP_Customize_Manager), ‘nav_menu_item[]’, Array) #1 [internal function]: WP_Customize_Nav_Menus->customize_register(Object(WP_Customize_Manager)) #2 /home/dawn2011/….com/wp-includes/plugin.php(524): call_user_func_array(Array, Array) #3 /home/dawn2011/….com/wp-includes/class-wp-customize-manager.php(605): do_action(‘customize_regis…’, Object(WP_Customize_Manager)) #4 [internal function]: WP_Customize_Manager->wp_loaded(”) #5 /home/dawn2011/….com/wp-includes/plugin.php(524): call_user_func_array(Array, Array) #6 /home/dawn2011/….com/wp-settings.php(432): do_action(‘wp_loaded’) #7 in /home/dawn2011/….com/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php on line 182

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    And you’re getting that on a fresh installation of WordPress file, with no plugins, and only the Twenty Sixteen theme? Very odd.

    Is there any chance of bumping up to PHP 7, or is 5.6 as high as you can go?

    susafri

    (@susafri)

    Hi James, yes that is correct.
    In the meantime i did a complete fresh WordPress install and recreated the site from scratch. There was something evil in the database. I will have to check out php7 and see how that works with the latest WordPress version. I have not tried it with any of my sites and hope it won’t be a nightmare. Thanks for the follow up.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    PHP 7 should work fine with your site, or at least it does on all of mine. šŸ™‚

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘‘Creating default object from empty value in’ while creating new page’ is closed to new replies.