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.
Independent from we add new one or edit existing domain, I always see 'Domain record updated.' message.
That's because we have this code in domain_form_submit():
if (!empty($values['domain_id']) || $values['domain_id'] == 0) {
$message = t('Domain record updated.');
}
else {
$message = t('Domain record created.');
}
Second part of first condition will be true even in case of new domain.
Comment | File | Size | Author |
---|---|---|---|
#2 | fix-create-message-2610646-2.patch | 504 bytes | IRuslan |
Comments
Comment #2
IRuslan CreditAttribution: IRuslan as a volunteer and at DrupalJedi commentedPatch in attachment.
Comment #3
kjala CreditAttribution: kjala as a volunteer commentedI was able to replicate the stated problem on 7.x-3.11 version. I have tested the patch and the new domain record creation now shows the correct message. The previous OR condition $values['domain_id'] == 0 might be there to support default domain with ID 0 . Given that the domain id's are not zero's anymore, I think it can be removed.
unless any other reviewer or agentrickard finds something, I think this patch is good to go. Changing it to RTBC
Comment #5
agentrickardCorrect on both counts. This might work if we used === 0, but it's no longer relevant.