question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rich text page links use admin display title instead of regular title

See original GitHub issue

Issue Summary

When inserting a link to a page from the rich text editor, the anchor text that is pre-populated (if you haven’t selected some text to anchor) is generated from the admin page title (Page.get_admin_display_title). This is not expected behaviour, because this is not the public page title that is visible on the published page.

Steps to Reproduce

  1. Override Page.get_admin_display_title on a page model - for example to include some additional context about the page such as when it was created. This should only be visible when viewing pages in the admin.
  2. In a rich text field, add a link to this page. The auto-populated anchor text will use the admin display title instead of just the title field value.

Technical details

  • Python version: 3.6
  • Django version: 2.0
  • Wagtail version: master

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
gasmancommented, Aug 8, 2019

@chosak Sorry, I should have been more specific there… I think the use of the draft title as the default link text for generated links in rich text is an oversight. Displaying the draft title to editors within listings etc is appropriate (and so no changes to get_admin_display_title are necessary), but that’s where it should end - the draft title shouldn’t find its way into other pages’ content.

(This does mean that in this one specific case, where a title has been edited in draft, there’ll be a slightly jarring effect where the editor sees one title in the listing, clicks on it, and ends up with a different title as the link text. I think that behaviour is justified, though.)

0reactions
gasmancommented, Aug 12, 2019

Fixed in #5491

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using the rich text editor for content
In your Shopify admin, click the Show HTML button on the rich text editor for the content ... Enter a short description of...
Read more >
Configure the Rich Text Editor | Adobe Experience Manager
Learn to configure the AEM Rich Text Editor. ... To know how to use RTE features for authoring, see Use Rich Text Editor...
Read more >
lightning-formatted-rich-text - documentation
Displays rich text that's formatted with allowed tags and attributes. Other tags and attributes are removed and only their text content is displayed....
Read more >
Editing Content in the Rich Text Editor
Editing Content in the Rich Text Editor. Click “Show Editor”, or double click within the rich text editor window to open the “RICH...
Read more >
Rich text internals
At first glance, Wagtail's rich text capabilities appear to give editors direct ... pages will generally reserve the <h1> element for the page...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found