Account created on 23 October 2004, about 20 years ago
#

Merge Requests

More

Recent comments

🇫🇷France tostinni

MR posted, switch to needs review

🇫🇷France tostinni

Here is a shot at it.
The problem is causing by the fact that the function entityShouldBeSaved is only checking base fields of the entity, thus when a reference is present it will only check its target_id which won't change if any of the referenced entity field is changed.

The patch add a nested logic to drill into fields of entity_reference (nodes, terms, medias...) and entity_reference_revisions (used for paragraphs).

We had to add a check for $new_field to be a valid field as in some case we had strings., so I guess a few eyeballs on this should help.

🇫🇷France tostinni

The patch works fine for us, but if an entity doesn't need to be saved, it get recorded in $rows_failed due to this new code :

  protected function saveEntity(EntityInterface $entity, EntityInterface $original_entity, EntityStorageInterface $storage): bool {
    try {
      if ($this->entityShouldBeSaved($entity, $original_entity)) {
        $storage->save($entity);
        return TRUE;
      }
    }
    catch (\Exception $exception) {
      return FALSE;
    }
    return FALSE;
  }

Here is an updated patch to add this third option.

🇫🇷France tostinni

@jeffschuler yes we have the same configuration and unfortunately it prevents saving the form.

I have restested it in an empty instance of D10.3.8 with the patch #64 and this set up :

  • Article CT with reference to paragraphs: field_ref_widgets using "Paragraphs (stable)" form widget (but same error with
  • Creating a "Resources" paragraph with field_ref_resource_items pointing to a "Resource item" paragraph
  • Creating a "Resource item" paragraph with 3 fields
    • field_media_file: an entity reference for media referencing the document Media type
    • field_link: a link field
    • field_resource_type: a select controlling which previous field will be displayed
  • Assigning dependencies cf screenshot (I only put the visible part)
  • Create a test content and seeing the error of the hidden widget required field

Is there anything else I can share or check to find out why this is happening ?

Thanks

🇫🇷France tostinni

We're facing the same problem and none of those patches seems to fix it (#59, #64 & MR26).
For our case we're using the Paragraphs stable form widget and we do have nested paragraphs.

We tried setting the target field required => when it's displayed it's not required even if we add the required state next to the visible.

If we don't set it required in its config but setting the form state as required, it's still not required when visible.

Anyone has been able to make this work with nested paragraphs ?
We tried on alpha5 with patch from 🐛 Controlled-by fields inside a Paragraph don't work Needs work and also on latest dev.

🇫🇷France tostinni

I disabled all contrib menu module except menu_firstchild and the error is still there so I guess it's more related to Gin than other modules.

🇫🇷France tostinni

Yes, I forgot this point but yes, applying the patch here has fixed the issue for us.
Thank you.

PS : have you been able to reproduce and understand the issue ?

🇫🇷France tostinni

We also encounter the error, it was simply by enabling the new option from Gin theme "New Drupal Navigation, Test integration" and having menu_firstchild 2.1.0 enabled.
I will instantly break all the pages of the site as the admin menu is visible everywhere.
We have many modules enabled but this happened on various sites, so not sure if the list is relevant, but here are the menu modules that we have.

$ drush pml --status=enabled  | grep menu
  Core             Custom Menu Links (menu_link_content)                                    Enabled   10.3.7         
  Core             Menu UI (menu_ui)                                                        Enabled   10.3.7         
  Other            Menu Block (menu_block)                                                  Enabled   8.x-1.10       
  Other            Menu Breadcrumb (menu_breadcrumb)                                        Enabled   2.0.0-alpha0   
  Menu             Menu Firstchild (menu_firstchild)                                        Enabled   2.1.0          
  Menu             Menu Item Extras (menu_item_extras)                                      Enabled   3.0.2          
  Other            Menu Link Attributes (menu_link_attributes)                              Enabled   8.x-1.4      

Here is a backtrace.

Error: Call to a member function getOption() on string in Drupal\menu_firstchild\MenuItemParser->enabled() (line 157 of modules/contrib/menu_firstchild/src/MenuItemParser.php).
Drupal\menu_firstchild\MenuItemParser->parse() (Line: 134)
menu_firstchild_preprocess_menu()
call_user_func_array() (Line: 261)
Drupal\Core\Theme\ThemeManager->render() (Line: 491)
Drupal\Core\Render\Renderer->doRender() (Line: 504)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 475)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 101)
__TwigTemplate_2335ff9fd92523ff22dd3c49fead835b->doDisplay() (Line: 360)
Twig\Template->yield() (Line: 47)
__TwigTemplate_7c97adda2d483fd8bf6f3ce8c72cfadf->doDisplay() (Line: 360)
Twig\Template->yield() (Line: 335)
Twig\Template->render() (Line: 38)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 491)
Drupal\Core\Render\Renderer->doRender() (Line: 504)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 475)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 84)
__TwigTemplate_3891a37b75e98d70a9d4abec65591d88->doDisplay() (Line: 360)
Twig\Template->yield() (Line: 335)
Twig\Template->render() (Line: 38)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 491)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 158)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 159)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)
🇫🇷France tostinni

MR published.
We added usleep(100000);to avoid hitting the API rate which is rather low for this endpoint (10 requests per second).

🇫🇷France tostinni

While this new version fixes the security warning, shouldn't it be marked as a security release ?

🇫🇷France tostinni

Any update on this ?
It seems the documentation is not up to date as the checkbox for "Glossary AZ - Content" is now present on the processor tab, but even after checking it, it's not visible as a new search field.

🇫🇷France tostinni

tostinni changed the visibility of the branch 3470404-incorrect-validation-logic to hidden.

🇫🇷France tostinni

@willempje2 it seems to be working fine with 3.0.2.

However we noticed that counting items was duplicated when we checked "Show hierarchy in dropdown".

As branch 2.x is deprecated, I think we should move this issue to 3.x

🇫🇷France tostinni

I think the problem @ratanasdiabolo faced is that he was trying to put a value like "200 MB" but right now max_upload_size will only accept integer.

I added a commit to this MR to let user enter those kind of values and add a description too (same as core file max upload size)

The error message we had was slightly different but I think it's the same cause.

TypeError : Drupal\Core\StringTranslation\ByteSizeMarkup::create(): Argument #1 ($size) must be of type int|float, string given, called in /opt/www/drupal/web/core/modules/file/file.module on line 1245 dans Drupal\Core\StringTranslation\ByteSizeMarkup::create() (ligne 28 de /opt/www/drupal/web/core/lib/Drupal/Core/StringTranslation/ByteSizeMarkup.php).

Btw @Tim Bozeman what is the reason between creating a new setting max_upload_size instead of reusing max_filesize ?
Checking it, it doesn't limit its value to PHP max_upload_size so you could already put a bigger value there although it wouldn't be applied without the override made by file_resup module.

Should we kept only one field to avoid confusion ?

@ratanasdiabolo can you try with this MR ?
You can apply it to your composer.json to the patches section :

        "patches": {
            "drupal/file_resup": {
                "[3418177-MR11] Fix Error message - file size": "https://git.drupalcode.org/project/file_resup/-/merge_requests/11.diff"
            }
        },
🇫🇷France tostinni

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

🇫🇷France tostinni

For this to work you need to set the "Maximum upload size" and make it bigger than your current PHP max_ulpoad_size.
The value is in byte.

🇫🇷France tostinni

Here is a patch to update the module to use seboettg/citeproc-php

🇫🇷France tostinni

Issue is outadted, see 📌 Automated Drupal 10 compatibility fixes Needs review which also provides Drupal 9 compatibility.

🇫🇷France tostinni

Here is an updated patch that also includes :

  • Update of .info.yml file for Drupal 10 compatibility
  • Fixes for class attributes that need to be arrays
  • Various notice or unused variables cleaned
🇫🇷France tostinni

I think this can be marked as duplicate of 📌 Automated Drupal 10 compatibility fixes Needs review

🇫🇷France tostinni

+1, in fact 8.x-1.1 and also 8.x-1.2 (tagged but not published) are compatible with Drupal 10, so a release needs to be published.

Fixes made for D10 :

🇫🇷France tostinni

Hi @scott_euser, I created a MR for @olivier.br to commit only the change in the source file.

🇫🇷France tostinni

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

🇫🇷France tostinni

Hi @scott_euser, sorry for the late reply, I let this slipped a little too long.
Regarding your comment about not touching the compiled filed, I had done it this way as only assets/js/ckeditor/plugin.js was modified and also this was for CK 4 which, imho, doesn't come with compiled JS.

I created a MR if it's easier for you to review.
Thank you

🇫🇷France tostinni

Well for the moment, this project has been pretty quiet as you were the first to make an issue.

Have a look at the code and if you see some big improvement, yes that could be an option.

Do you currently use it ? Is your project requiring OpenID Connect V1.4 or 3.0 ?

🇫🇷France tostinni

Hi mably, sorry for the late reply.

This module was part of a project we don't maintain anymore and we haven't take the time to document it properly for an official release.

This is now fixed with a Drupal 10 version available.

Don't hesitate to contact me if you need more details regarding FranceConnect implementation.

🇫🇷France tostinni

We also added a text change when the user is a moderator, this could probably use a new configuration text.

      $default_text = $entity->access('update') ? $this->t('Moderate Meeting') : $this->t('Join Meeting');
      $form['submit'] = [
        '#type' => 'submit',
        '#value' => $display_options["join_button_text"] ? $display_options["join_button_text"] : $default_text,
        '#attributes' => ['class' => ['btn-accent']],
      ];
🇫🇷France tostinni

Using 1.2.0 on a fresh install we still ahve this issue.
As mentioned by trickfun in #6 the problem appears when Sendinblue is sending some fields with no type.
Patch in #7 fix the issue.

🇫🇷France tostinni

Can anyone share an updated YAML to migrate a CT using this patch ?
Thank you very much.

🇫🇷France tostinni

Parts of other patches were included in #16, updating with patch working against beta6.

🇫🇷France tostinni

You might be interesed by the solution offered in Use checkbox and radio instead of Select, Provide better user experience Needs review (with a search box and "Display all terms" option) or also Offer an autocomplete version Needs review .

🇫🇷France tostinni

This can be closed as it's been fixed in 2.0.0-beta6, see 855fee6a.

🇫🇷France tostinni

This can be closed as it's been fixed in 2.0.0-beta6, see 855fee6a.

🇫🇷France tostinni

This can be closed as it's been fixed in 2.0.0-beta6, see 855fee6a.

🇫🇷France tostinni

We had a website with 10k terms which created 2 problems:

  • huge and slow term merge page
  • need to search for a specific term

We decided to adress this by limitating the display of terms to 20 and add a "Display all terms" checkbox to load the whole list (we could have added a load more, but with the search feature, this doesn't seem that useful).

We also added an ajax search input that will search for terms matching the characters in it.

I put this as a patch to avoid highjacking the MR, but if there is some interest I can create a new MR.
The code could use some work to polish what is done but is functional.

🇫🇷France tostinni

Thanks for the improvements, I added a natural sort using natcasesort() so terms with lowercase/uppercase get grouped together.

Regarding the checkbox, yes that's an improvement, but I was wondering about providing an empty radio for the target list of terms because contrary to select list, once you checked a radio you can't uncheck it. I haven't implemented this yet.

🇫🇷France tostinni

We had a problema applying #141 following the change of getMetada() into getRawMedata in Add a hook to modify oEmbed resource data Needs work #59

So here is a patch to apply those changes.

🇫🇷France tostinni

Thank you Scott.

Indeed when we implemented this, we hid the footnote number field as we thought it was confusing to the editor and let the system calculate the number. Then this patch made sense.

Thanks for the followup and the patch for Provide a JS alternative to the PHP-driven Footnotes Group like Footnotes All Block module Needs review

🇫🇷France tostinni

Hi quantum3k, have you found a solution ?

Thanks

🇫🇷France tostinni

Here is the patch updated for 5.0.0-beta3 and the reroll diff (only some very light changes in the patch due to #3075276: Adding option to prepend referenced entities if desired creating some offset).

🇫🇷France tostinni

Here is a patch to cast this number as a string so the width is correctly calculated.
It also add a default value of 0 only in the render of CKEditor when we used to have fn.

Although I prefer the old fn I kept the decision to render 0 instead.

🇫🇷France tostinni

Here is an updated version of the patch to handle the changes in ImageFormatter Class.

🇫🇷France tostinni

@marcoka have a look at https://www.drupal.org/project/ckeditor5_embedded_content which is pretty neat to have a UI for formatting content.

🇫🇷France tostinni

Is there any reason to having added this line in importTaxonomiesForce()

@@ -697,6 +726,7 @@ class TaxonomiesController extends ControllerBase {
 
               $entity_properties = [
                 'vid' => $vid,
+                'tid' => $taxonomy['tid'],
                 'langcode' => $taxonomy['langcode'],
                 'name' => $taxonomy['name'],
                 'description' => [

Because it will break when importing taxonomies in a site where newer terms have been created.

As this patch currently only works with force, I recommend to use it with #3271724: Force import for taxonomy deletes all terms regardless if they're managed by structure sync

🇫🇷France tostinni

@mogio_hh using the patch commited and staying on Drupal 9.5.10
As I'm not into using dev version, I prefer using the patch directly in composer.json

        "patches": {
            "drupal/paragraphs_ee": {
                "[3383301] Paragraphs are shown under the Add Paragraph button": "https://git.drupalcode.org/project/paragraphs_ee/-/commit/7273fedd312954f8229677dc0a873d11d47d20c5.diff"
            }
        }
🇫🇷France tostinni

I stumbled upon this searching for a simple way to put a nid IN (1, 23, 456) inside my view so here are my solutions:

Using exposed filter:

For this you add the ID and choose regex and put your value like this: (^1$|^23$|^456$)
This way, using ^1$ will match only 1 and not all ID containing 1.

Using contextual filter

This is the easiest way, add an ID contextual filter, and choose  "Provide default value", put 1+23+456 and don't forget to check "Allow multiple values" in the more section.

🇫🇷France tostinni

I can confirm this is fixing the error when using Drupal 9.5.10, paragraphs 8.x-1.16 and Gin admin theme.
Thank you

🇫🇷France tostinni

For those stumbling on this issue, Paragraphs 8.x-1.16 fixes this problem, see 🐛 Paragraphs actions button are removed when Claro admin theme is used Fixed

Production build 0.71.5 2024