Problem/Motivation
If a node has been saved with an empty uuid (ie, there is a record for the uuid in the uuid_node table, but it is blank, any update op attempting to provide a real uuid to that node will fail as the code assumes there was no pre-existing row in the uuid_node table, and will attempt an insert, which fails, instead of an update.
Proposed resolution
I have identified the problem as stemming from making the determination of whether to insert or update based on the emptiness of the $uuid_information['uuid'] var, rather than it being set to FALSE. empty does not indicate that there is no value in the database, only that the uuid may be empty. However, if this is FALSE, it means there was no previous row in the uuid_node table, and an insert can be attempted.
Remaining tasks
Patch needs to be contributed to address the issue.
User interface changes
None.
API changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | allow_empty_uuid_values_to_be_updated-1599496-1.patch | 1.25 KB | apotek |
Comments
Comment #1
apotek commentedAnd here's the patch.
Comment #2
apotek commentedComment #4
skwashd commentedThanks for the patch, it has been applied (97fe52a) and will be included in the next release of this module.