Problem/Motivation
There is a link "Add new change record" at the top of the CR overview page. For some projects, the link ends with a token [field_project] instead of being replaced with a number, which seems to be the correct behavior. As a result, the project field on the "Create new change record" form is not prepopulated for these projects.
Some affected projects:
- https://www.drupal.org/list-changes/drupalorg_crosssite
- https://www.drupal.org/list-changes/language_switcher_menu
- https://www.drupal.org/list-changes/entity_language_access
Some unaffected projects:
- https://www.drupal.org/list-changes/drupalorg
- https://www.drupal.org/list-changes/gitlab_templates
- https://www.drupal.org/list-changes/eca
Steps to reproduce
For an affected project:
- Click on View change records in the sidebar of the project page to get to the CR overview page.
- Right below the tabs there is a link "Add new change record"
Actual result
For some projects, the link ends with a token [field_project]. As a result, the project field on the "Create new change record" form is not prepopulated for these projects.
Expected result
The the link ends with an integer. The project field on the "Create new change record" form is prepopulated with the correct project name.
Proposed resolution
Unclear, as the exact cause is unclear.
Remaining tasks
Debug. Propose a fix. Review. Commit.
User interface changes
The link works as expected.
API changes
tbd
Data model changes
tbd
Comments
Comment #2
feyp commentedComment #3
fjgarlin commentedInvestigation:
- The view "change_records" on D7 is using the token "[field_project]" in the header to generate the link.
Sometimes it works, sometimes it doesn't. There doesn't seem to be any custom code around it.
Comment #4
fjgarlin commentedThis happens when the view has no results. Same project:
- 1 result, link is good: https://fjgarlin-drupal.dev.devdrupal.org/list-changes/drupalorg_crosssi...
- 0 results, link is wrong: https://fjgarlin-drupal.dev.devdrupal.org/list-changes/drupalorg_crosssi...
The fix is to change the header area from:
<a href="/node/add/changenotice?field_project=[field_project]">Add new change record</a>to:
<a href="/node/add/changenotice?field_project=!1">Add new change record</a>This can be done in the different displays where needed and then export the feature. @drumm can do that when he's back from holiday.
Comment #5
fjgarlin commentedComment #7
drummThanks, the fix for this will be in the next deployment, which might not be for a few days.