• Resolved bibleblade

    (@bibleblade)


    Hello,

    I had a 5 year old page that was on wordpress 3.* when I remember correctly, I updated to wordpress 5.1 locally and it seemed like everything was fine, but now I have the following problem:

    when creating a new post or page I got a white page with the Warning “Creating default object from empty value in …..includes/post.php on line 708”.
    So I commented out the code parts that were responsible for this $post->post_content = (string) apply_filters( ‘default_content’, $post_content, $post );
    $post->post_title = (string) apply_filters( ‘default_title’, $post_title, $post );
    and
    $post->post_excerpt = (string) apply_filters( ‘default_excerpt’, $post_excerpt, $post );

    Now I am able to create a new page, but when I try to save it, I get the message: Unfortunately, you are not allowed to edit this post.

    But I am able to edit pages and posts and save those changes. I am logged in as admin.

    What I tried:

    Deactivating all plugins, using another theme, reinstalling wordpress 5.1, reinstalling core files, using healthcheck and activate the debug mode.

    I am using php 7.2

    Healtchcheck and debug mode only warned about minor issues like not using https, Transients etc.

    Thank you for your help, it seems like there is no solution to this problem.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Marius L. J.

    (@clorith)

    Hiya,

    First, please undo the edits you made in wp-includes/post.php, that’s a core file and should never be edited ??

    If you got a white screen when making changes it indicates a fatal error, this is very likely caused by a plugin or theme conflict. You mentioned looking at the Health Check plugin and it not reporting any noteworthy issues, but did you try Troubleshooting Mode with a default theme and no plugins active?

    Thread Starter bibleblade

    (@bibleblade)

    Hey, I am aware that after an update the changes will be undone, I just wanted to makes sure what is responsible for the whitescreen.

    And I was wondering why I still cant create a new page when I can edit them at all times.

    When I change the theme and deactivate all plugins except for health check I still get the same warnings about https and transients. No matter which Theme I use.

    Nothing seems to help.

    What I noticed though, is that creating a new page does look like it usually does but when I edit a page it kinda looks like a plugin is working where I can add blocks and all pages have only the “classical” block.

    But there is no Plugin installed handling this. advanced custom fields, platinum seo, redirecting and user role editor. And healthcheck which I installed when the issues occured.

    Thread Starter bibleblade

    (@bibleblade)

    In case someone runs into a similar issue:

    apparently something just didnt work in the database. I optimized and repaired and it didnt work.

    What I did was install WP 5.1 on a blank page, which created a new database, there I could do everything even with the same theme and plugins. I then Imported the old wordpress page. Now everything works perfectly fine.

    Do not import the old database in phpmyadmin though, you will end up with the same problems. Using the wordpress import will do just fine.

    You can find this under Tools -> Export data on your old installation and in your new installation you go to Tools -> Import data and click on wordpress.

    I was having the same problem. It seems like I tried everything under the sun.

    I narrowed it down to the database… it was hidden somewhere in there. This was happening on my local machine, whereas the remote version on my VPS worked just fine.

    Even reverting back to WordPress 4.x didn’t fix the issue. Using the Classic Editor plugin at least got a new post to semi-load (instead of a white screen), but there were the same errors at the top, and it acted as if I was a contributor instead of an admin (“Submit for Review”), and if I tried to create something, it threw the error that says I don’t have permission to edit this post.

    Meanwhile everything else about the site worked. I could edit existing posts, add themes and plugins, change settings, etc.

    I have been a WordPress developer for many years and fixed many client sites, but this one really eluding me because I couldn’t narrow it down beyond the DB, and none of the standard fixes worked (change theme, disable plugins, clear cache/cookies, switch browsers, revert version, etc). I looked in the DB for some standard problems and everything looked good. I even tried installing a database backup of my local site from a month before to no avail. Very strange.

    I finally “fixed” my site by replacing my local database with my remote version and am using that instead. I have no fixes for someone that wants to address the root issue of this without throwing away their DB, aside from saying that you can eliminate any potential solution that doesn’t change the database.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot create new pages since Update’ is closed to new replies.