Hello,

I use this module in the view the token has no work

In drupal version 9.4.11

Comments

msn5158 created an issue. See original summary.

msn5158’s picture

Status: Active » Closed (outdated)

no

msn5158’s picture

Title: Can't use global token in drupal 9.4.11 » I use this module in the view the token has no work
Issue summary: View changes
Status: Closed (outdated) » Active
bobbysaul’s picture

Status: Active » Postponed (maintainer needs more info)

Hello, I don't think I understand the issue. Can you provide more information? Thanks.

msn5158’s picture

bobbysaul’s picture

Hello,

The tug boat test site has expired, but I was able to test out the functionality on my own local development site. I want to see if you have the Token Module module enabled? The tokens do not work without this module enabled.

Hopefully, this helps you!

bobbysaul’s picture

Status: Postponed (maintainer needs more info) » Needs review

After looking at the code, I see that there is a couple of unnecessary conditionals that are checking if the Tokens module is enabled. These are unnecessary because the token service was added in Drupal 8.9. I believe I can remove these conditionals and update the minimum supported version to 8.9.

  • bobbysaul committed 1c3a46a1 on 3.x
    Issue #3346093 by msn5158, bobbysaul: I use this module in the view the...
msn5158’s picture

I test the drupal version is 9.4.11, I have installed the three module (inline_formatter_field, token, token_filter), and all enabled.

bobbysaul’s picture

I've added a commit 1c3a46a1. Can you install the latest dev version or apply the patch for the commit and verify if this fixes your issue?

msn5158’s picture

StatusFileSize
new11.5 KB

1

Token still no work only in Views (inline_formatter_views_field).

The following two sub modules work normally:
inline_formatter_field
inline_formatter_display

msn5158’s picture

StatusFileSize
new1.62 MB

Can you go here to test?

https://simplytest.me/

1

bobbysaul’s picture

Component: Miscellaneous » Code
Assigned: Unassigned » bobbysaul

I am reviewing your issue and just realized you are talking about the sub-module inline_formatter_views_field. I can verify that normal site tokens do not work as the module is currently. I will start working on this feature requests and hope to have it fixed soon. Sorry for the confusion.

bobbysaul’s picture

Status: Needs review » Needs work

  • bobbysaul committed d687a9ed on 3.x
    Issue #3346093 by msn5158, bobbysaul: Added token parameter to...
bobbysaul’s picture

Status: Needs work » Needs review

I added a commit to the dev branch that I believe gives the feature requested, replace tokens in the InlineFormatterViewsField.

msn5158’s picture

After the test, it can work normally now. Thank you!

If it can use the formats CKEditor (/admin/config/content/formats) will be better.

At present, it does't support (embed, insert_view_adv) like these modules, Because it haven't (Filter processing order) in (/admin/config/content/formats) .

Like this code does't support:
entity_embed:
<drupal-entity data-entity-embed-display="view_mode:node.full" data-entity-type="node" data-entity-id="1"></drupal-entity>
views_entity_embed:
<drupal-views data-view-arguments="" data-view-display="default" data-view-name="test"></drupal-views>

I just leave a feature request record, if you need the feature or in the future.

msn5158’s picture

Title: I use this module in the view the token has no work » Sub-module inline_formatter_views_field token support
msn5158’s picture

I test the Token and Twig, Now it supports Token, but does not support Twig. {{ title }} no printing.

bobbysaul’s picture

Is the title field nested above the inline formatter field?
The inline formatter view field is set up similarly to the core custom text view field. The replacement patterns drop down should list which fields are available.

msn5158’s picture

Oh, Yes, It is normal work, I just installed a module (Mustache Logic-less Views), make them can't work together, there was a little regret.

msn5158’s picture

Excuse me, is there a plan to start adding a (Filter processing order) like (/admin/config/content/formats)?
Let it support more filters plugins.

bobbysaul’s picture

Yes, I think that adding a feature for using a CKEditor editor is a reasonable request. Can you create another issue to track this feature?

I can also point you towards the Twig Tweak module for embedding entities such as media with the "drupal_entity" twig function. For example:

{{ drupal_entity('media', 1) }}

And also if this issue for the tokens in the view field is working, can you mark this issue as reviewed and tested?

Thanks you!

msn5158’s picture

Status: Needs review » Fixed
msn5158’s picture

Status: Fixed » Closed (fixed)