-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HREF with reference.content_path in UsageView doesn't do anything #12014
Comments
Confirmed. For StreamField block references, for example, the ref path is something like For regular fields, ref is something the id in the editor is This was flagged in #10007 |
This is a tricky problem, because the panel IDs we have in the HTML are generated differently for different wagtail/wagtail/admin/templates/wagtailadmin/shared/panel.html Lines 19 to 20 in 49ef727
wagtail/wagtail/admin/panels/group.py Lines 101 to 106 in 49ef727
wagtail/wagtail/admin/panels/inline_panel.py Lines 108 to 113 in 49ef727
wagtail/wagtail/blocks/struct_block.py Lines 350 to 352 in 49ef727
wagtail/client/src/components/StreamField/blocks/BaseSequenceBlock.js Lines 134 to 136 in 49ef727
The reference index stores a "content path" to the reference in a given model instance, which is unrelated to how the string for the panel ID is generated. To fix this issue, we need to either:
|
Issue Summary
In the UsageView for a Page or Snippet, the Field column displays a list of fields containing a reference to that object. In references_cell.html, each reference is wrapped in a link to that object's edit view, appended with
#content-path-{{ reference.content_path }}
. This appears to be meant as a way to jump to that specific field when opening the edit page, but no such ids are present on the elements and so they don't do anything - each link just opens the edit page from the top content, as usual.Steps to Reproduce
edit/#content-path-body_streamfield.85af2509-0a67-4848-9808-b5f432492258
, but no such id exists on the page.Technical details
Working on this
Anyone can contribute to this. View our contributing guidelines, add a comment to the issue once you’re ready to start.
The text was updated successfully, but these errors were encountered: