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.

Comments

apotek’s picture

And here's the patch.

apotek’s picture

Status: Active » Needs review
skwashd’s picture

Status: Needs review » Fixed

Thanks for the patch, it has been applied (97fe52a) and will be included in the next release of this module.

Status: Fixed » Closed (fixed)

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