Montpellier, France
Account created on 16 September 2010, over 14 years ago
#

Merge Requests

More

Recent comments

🇫🇷France duaelfr Montpellier, France

First shot has been pushed to the dev branch and release in alpha.
It still needs to support nested values, so I'm keeping this issue open.

🇫🇷France duaelfr Montpellier, France

duaelfr created an issue.

🇫🇷France duaelfr Montpellier, France

@lendude @smustgrave I'm out of ideas to fix the test. I cannot reproduce this failure locally. Do you have some clues for me?

$ phpunit -c phpunit.xml core/modules/views/tests/src/Functional/BulkFormTest.php
PHPUnit 10.5.45 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.3.15
Configuration: /app/phpunit.xml

..                                                                  2 / 2 (100%)

HTML output was generated.
[...]

Time: 00:18.124, Memory: 10.00 MB

OK (2 tests, 79 assertions)
$ phpunit -c phpunit.xml core/modules/workspaces/tests/src/Functional/WorkspaceViewsBulkFormTest.php
PHPUnit 10.5.45 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.3.15
Configuration: /app/phpunit.xml

..                                                                  2 / 2 (100%)

HTML output was generated.
[...]


Time: 00:56.580, Memory: 10.00 MB

OK (2 tests, 97 assertions)
🇫🇷France duaelfr Montpellier, France

I think I found the issue with my test coverage! Crossing fingers ;)

🇫🇷France duaelfr Montpellier, France

@lendude destination is kept after the redirect. I believe it's been made that way in the original issue.

🇫🇷France duaelfr Montpellier, France

I am not pleased that this checkbox is out of the group.
I'll try to figure out another method to fix the issue.

🇫🇷France duaelfr Montpellier, France

This has been introduced in CKEditor after this module has been created.
I'm glad we don't have to maintain this anymore ;)
Thanks!

🇫🇷France duaelfr Montpellier, France

duaelfr made their first commit to this issue’s fork.

🇫🇷France duaelfr Montpellier, France

@smustgrave I didn't manage to find existing coverage for other allowed tags. Would you help me find it so I can extend it, please?

🇫🇷France duaelfr Montpellier, France

Fix and tests pushed in a MR.
Patch attached for composer. Applies on both 11.x and 10.4.x.

🇫🇷France duaelfr Montpellier, France

Updated IS with references for every tag added to the list.

🇫🇷France duaelfr Montpellier, France

Added to allowed tags in the MR (from 🐛 element stripped by $adminTags Active ).
Patches for composer.

🇫🇷France duaelfr Montpellier, France

Added <template> to allowed list to the MR (from Xss::filterAdmin() to allow "template" elements Active ).
Patches for composer.

🇫🇷France duaelfr Montpellier, France

Here is a simplified patch for Drupal 10.4 for live projects.

🇫🇷France duaelfr Montpellier, France

Fixed missing attributes lost in the reroll.
Added <audio> tag as well. (thanks #86 for that suggestion)
Again, attached patch for composer.

🇫🇷France duaelfr Montpellier, France

Rerolled and cleaned MR.
Added <button> to the allowed list.
Patch attached for composer (11.x).

🇫🇷France duaelfr Montpellier, France

This is quite old!
I was digging into an issue with inline templating within Views and found this piece of code from \Drupal\views\Plugin\views\PluginBase::viewsTokenReplace():

      // Use the unfiltered text for the Twig template, then filter the output.
      // Otherwise, Xss::filterAdmin could remove valid Twig syntax before the
      // template is parsed.

      $build = [
        '#type' => 'inline_template',
        '#template' => $text,
        '#context' => $twig_tokens,
        '#post_render' => [
          function ($children, $elements) {
            return Xss::filterAdmin($children);
          },
        ],
      ];

      // Currently you cannot attach assets to tokens with
      // Renderer::renderInIsolation(). This may be unnecessarily limiting. Consider
      // using Renderer::executeInRenderContext() instead.
      // @todo https://www.drupal.org/node/2566621
      return (string) $this->getRenderer()->renderInIsolation($build);

Here, even if we are using Twig's render engine, filterAdmin is called on post_process without any way to bypass it. In my case, I have an inline template that includes an image field rendered with a responsive style. The <picture> and <srcset> tags are dropped by this post process so I must use an external template instead of the builtin feature of views.

🇫🇷France duaelfr Montpellier, France

@maintainers: Hi! I'm willing to provide a fix but I'd need a bit of guidance because I can't figure out where this is happening. Would you help me, please?

🇫🇷France duaelfr Montpellier, France

I can confirm this issue (on a website without layout_paragraphs, cf #4).
Attaching a screencast of the bug.

As the issue can lead to unnoticed data corruption, I'm bumping it to Major priority.

🇫🇷France duaelfr Montpellier, France

Hi there!
Thank you for working on this issue.
Beside @jonathanshaw comments on the MR, this needs to be rerolled now a few changes has landed.
Cheers!

🇫🇷France duaelfr Montpellier, France

This issue is worked on in Add support for media reference fields Needs review

🇫🇷France duaelfr Montpellier, France

Thank you for suggesting that change!

🇫🇷France duaelfr Montpellier, France

Thank you all for your help with this!

🇫🇷France duaelfr Montpellier, France

duaelfr made their first commit to this issue’s fork.

🇫🇷France duaelfr Montpellier, France

Rerolled on 2.1.x (sadly this version has no release so we cannot tag the issue on it).
Patch added for composer.

🇫🇷France duaelfr Montpellier, France

MR with proposed changes open and the related patch for composer.

In my case (huge job item), the call to the trackChangedSource method has been reduced from 83.88773 seconds to 0.34245.
The calls to the flatten method from the trackChangedSource method has been reduced from 1966 occurrences to 1.

I hope tests will pass even if I believe so, given the changes I made.

🇫🇷France duaelfr Montpellier, France

duaelfr changed the visibility of the branch 3513777-simplify-getcropentity to hidden.

🇫🇷France duaelfr Montpellier, France

Note: the issue doesn't happen when manually updating interface or config translations

🇫🇷France duaelfr Montpellier, France

This issue is really annoying for websites using dialogs on front-end because gin_toolbar does not take permissions like view the administration theme into account when loading its CSS. The result is broken dialogs for non-admin users.
The MR suggests a workaround to disable all gin dialog-related styles on frontend but it kind of defeats the purpose of the module for admin users. Would it be possible to implement something like @webflo's suggestion?

🇫🇷France duaelfr Montpellier, France

Code from #89 included in a MR against 11.x
+ fix for JS errors on pages without query string
+ patch for composer

🇫🇷France duaelfr Montpellier, France

The module supports D10 right now.
The accessCheck() method on entity queries will be added to the next major version (D11 compatibility).
See https://git.drupalcode.org/project/extra_field/-/commit/d4752a8125ed4661...

🇫🇷France duaelfr Montpellier, France

Thank you for your contribution on this module!

I first thought it should be in the ImageImport plugin but I then saw your explanation and looked back at the code and saw how much more complicated it would be, so I think it's okay that way.
The MR doesn't apply on 2.0.x, though, so it needs to be rerolled (and maybe even moved to 3.0.x).
🇫🇷France duaelfr Montpellier, France

@idebr Of course! Sorry for the mistake (twice in a row, I must have been tired this day...)

🇫🇷France duaelfr Montpellier, France

Improved document structure for better readability

🇫🇷France duaelfr Montpellier, France

I don't know why I was convinced that 4.X was D11 only. My bad.
Is it better like this?

🇫🇷France duaelfr Montpellier, France

@anybody There you go.
Now Show machine name in "Manage form display" and "Manage display" table row Fixed has been released. This causes an issue where the weight field for the field_group line is displayed. Dragging the field_group around is still functional but it can be troubling for end users.

🇫🇷France duaelfr Montpellier, France

duaelfr made their first commit to this issue’s fork.

🇫🇷France duaelfr Montpellier, France

@pcambra Sorry for that mistake. I didn't check the target branch when I opened the MR…

🇫🇷France duaelfr Montpellier, France

@pcambra Yes, of course!
@chi-teck/drupal-code-generator@ is the package that provides all the Generator related stuff to Drush. The generator classes provided by the Extra Field module extends @DrupalCodeGenerator\Command\BaseGenerator@ so when static tests are running we need to tell Gitlab CI to download this dependency to prevent code analysis to consider that these classes does not exist.

🇫🇷France duaelfr Montpellier, France

Parent issue landed. Removing the postponed status.

🇫🇷France duaelfr Montpellier, France

No, I don't think so!
I has been marked as deprecated in 2.x so it should only be removed from 3.x branch before the first stable release.

🇫🇷France duaelfr Montpellier, France

(Patch attached for composer)

🇫🇷France duaelfr Montpellier, France

duaelfr created an issue.

🇫🇷France duaelfr Montpellier, France

@pawelgorski87 Thank you for your contribution. The maintainer (aka @pcambra) asked to only handle things related to D11 compatibility in this issue, though. That's why those other fixes had been done in 📌 Fix code quality issues reported by GitlabCI Active . Would you mind rollbacking your changes, please?

🇫🇷France duaelfr Montpellier, France

What I'm saying is that Drupal Core currently does not allow that. If all fields are disabled, the entity is not displayed.

@pdureau dug a bit in this issue and figured out everything was happening inside \Drupal\field_layout\FieldLayoutBuilder::buildView() and \Drupal\field_layout\FieldLayoutBuilder::getFields().

🇫🇷France duaelfr Montpellier, France

I woke up this morning to see this fixed.
Congratulations and many thanks for this!!

🇫🇷France duaelfr Montpellier, France

I have a similar issue with the following steps to reproduce (also reproduced by @g4mbini on a clean install):

  1. Enable Field Layout
  2. Have a SDC with a string prop
  3. In the manage display form of one of your node types, in the layout settings section, select your SDC
  4. In the props settings, for your prop select "Referenced entities" the any referenced entity then any option in the Source select
  5. Save your settings to see the error

I applied the patch from the MR and I'm still able to reproduce.
Here is my stack trace:

Drupal\Component\Plugin\Exception\ContextException: The 'entity:node' context is required and not present. in Drupal\Core\Plugin\Context\Context->getContextValue() (line 73 of core/lib/Drupal/Core/Plugin/Context/Context.php).

Drupal\ui_patterns\Plugin\UiPatterns\DerivableContext\EntityReferencedDerivableContext->getDerivedContexts() (Line: 124)
Drupal\ui_patterns\Plugin\UiPatterns\Source\DerivableContextSourceBase->getSourcePlugins() (Line: 470)
Drupal\ui_patterns\Plugin\UiPatterns\Source\DerivableContextSourceBase->calculateDependencies() (Line: 264)
Drupal\ui_patterns\Element\ComponentElementBuilder->calculateComponentDependenciesProps(Object, Array, Array) (Line: 238)
Drupal\ui_patterns\Element\ComponentElementBuilder->calculateComponentDependencies('ccu_theme:card_highlight', Array, Array) (Line: 234)
Drupal\ui_patterns_layouts\Plugin\Layout\ComponentLayout->calculateComponentDependencies('ccu_theme:card_highlight', Array) (Line: 170)
Drupal\ui_patterns_layouts\Plugin\Layout\ComponentLayout->calculateDependencies() (Line: 71)
Drupal\Core\Config\Entity\ConfigEntityBase->getPluginDependencies(Object) (Line: 89)
Drupal\Core\Config\Entity\ConfigEntityBase->calculatePluginDependencies(Object) (Line: 149)
Drupal\field_layout\Entity\FieldLayoutEntityViewDisplay->calculateDependencies() (Line: 328)
Drupal\Core\Config\Entity\ConfigEntityBase->preSave(Object) (Line: 272)
Drupal\Core\Entity\EntityDisplayBase->preSave(Object) (Line: 114)
Drupal\field_layout\Entity\FieldLayoutEntityViewDisplay->preSave(Object) (Line: 528)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 483)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 239)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 354)
Drupal\Core\Entity\EntityBase->save() (Line: 617)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 293)
Drupal\Core\Entity\EntityForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 105)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 43)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 589)
Drupal\Core\Form\FormBuilder->processForm('entity_view_display_edit_form', Array, Object) (Line: 321)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
🇫🇷France duaelfr Montpellier, France

Here is a patch for composer that applies on 11.x

🇫🇷France duaelfr Montpellier, France

MR rerolled on 11.x
Patch attached for composer

🇫🇷France duaelfr Montpellier, France

duaelfr changed the visibility of the branch 3326950-expose-imageitem-width to hidden.

🇫🇷France duaelfr Montpellier, France

Patch for composer with latest changes

🇫🇷France duaelfr Montpellier, France

MR squashed and rerolled.
Patch attached for composer.

🇫🇷France duaelfr Montpellier, France

duaelfr made their first commit to this issue’s fork.

🇫🇷France duaelfr Montpellier, France

Hi @manuel.adan!

Thank you for reporting this.
I am aware of that issue and I filled a request on the appropriate issue queue to get this fixed: 💬 Extracting a submodule in its own module Active

While it's really unexpected and not ideal, it doesn't prevent the module from working.
I hope this is going to be fixed soon but in the meantime there is nothing we can do.

🇫🇷France duaelfr Montpellier, France

@niharika.s Thank you for trying to help here!
Sadly, updating the info.yml file was not what was expected here. For these changes, the appropriate location is 📌 Automated Drupal 11 compatibility fixes for extra_field Needs review .

Production build 0.71.5 2024