Problem/Motivation
#3192585-10: Fix up topics to use new help_topic_link function noted that when a topic is missing (due to a module not being installed, a topic being deleted, or a typo by a developer), the generated link just says "Missing topic name", which is not very helpful. Here's an example from an in-development patch:
It would be better if it gave you the ID of the missing topic, so at least you would have an idea what the topic was supposed to be about.
Steps to reproduce
To reproduce this, you would need to edit one of the help topic files to call the help_topic_link() function with a non-existing topic name as the first argument. Our current help topics only make links to topics that exist, and only to topics in the same module or one of its dependencies.
Proposed resolution
If the help_topic_link() Twig function encounters a missing topic, make the fallback text include the topic ID. This is similar to the way missing modules are displayed on the module listing on admin/modules.
Remaining tasks
- discuss
- patch/commit
User interface changes
Instead of just saying "Missing help topic", the text for a missing help topic link will include the topic ID.
API changes
no
Data model changes
no
Release notes snippet
no
Comment | File | Size | Author |
---|---|---|---|
#3 | 3213022-3.patch | 1.18 KB | andypost |
Comments
Comment #2
jhodgdonUpdating issue summary to clarify.
Also andypost do you want to make a patch? Seems you already posted a patch on on #15 of that issue. It would just need a test.
Comment #3
andypostI think it should be enough for test coverage
Comment #4
mitthukumawat CreditAttribution: mitthukumawat as a volunteer and at Zyxware Technologies for Drupal Association commentedI have cleanly applied the patch and the help topic link has been generated.
Comment #5
daffie CreditAttribution: daffie commented@mitthukomawat: Could you do a full review. See: https://www.drupal.org/community/contributor-guide/task/review-a-patch-o...
Comment #6
jhodgdonI have reviewed the patch code and test update, and they both look good to me. Manually testing this patch requires creating a topic where there is a link to a nonexistent topic (which we try to avoid in actual topics). The test coverage does exactly that, and since the test passes, that has been verified. This is a super simple patch, plus a good idea, so I think that is good enough to mark it RTBC.
I am reclassifying this as a bug report, because it seems like a usability bug if you get "Missing help topic" with no further information when a topic is missing.
Comment #7
larowlanCommitted d2647ca and pushed to 9.3.x. Thanks!
Backported to 9.2.x