Domain needs a domain record with ID=0.
The same issue is also known from anonymous user with ID=0.
There are some migration tools that destroy data integrity because inserting an undefined (NULL) record leads to creation of an autoincrement index.
Thus there's some risk that the default domain gets an arbitrary next autoincrement value and default domain with ID=0 is missing.
Missing default domain leads to complete misbehaviour and especially redirection loops on settings forms like
/admin/structure/domain/edit/$ID
I suggest to add a hook_requirements to check if the record exists.
Do you support this?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | domain-update.png | 11.18 KB | agentrickard |
| #6 | domain-update-form.png | 21.78 KB | agentrickard |
| #5 | 1247278-zero-id.patch | 11.83 KB | agentrickard |
| #4 | 1247278-zero-id.patch | 6.97 KB | agentrickard |
| #2 | 1247278-zero-id.patch | 5.94 KB | agentrickard |
Comments
Comment #1
agentrickardYes. We also need this for 7.x.3, which does away with domain 0 and needs to check that the update ran properly.
Comment #2
agentrickardPatch for 7.x.3 requirements. We need something different for 7.x.2.
Comment #3
agentrickardNeeds a test and a drush command.
Comment #4
agentrickardAnd the patch with a drush command (domain-repair).
Comment #5
agentrickardHere's a working patch (with drush and tests) that can be used for a stable upgrade process. It has been committed.
Needs a rewrite for the 7.x.2 branch, if we want the original feature.
Comment #6
agentrickardScreenshots for use in docs.
Comment #7
miro_dietikerVery nice progress.
Comment #8
agentrickardIt's not quite the same issue, but this technique can be used in 7.x.2 as well.
The original issue is not applicable to 7.x.3.
Comment #9
dqd