Where is error while update:

drush @lom.dev updatedb -y
// Requirements check reports errors. Do you wish to continue?: yes.

------------ ----------------------- ------------- ---------------------------
Module Update ID Type Description
------------ ----------------------- ------------- ---------------------------
paragraphs rebuild_parent_fields post-update Update the parent fields
with revisionable data.
@param array &$sandbox
The sandbox array.
------------ ----------------------- ------------- ---------------------------

// Do you wish to run the specified pending updates?: yes.

> [notice] Update started: paragraphs_post_update_rebuild_parent_fields
> [error] SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))
> ORDER BY p.revision_id ASC
> LIMIT 100 OFFSET 0' at line 2: SELECT f.entity_id AS entity_id, f.field_price_set_target_revision_id AS field_price_set_target_revision_id
> FROM
> {profile_revision__field_price_set} f
> INNER JOIN {paragraphs_item_revision_field_data} p ON f.field_price_set_target_revision_id = p.revision_id
> WHERE (((p.parent_id <> f.entity_id)) OR (p.parent_type <> :db_condition_placeholder_0) OR (p.parent_field_name <> :db_condition_placeholder_1)) AND ((p.langcode = f.))
> ORDER BY p.revision_id ASC
> LIMIT 100 OFFSET 0; Array
> (
> [:db_condition_placeholder_0] => profile
> [:db_condition_placeholder_1] => field_price_set
> )
>
> [error] Update failed: paragraphs_post_update_rebuild_parent_fields
[error] Update aborted by: paragraphs_post_update_rebuild_parent_fields
[error] Finished performing updates.

CommentFileSizeAuthor
#3 paragraphs-no-langcode-3073486-3.patch1001 bytesberdir

Comments

super_romeo created an issue. See original summary.

berdir’s picture

Priority: Normal » Critical

Thanks for testing and reporting. Marking as a critical release blocker.

This seems to be a paragraph field on a profile entity, which apparently doesn't have a language field. We need to make the language comparison conditional then.

berdir’s picture

Status: Active » Needs review
StatusFileSize
new1001 bytes

This should fix this.

super_romeo’s picture

Status: Needs review » Reviewed & tested by the community

Thank you, Berdir! With patch #3 update passed.

berdir’s picture

Title: Update failed: paragraphs_post_update_rebuild_parent_fields » paragraphs_post_update_rebuild_parent_fields() fails on host entity without language field
Status: Reviewed & tested by the community » Fixed

Thanks for confirming, committed.

berdir’s picture

  • Berdir committed 6c7c0a0 on 8.x-1.x
    Issue #3073486 by Berdir: paragraphs_post_update_rebuild_parent_fields...
donaldp’s picture

My code is using PostgreSQL rather than MySql and I've believe it's got a similar issue: I'll see if I can create a similar patch for that.

> [notice] Update started: paragraphs_post_update_rebuild_parent_fields
> [error] SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: character varying <> bigint
> LINE 5: WHERE (((p.parent_id <> f.entity_id)) OR (p.parent_type <> '...
> ^
> HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.: SELECT f.entity_id AS entity_id, f.field_associated_documents_target_revision_id AS field_associated_documents_target_revision_id, p.revision_id AS prevision_id
> FROM
> {node_revision__field_associated_documents} f
> INNER JOIN {paragraphs_item_revision_field_data} p ON f.field_associated_documents_target_revision_id = p.revision_id
> WHERE (((p.parent_id <> f.entity_id)) OR (p.parent_type <> :db_condition_placeholder_0) OR (p.parent_field_name <> :db_condition_placeholder_1)) AND ((p.langcode = f.langcode))
> ORDER BY p.revision_id ASC NULLS FIRST
> LIMIT 100 OFFSET 0; Array
> (
> [:db_condition_placeholder_0] => node
> [:db_condition_placeholder_1] => field_associated_documents
> )
>
> [error] Update failed: paragraphs_post_update_rebuild_parent_fields

Posted new issue here: #3076584: paragraphs_item_revision_field_data() fails with PostgreSQL

berdir’s picture

Please create a new issue, that's a different problem.

donaldp’s picture

OK. Will try to do this later today. Just back from Holiday and have pile of things to look into.
See: #3076584: paragraphs_item_revision_field_data() fails with PostgreSQL

tomhollevoet’s picture

@Berdir I get a related issue.
See https://www.drupal.org/project/paragraphs/issues/3076648 with a possible solution.
Thanks for the review!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.