floriantactisens
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
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,
FlorianI 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.
- This reply was modified 6 years, 4 months ago by floriantactisens.
Viewing 2 replies - 1 through 2 (of 2 total)