• After upgrade to WP 6.1, I get this error.
    When I trying to add a new post (page), I get this errors on a blnak page:
    – The link has expired.
    – We are sorry, you do not have permissions to edit this page.
    – We are sorry, you do not have permissions to edit page with this user.
    I am using the default admin user (administrator).
    Then another plugin throws a 500 error, because they receive a parameter that is WP_Error Object:

    WP_Error Object
    (
        [errors] => Array
            (
                [1] => Array
                    (
                        [0] => Element does not exists.
                    )
    
            )
    
        [error_data] => Array
            (
            )
    
        [additional_data:protected] => Array
            (
            )
    
    )

    I try to disabled themes and plugins without luck….

    Any idea?

    More info: PHP 8.1

    Regards,
    Jordi
    JOINSO

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi, maybe the update was incomplete fix the wp files like this:

    upload and overwrite folders from a functioning wordpress installation
    /wp-admin/
    /wp-includes/

    and .php files in the site root (make sure to keep wp-config.php!!)

    Thread Starter joinso

    (@joinso)

    No luck.

    Thread Starter joinso

    (@joinso)

    More interesting info.
    I disabled two plugins (WPML), and I try to a new page.
    When I click on publish, I have no errors, but I am redirected from:

    https://MY_DOMAIN/administracio/post-new.php?post_type=page

    to:

    https://MY_DOMAIN/administracio/edit.php

    And i get the list of “Posts” (in my case is empty because I do not use Posts).

    In the logs I see this:

    [12-Nov-2022 05:30:33 UTC] PHP Warning:  Attempt to read property "ID" on null in /var/www/MY_DOMAIN/wp-admin/includes/post.php on line 1953
    [12-Nov-2022 05:30:33 UTC] PHP Stack trace:
    [12-Nov-2022 05:30:33 UTC] PHP   1. {main}() /var/www/MY_DOMAIN/wp-admin/post.php:0
    [12-Nov-2022 05:30:33 UTC] PHP   2. post_preview() /var/www/MY_DOMAIN/wp-admin/post.php:336
    [12-Nov-2022 05:30:33 UTC] PHP Warning:  Attempt to read property "ID" on null in /var/www/MY_DOMAIN/wp-admin/includes/post.php on line 1959
    [12-Nov-2022 05:30:33 UTC] PHP Stack trace:
    [12-Nov-2022 05:30:33 UTC] PHP   1. {main}() /var/www/MY_DOMAIN/wp-admin/post.php:0
    [12-Nov-2022 05:30:33 UTC] PHP   2. post_preview() /var/www/MY_DOMAIN/wp-admin/post.php:336
    [12-Nov-2022 05:30:33 UTC] PHP Warning:  Attempt to read property "post_author" on null in /var/www/MY_DOMAIN/wp-admin/includes/post.php on line 1959
    [12-Nov-2022 05:30:33 UTC] PHP Stack trace:
    [12-Nov-2022 05:30:33 UTC] PHP   1. {main}() /var/www/MY_DOMAIN/wp-admin/post.php:0
    [12-Nov-2022 05:30:33 UTC] PHP   2. post_preview() /var/www/MY_DOMAIN/wp-admin/post.php:336
    [12-Nov-2022 05:30:33 UTC] PHP Warning:  Attempt to read property "ID" on null in /var/www/MY_DOMAIN/wp-admin/includes/post.php on line 1970
    [12-Nov-2022 05:30:33 UTC] PHP Stack trace:
    [12-Nov-2022 05:30:33 UTC] PHP   1. {main}() /var/www/MY_DOMAIN/wp-admin/post.php:0
    [12-Nov-2022 05:30:33 UTC] PHP   2. post_preview() /var/www/MY_DOMAIN/wp-admin/post.php:336
    [12-Nov-2022 05:30:33 UTC] PHP Warning:  Trying to access array offset on value of type null in /var/www/MY_DOMAIN/wp-admin/includes/post.php on line 1882
    [12-Nov-2022 05:30:33 UTC] PHP Stack trace:
    [12-Nov-2022 05:30:33 UTC] PHP   1. {main}() /var/www/MY_DOMAIN/wp-admin/post.php:0
    [12-Nov-2022 05:30:33 UTC] PHP   2. post_preview() /var/www/MY_DOMAIN/wp-admin/post.php:336
    [12-Nov-2022 05:30:33 UTC] PHP   3. wp_create_post_autosave($post_data = NULL) /var/www/MY_DOMAIN/wp-admin/includes/post.php:1970
    [12-Nov-2022 05:30:33 UTC] PHP Warning:  Attempt to read property "ID" on null in /var/www/MY_DOMAIN/wp-admin/includes/post.php on line 1980
    [12-Nov-2022 05:30:33 UTC] PHP Stack trace:
    [12-Nov-2022 05:30:33 UTC] PHP   1. {main}() /var/www/MY_DOMAIN/wp-admin/post.php:0
    [12-Nov-2022 05:30:33 UTC] PHP   2. post_preview() /var/www/MY_DOMAIN/wp-admin/post.php:336
    [12-Nov-2022 05:30:33 UTC] PHP Warning:  Attempt to read property "ID" on null in /var/www/MY_DOMAIN/wp-admin/includes/post.php on line 1981
    [12-Nov-2022 05:30:33 UTC] PHP Stack trace:
    [12-Nov-2022 05:30:33 UTC] PHP   1. {main}() /var/www/MY_DOMAIN/wp-admin/post.php:0
    [12-Nov-2022 05:30:33 UTC] PHP   2. post_preview() /var/www/MY_DOMAIN/wp-admin/post.php:336

    I think that ID refers to the new post ID, this is always null?

    Regars,
    Jordi
    JOINSO

    Thread Starter joinso

    (@joinso)

    In the access logs I get this:

    XXXXXXXXXXXXX – – [12/Nov/2022:06:26:58 +0100] “GET /administracio/post-new.php?post_type=page HTTP/1.1” 200 48049
    XXXXXXXXXXXXX – – [12/Nov/2022:06:27:05 +0100] “POST /administracio/admin-ajax.php HTTP/1.1” 200 236
    XXXXXXXXXXXXX – – [12/Nov/2022:06:27:13 +0100] “POST /administracio/post.php HTTP/1.1” 302 26020
    XXXXXXXXXXXXX – – [12/Nov/2022:06:27:14 +0100] “GET /administracio/edit.php HTTP/1.1” 200 31208

    Thread Starter joinso

    (@joinso)

    More info.
    I cannot activate plugins.
    No erros.
    I have to activate them by code…

    Thread Starter joinso

    (@joinso)

    More info:

    When I trying to edit an existing page and save:
    for example: https://MY_DOMAIN/wp-admin/post.php?post=1027&action=edit&lang=ca
    the website opens a new tab and redirects to:
    https://MY_DOMAIN/wp-admin/edit.php
    I never have seen this before…

    Thread Starter joinso

    (@joinso)

    And more info:

    I installed a clean wordpress 6.1 in the same server.

    And I found some interesting things:

    1) If try to create a page in browser console I see this:

    Uncaught (in promise) {code: ‘invalid_json’, message: ‘The response is not a valid JSON response.’}
    Promise.then (async)
    (anonymous) @ data.min.js?ver=d8cf5b24f99c64ae47d6:2
    (anonymous) @ data.min.js?ver=d8cf5b24f99c64ae47d6:2
    (anonymous) @ data.min.js?ver=d8cf5b24f99c64ae47d6:2
    (anonymous) @ post-new.php?post_type=page:1740
    (anonymous) @ post-new.php?post_type=page:1741

    2) if I try to publish the page it says:

    Updating failed. The response is not a valid JSON response.

    After doing some research I try this:

    – Update permalinks setup: it does not work.

    Try to install “Classic Editor”, and I get another surprise:

    It says that install failed, but I see the plugin in the list.
    So I try to activate, and for a little moment, I see a message like “something went wrong…”
    But I got redirected to plugins list, and I see the message:
    Plugin deactivated.
    The plugin is correctly “deployed” in the plugins folder….

    Very strange….

    Any idea????

    Thread Starter joinso

    (@joinso)

    And more info from logs:

    As you can see …. a lot of warnings saying “PHP Warning: Cannot modify header information – headers already sent by….”

    How can this happpens in a clean wordress….??????

    [13-Nov-2022 15:53:54 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /var/www/MY_DOMAIN/wp-includes/functions.php:3792) in /var/www/MY_DOMAIN/wp-admin/admin-header.php on line 9
    [13-Nov-2022 15:53:54 UTC] PHP Stack trace:
    [13-Nov-2022 15:53:54 UTC] PHP 1. {main}() /var/www/MY_DOMAIN/wp-admin/plugins.php:0
    [13-Nov-2022 15:53:54 UTC] PHP 2. require_once() /var/www/MY_DOMAIN/wp-admin/plugins.php:161
    [13-Nov-2022 15:53:54 UTC] PHP 3. header($header = ‘Content-Type: text/html; charset=UTF-8’) /var/www/MY_DOMAIN/wp-admin/admin-header.php:9
    [13-Nov-2022 15:53:54 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /var/www/MY_DOMAIN/wp-includes/functions.php:3792) in /var/www/MY_DOMAIN/wp-includes/option.php on line 1138
    [13-Nov-2022 15:53:54 UTC] PHP Stack trace:
    [13-Nov-2022 15:53:54 UTC] PHP 1. {main}() /var/www/MY_DOMAIN/wp-admin/plugins.php:0
    [13-Nov-2022 15:53:54 UTC] PHP 2. require_once() /var/www/MY_DOMAIN/wp-admin/plugins.php:161
    [13-Nov-2022 15:53:54 UTC] PHP 3. wp_user_settings() /var/www/MY_DOMAIN/wp-admin/admin-header.php:86
    [13-Nov-2022 15:53:54 UTC] PHP 4. setcookie($name = ‘wp-settings-1’, $value = ”, $expires_or_options = 1699890834, $path = ‘/’, $domain = ”, $secure = TRUE) /var/www/MY_DOMAIN/wp-includes/option.php:1138
    [13-Nov-2022 15:53:54 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /var/www/MY_DOMAIN/wp-includes/functions.php:3792) in /var/www/MY_DOMAIN/wp-includes/option.php on line 1139
    [13-Nov-2022 15:53:54 UTC] PHP Stack trace:
    [13-Nov-2022 15:53:54 UTC] PHP 1. {main}() /var/www/MY_DOMAIN/wp-admin/plugins.php:0
    [13-Nov-2022 15:53:54 UTC] PHP 2. require_once() /var/www/MY_DOMAIN/wp-admin/plugins.php:161
    [13-Nov-2022 15:53:54 UTC] PHP 3. wp_user_settings() /var/www/MY_DOMAIN/wp-admin/admin-header.php:86
    [13-Nov-2022 15:53:54 UTC] PHP 4. setcookie($name = ‘wp-settings-time-1’, $value = 1668354834, $expires_or_options = 1699890834, $path = ‘/’, $domain = ”, $secure = TRUE) /var/www/MY_DOMAIN/wp-includes/option.php:1139
    [13-Nov-2022 15:53:54 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /var/www/MY_DOMAIN/wp-includes/functions.php:3792) in /var/www/MY_DOMAIN/wp-includes/pluggable.php on line 1416
    [13-Nov-2022 15:53:54 UTC] PHP Stack trace:
    [13-Nov-2022 15:53:54 UTC] PHP 1. {main}() /var/www/MY_DOMAIN/wp-admin/plugins.php:0
    [13-Nov-2022 15:53:54 UTC] PHP 2. wp_redirect($location = ‘https://MY_DOMAIN/wp-admin/plugins.php?plugin_status=all&paged=1&s=’, $status = *uninitialized*, $x_redirect_by = *uninitialized*) /var/www/MY_DOMAIN/wp-admin/plugins.php:247
    [13-Nov-2022 15:53:54 UTC] PHP 3. header($header = ‘X-Redirect-By: WordPress’) /var/www/MY_DOMAIN/wp-includes/pluggable.php:1416

    Thread Starter joinso

    (@joinso)

    More info…

    When I try to activate a plugin, I see this in logs:

    91.116.22.120 – – [14/Nov/2022:13:02:48 +0100] “GET /wp-admin/plugins.php?action=activate&plugin=classic-editor%2Fclassic-editor.php&plugin_status=all&paged=1&s&_wpnonce=6bf8c241f8 HTTP/1.1” 403 67144
    91.116.22.120 – – [14/Nov/2022:13:02:48 +0100] “POST /wp-admin/admin-ajax.php HTTP/1.1” 200 207
    91.116.22.120 – – [14/Nov/2022:13:02:48 +0100] “GET /wp-admin/update.php?action=update-selected&plugins&_wpnonce=ac3dc537ed HTTP/1.1” 200 6970

    Why the 403 error, if I am logged????

    Regards,
    Jordi
    JOINSO

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WordPress 6.1: Cannot add new page (post)’ is closed to new replies.