• Resolved Alex

    (@alex4711)


    Hi,
    Before and after the upgrade to 12.8 I wordpress shows the “This site has encountered a technical problem.” message (wording might be different). This happens when editing a post, but I also encountered it while browsing the media library. I’m using a custom (child-) theme of Laurel with some changes. But I did not change the code since several weeks.

    Here is a snippet from the mail WordPress has sent:

    #WordPress-Version 5.3.2
    Current Theme: Laurel Meermond (Version 1.0.0)
    Current Plugin: Yoast SEO (Version 12.8)
    PHP-Version 7.3.11-1+0~20191026.48+debian9~1.gbpf71ca0###

    #

    Fehler-Details
    ==============
    Ein Fehler vom Typ E_ERROR wurde in der Zeile 406 der Datei /home/www/wordpress/wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php verursacht. Fehlermeldung: Uncaught Error: Call to undefined method Yoast_Notification::get_user_id() in /home/www/wordpress/wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php:406
    Stack trace:
    #0 /home/www/wordpress/wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php(279): Yoast_Notification_Center->remove_notification(Object(Yoast_Notification))
    #1 /home/www/wordpress/wp-includes/class-wp-hook.php(288): Yoast_Notification_Center->setup_current_notifications(”)
    #2 /home/www/wordpress/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array)
    #3 /home/www/wordpress/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #4 /home/www/wordpress/wp-settings.php(523): do_action(‘init’)
    #5 /home/www/wordpress/wp-config.php(121): require_once(‘/home/www/wordp…’)
    #6 /home/www/wordpress/wp-load.php(37): require_once(‘/home/www/wordp…’)
    #7 /home/www/wordpress/wp-admin/admin.php(34): require_once(‘/home/www/wordp…’)
    #8 /home/www/wordpress/wp-admin/edit.php(10): require_once(‘/home/####

    Did anybode else encounter this problem?

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • I had the same problem this morning when I updated my yoast version to v12.8.
    I manage to bypass the bug by commenting the following code in the “wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php” :

    Before :

    public function remove_notification( Yoast_Notification $notification, $resolve = true ) {
    
    		$callback = [ $this, __METHOD__ ];
    		$args     = func_get_args();
    		if ( $this->queue_transaction( $callback, $args ) ) {
    			return;
    		}
    
    		$index = false;
    
    		// ID of the user to show the notification for, defaults to current user id.
    		$user_id                = $notification->get_user_id();
    		$notifications = $this->get_notifications_for_user( $user_id );
    
    		// Match persistent Notifications by ID, non persistent by item in the array.
    		if ( $notification->is_persistent() ) {
    			foreach ( $notifications as $current_index => $present_notification ) {
    				if ( $present_notification->get_id() === $notification->get_id() ) {
    					$index = $current_index;
    					break;
    				}
    			}
    		}
    		else {
    			$index = array_search( $notification, $notifications, true );
    		}

    After :

    public function remove_notification( Yoast_Notification $notification, $resolve = true ) {
    
    		$callback = [ $this, __METHOD__ ];
    		$args     = func_get_args();
    		if ( $this->queue_transaction( $callback, $args ) ) {
    			return;
    		}
    
    		$index = false;
    
    		// ID of the user to show the notification for, defaults to current user id.
    		/*$user_id                = $notification->get_user_id();
    		$notifications = $this->get_notifications_for_user( $user_id );
    
    		// Match persistent Notifications by ID, non persistent by item in the array.
    		if ( $notification->is_persistent() ) {
    			foreach ( $notifications as $current_index => $present_notification ) {
    				if ( $present_notification->get_id() === $notification->get_id() ) {
    					$index = $current_index;
    					break;
    				}
    			}
    		}
    		else {
    			$index = array_search( $notification, $notifications, true );
    		}*/

    It is just a temporary fix, while we wait for the Yoast team to correct the bug, but it worked for me.

    @alex4711

    That sounds like a plugin or theme conflict. Can you try and gather as much information for us as possible? Please perform the following:

    1. Please Check for conflicts.

    2. Check for JavaScript errors with your console.

    If you find any JavaScript errors related to Yoast SEO or if there is a conflict with a plugin or a theme, you can create a new GitHub issue?for our developers. Please report the issue to a third party developer as well.

    If you didn’t find any conflicts or errors, we think the issue is specific to your site. We’d need to investigate further but are unable to do so on these forums. You can purchase Yoast SEO Premium?and receive our Premium email support and we can help you further.

    @floriantactisens

    If you are still experiencing the issue per the forum guidelines, we ask that you please create separate topics for the issues you are experiencing. That way it’s easier to track issues and provide assistance on your specific concerns on your specific site. Plus, you will get your own alerts for the issue rather than someone else’s. You may make a new topic here: https://www.ads-software.com/support/plugin/wordpress-seo/#new-post. Thanks!

    Thread Starter Alex

    (@alex4711)

    Hi and thank you for your detailed answer. Currently we don’t experience the issue anymore, which is great! If it occurs again I’ll come with more detailed information as requested and required.

    Thanks for your effort and great work!

    Hi @pcosta88 ,

    Thanks for your answer, I actually didn’t have time to do what you said, but tonight I updated to the 12.8.1 version and it’s working now. I checked into the file that I had changed and it’s back to normal without my commented code so everything’s great.

    Thanks again and good job,
    Florian

    Hello everyone, I also have a problem with yoast seo. Since I updated to 12.8 I can no longer make any settings in yoast. Can someone help me? I hope that a wp update will come soon and the problem will be solved. I’m already desperate.
    Best regards
    Thomas

    I just got this error (Uncaught Error: Call to undefined method Yoast_Notification::get_user_id() after updating to 13.1 from earlier version, not sure which version updated from, but recently updated (last month or two). Same exact behavior. I am using press customizer theme, minimal well-tested and updated plugins. Seems to be OK, after generating the error. I haven’t had problems with updating Yoast before, have been using it for years.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WordPress technical problem with yoast 12.8’ is closed to new replies.