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 is an issue in the hook 'xmlsitemap_form_alter'. The code for this function has been changed in the recent update and it affected the form fields on node add form. Earlier the fields were appearing in the node add form, but not we can see the fields only on the node edit form.
This also means we're missing some test coverage for this.
Comment | File | Size | Author |
---|---|---|---|
#18 | 3106767-test-coverage.patch | 4.32 KB | Dave Reid |
| |||
#16 | 3106767-test-coverage.patch | 3.18 KB | Dave Reid |
#10 | 3106767-10.patch | 1.94 KB | voleger |
#10 | 3106767-10-test-only.patch | 886 bytes | voleger |
Comments
Comment #2
Dave ReidYes, you're right. It appears that node/add uses the form operation of 'default', while the node/{node}/edit route has a form operation of 'edit'. So let's just make this check both for default or edit, instead of conditionally just one.
Comment #3
Dave ReidComment #4
Dave ReidLet's see if this adds the coverage we need.
Comment #5
andralex CreditAttribution: andralex at EPAM Systems commentedTested and it works as expected with #4
Comment #6
alex_optimFor me too.
Comment #7
ilgnerfagundes CreditAttribution: ilgnerfagundes at CI&T commentedThe patch was applied correctly.
Comment #8
volegerPatch needs reroll
Comment #9
volegerI'll reroll it
Comment #10
volegerHere is rerolled patch
Comment #12
pifagorComment #14
pifagorComment #16
Dave ReidReopening for some additional test coverage I had intended to add.
Comment #18
Dave ReidOk so I needed to reset the entity access cache after saving a programmatic entity. And the form op for new users is 'register' so I added support for that.
Comment #20
Dave ReidCommitted #18 to 8.x-1.x. Glad to have increased test coverage around this.