πŸ‡΅πŸ‡±Poland @michal_liszka

Account created on 3 June 2022, almost 3 years ago
#

Merge Requests

Recent comments

πŸ‡΅πŸ‡±Poland michal_liszka

@alfattal

After updating Drupal from version 10.1 to 10.4.4 and running drush deploy, the hook_update_N for yoast_seo did not execute properly, even though there was no custom code on the site that could interfere with this process.

While navigating through the admin panel, an error occurred: Undefined property: stdClass::$field_real_time_seo_description in Drupal\Core\Entity\Sql\SqlContentEntityStorage->loadFromDedicatedTables(), and the Status Report displayed an error message stating that the field must be updated for the yoast_seo field. In some cases, simply opening the field’s edit page and saving it is enough to trigger the update. However, in this case, when trying to edit the field, I encountered an SQL error, which I described in my previous comment.

Since the field_real_time_seo_title and field_real_time_seo_description fields were not manually added, I searched the yoast_seo folder for references to β€œtitle” and β€œdescription” and found yoast_seo_update_8202. Within this hook_update, these fields are added to the database schema.

One possible solution, which I could apply in this case, is to either temporarily modify the update number in the code (e.g., changing 8202 to 8205 and then reverting it) or reset the module’s update number entirely and rerun the yoast_seo_N sequence.

Here is the sequence of steps to resolve this issue:
1. Edit the file directly:
vi modules/contrib/yoast_seo/yoast_seo.install
Change the update number, for example, from 8202 to 8205.
2. Update the hook registry:
drush ev "\Drupal::service('update.update_hook_registry')->setInstalledVersion('yoast_seo', 8204);"
where 8204 is the actual last executed hook update.

This approach ensures that the update runs correctly and resolves the issue with the missing fields.

πŸ‡΅πŸ‡±Poland michal_liszka

I had the same issue, but I figure out an error: `Undefined property: stdClass::$field_real_time_seo_description in Drupal\Core\Entity\Sql\SqlContentEntityStorage->loadFromDedicatedTables() ` is caused by

Column not found: 1054 Unknown col  
  umn 'field_real_time_seo_title' in 'where clause': SELECT 1 AS "expression"                             
  FROM                                                                                                    
  "node_revision__field_real_time_seo" "t"                                                                
  WHERE ("field_real_time_seo_status" IS NOT NULL) OR ("field_real_time_seo_focus_keyword" IS NOT NULL)   
  OR ("field_real_time_seo_title" IS NOT NULL) OR ("field_real_time_seo_description" IS NOT NULL)         
  LIMIT 1 OFFSET 0; Array                                                                                 
  (                                                                                                       
  ) 

So I just found where exactly these fields were added: `yoast_seo_update_8202` and just re-run this single hook_update.

That's work for me and everythink works fine.

πŸ‡΅πŸ‡±Poland michal_liszka

Despite applying patch #2 for Drupal 10, the problem persists when request the controller for a response via AJAX dialogs.
The first request executes correctly, and the response is accurate on the second attempt. However, the same error continues to occur:
An error occurred during the execution of the Ajax response: LoadJS

Code snippet:

<a
   href="{{ url('controller_route_name') }}"
   class="use-ajax"
   data-dialog-options="{{ dialog_options|json_encode() }}"
   data-dialog-type="modal"
   data-ajax-http-method="GET"
>
Production build 0.71.5 2024