When using the token filter module with a newly added paragraph, tokens go into the title instead.

Created on 2 August 2024, 5 months ago

Problem/Motivation

Using Token Filter provides a modal in ckeditor5 to add tokens to the content.

If I add a new paragraph with a ckeditor field, then click into the ckeditor field and open the token modal. Any tokens added get added to the title.
If manually enter text then save the page and open it back up. If I then add the cursor to the ckeditor5 field and open the token modal it works as expected entering tokens where the cursor is.
Any new paragraphs do not allow the token to be entered until the page is saved.
Tested in Claro and it works as expected with new or existing paragraphs.

Steps to reproduce

  1. Enable token filter on the site.
  2. Edit the full html text format
  3. Add the token browser button
  4. Add a token option to the token browser
  5. Enable paragraphs and add a pg that has a full text field
  6. Add a paragraph reference field to the article content type referencing the paragraph created above
  7. Enable Gin
  8. Add a new page and add a pg
  9. Click into the editor
  10. Click the token browser icon
  11. Click a token
  12. Note the token is added to the title

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇺🇸United States nicxvan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @nicxvan
  • 🇮🇳India Maninders

    Trying to replicate that issue in Claro and Gin both the themes, that is working same for claro as well gin theme. That issue is not for gin theme only.

    Steps to reproduce (after Enabling the modules)

    If You go to > Add Content > Paragraph click on CkEditor, then click on Token browses option, then click on any of the token. It will add on CkEditor.
    But if in between you click on title field and then click on Token browser, then it will append only on title field only.
    For that We have to save the node and then edit the node and then after edit you can click on CkEditor Token browser option and then token will render on CkEditor.
    This is working same for Claro and Gin theme.
    Adding a Video for the reference with both the themes.


  • 🇺🇸United States nicxvan

    But if in between you click on title field and then click on Token browser, then it will append only on title field only.

    I am not doing that and it is still adding it to the title for me.

  • 🇨🇭Switzerland saschaeggi Zurich

    @manindres so this is not a specific issue to Gin? We should then maybe move this issue to the Token module instead?

  • 🇺🇸United States nicxvan

    For me it only happens in Gin, it does not happen in other themes.

  • 🇮🇳India Maninders

    @saschaeggi this is not related to any theme, gin or claro, It's related to Token module.
    @nicxvan For me it's same for gin and claro. I have added the videos with both the theme.
    Anyone else needs to test, please go ahead with testing.

  • Status changed to Closed: won't fix 2 months ago
  • 🇨🇭Switzerland saschaeggi Zurich

    Closing this as won't fix as there is 🐛 Token browser invoked by CKEditor5 button will insert tokens in the Title field Needs work

    Thanks!

Production build 0.71.5 2024