Views - Global: Text area

Created on 28 January 2023, about 2 years ago
Updated 14 February 2023, about 2 years ago

Problem/Motivation

Hi,

I would like to display button in Header of wiew page and I am not sure why but it does not work for me when I use

a class="button" href="/ibm/node/{{ raw_arguments.nid }}/edit?dialog[type]=modal&dialog[options][height]=600&dialog[options][width]=800">Edit /a

However when I add following to field in view > rewrite results > Output this field as a custom link and add basically the same code there:
/ibm/node/{{ raw_arguments.nid }}/edit?dialog[type]=modal&dialog[options][height]=600&dialog[options][width]=800

It works fine.....Is there any reason why the first option with Views - Global: Text area and "a link" attribute does not work ?

πŸ› Bug report
Status

Active

Component

Documentation

Created by

πŸ‡ΈπŸ‡°Slovakia coaston

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

Comments & Activities

  • Issue created by @coaston
  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    Hmm, the description is too vague to tell.
    The module can only do its work when the link is part of the drupal outbound rewrite machinery, so a plain text area won't work.
    Hmm yes, we should add that to the docs (blink blink).
    If your link is part of filtered text, then this module may help: https://www.drupal.org/project/renderfilter β†’

  • πŸ‡ΈπŸ‡°Slovakia coaston

    Hi geek-merlin

    Thank you - renderfilter does the trick and once enabled in /config/content/formats I can click on button from Views - Global: Text area.

    However once it is enabled i can see following warning :

    Warning: Undefined array key "core.entity_form_display.node.your_custom_display " in Drupal\Core\Cache\DatabaseBackend->getMultiple() (line 121 of core/lib/Drupal/Core/Cache/DatabaseBackend.php).
    Warning: Undefined array key "" in Drupal\Core\Config\CachedStorage->readMultiple() (line 111 of core/lib/Drupal/Core/Config/CachedStorage.php).

    I am using module : Form Mode Control β†’ and it seems this module has some issues with yours renderfilter one. However not sure if that issue should be raised in form mode control to make support for form mode control, or in renderfilter.

    Due to that warnings I had to disable back renderfilter.

  • πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

    Thanks for reporting back!

    Please switch on "full backtrace" in your error reporting and open an issue with the full backtrace in the other module!

  • πŸ‡ΈπŸ‡°Slovakia coaston

    Hi geek-merlin.

    I have disabled renderfilter module already. I found a workaround which works with Views - Global: Text area as follow:

    {{ attach_library('core/drupal.dialog.ajax') }}
    <p><a class="use-ajax" data-dialog-type="modal" data-dialog-options="{&quot;width&quot;:1200, &quot;title&quot;:&quot;New Ticket&quot;}" href="/node/add/ticket?display=esc_user">New Ticket</a></p>
Production build 0.71.5 2024