Closed (fixed)
Project:
Paragraphs
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2019 at 19:31 UTC
Updated:
4 Jun 2020 at 09:19 UTC
Jump to comment: Most recent
While updating the module (drush updatedb):
Failed: Drupal\Core\Database\DatabaseExceptionWrapper: 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 'AS [error]
FROM
node_revision__field_address f
INNER JOIN paragraphs_item_revision_fiel' at line 1: SELECT f.entity_id AS entity_id, f. AS
FROM
{node_revision__field_address} f
INNER JOIN {paragraphs_item_revision_field_data} p ON f. = 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)
ORDER BY p.revision_id ASC
LIMIT 100 OFFSET 0; Array
(
[:db_condition_placeholder_0] => node
[:db_condition_placeholder_1] => field_address
)
in paragraphs_post_update_rebuild_parent_fields() (regel 240 van /var/www/html/web/modules/contrib/paragraphs/paragraphs.post_update.php).
If I check the $current_field array, the revision_column is NULL for multiple fields on my site. Strange?
array(6) {
["entity_type_id"]=>
string(4) "node"
["field_name"]=>
string(13) "field_address"
["revision_table"]=>
string(28) "node_revision__field_address"
["entity_id_column"]=>
string(9) "entity_id"
["revision_column"]=>
NULL
["langcode_column"]=>
string(8) "langcode"
}
See Patch.
Review patch.
None
None
None
| Comment | File | Size | Author |
|---|---|---|---|
| paragraphs_no_revision_column_name.patch | 721 bytes | tomhollevoet |
Comments
Comment #2
spokjeExact same error using the same (
drush updb) method.Weirdly this is the first out of 25 sites that fails in this way. All others had no problems at all.
Anyway: RTBC for me.
Comment #3
spokjeComment #4
berdirfield_address? Is that really a paragraph field or is it something else?
Comment #5
spokje@Berdir:
In my case the error is/was:
So at the very least the parent is a paragraph.
Looking at the report at
/admin/reports/fields:Comment #6
spokje(Semi?) Interesting addendum: If I do the paragraphs update together with a Drupal Core update from D8.6.17 => D8.7.7, the patch is not needed and the post-update does not fail on the mentioned field.
Comment #7
berdirI'm more interested in the target entity type of field_p_tl_tiles than its host entity type :)
Comment #8
spokjeIts parent is another Paragraph.
Comment #9
berdirI still don't understand when this happens, but it shouldn't interfere with anything that currently works. We have upgrade path tests now, they work, the sqlite fails seem unrelated.