Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There are some contrib entities without uuid support that leads to SQL errors
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 #012FROM #012crm_core_contact t#012WHERE (contact_id IN ('2816'))' at line 1: SELECT t.contact_id AS contact_id, t. AS #012FROM #012{crm_core_contact} t#012WHERE (contact_id IN (:db_condition_placeholder_0)) ; Array#012(#012 [:db_condition_placeholder_0] => 2816#012)#012 in entity_get_uuid_by_id() (line 476 of /var/www/sj-lou/sites/all/modules/contrib/uuid/uuid.entity.inc).
also this fix an error during uuid_update_7103
[error]
SQL syntax; check the manual that corresponds to your MySQL server version for the
right syntax to use near 'AS , t.nid AS nid
FROM
node t
WHERE ( IN ('b0558664-c94b-3674-d9df-3e1696b2e4' at line 1
Performed update: uuid_update_7103
I have attached a patch for ability to skip them during conversion from references to uuid
Comment | File | Size | Author |
---|---|---|---|
#5 | 2356305-5.patch | 891 bytes | dixon_ |
Comments
Comment #1
podarokComment #2
dixon_Everywhere else in the UUID module we do the checks on
$info['uuid']
so I think that would be better and more consistent.I've also added the same check in
entity_get_id_by_uuid()
.@podarok If all tests still pass, and you think this looks good then I'll commit this soon.
Comment #4
podarokWe should't add check additionally. It is enouph to check it only once in the place, added by my patch
Comment #5
dixon_Yes, you might not see the problem in your setup. But the same problem still exist in
entity_get_id_by_uuid()
.I used the wrong variable name in the previous patch, here's a new one. The tests should come back green for this one...
Comment #6
dixon_Passing to @skwashd for him to review.
Comment #7
skwashd CreditAttribution: skwashd commentedPatch looks good to me.
Comment #8
skwashd CreditAttribution: skwashd commentedComment #9
podarok+1 RTBC
Comment #10
skwashd CreditAttribution: skwashd commentedThis was committed by @dixon_ but he stuffed up the commit message so it didn't reference the issue. Closing.