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

Merge Requests

More

Recent comments

🇫🇷France tostinni

What's the point to call `drupalEntity` without entity ID?

@chi you're right, this is bad programming, however previous versions weren't breaking on this error (also due to stricter requirement in PHP 8), so I guess these kind of errors may exists in older code base and this patch help prevent a site from breaking.

🇫🇷France tostinni

We found this settings that can help to increase the list and thus being able to request more than 20 items.
Don't forget to increase your max_execution_time in PHP.

🇫🇷France tostinni

@spadxiii I don't think your 8.x-1.x reference is accurate as your patch contains code that has been removed in #2881745: Wrapping embedded entities in

🇫🇷France tostinni

@yuraosn when you add a fix, you need to make a patch with also your previous fixes so we can test only one patch.
Here is a patch merging patches from #8, #9 and #10.

Also it seems that a lot of work has been done in the related MR by @baskaran (see commit c1d7b5ef) but it hasn't been pushed, shouldn't we start from there ?

Finally there is some duplicated effort going on in 🐛 Drupal 11 Compatibility Active which include compatibility with Drupal 11, so I guess we should focus on one issue only.

🇫🇷France tostinni

Changing the version of this MR as it's coming from 8.x-1.x-dev and not 9.1.x-dev, so if you want to test it you need to checkout the 8.x version of the module.

@manishvaity shouldn't you redo your MR from the most recent 9.1.x-dev branch ?

🇫🇷France tostinni

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

🇫🇷France tostinni

Updated patch to apply on 8.x-1.6 which now declares compatibility with 10 & 11

🇫🇷France tostinni

When using the tokens, Stripe is receiving directly the token instead of its value causing an error 400 Bad Request.

name: [webform_submission:values:name]
email: [webform_submission:values:email_address]

Here is what the form sends.

receipt_email: [webform:element:email:title]
payment_method_data[type]: card
payment_method_data[card][number]: 4242 4242 4242 4242
...

I guess this is because those tokens aren't available when the stripe is sent (before the form submission).
Would it be possible to retrieve dynamically fields from the form ?

🇫🇷France tostinni

Seems that the test that is not passing is not from this patch Drupal\Tests\feeds_tamper\Functional\FeedTypeListBuilderTest::testDeltaIncreaseWithManyTampers
https://git.drupalcode.org/issue/feeds_tamper-2983197/-/pipelines/386006...

🇫🇷France tostinni

We've been using this patch for preventing crash when exploding empty values.
Here is a MR with it.

🇫🇷France tostinni

tostinni changed the visibility of the branch 8.x-2.x to hidden.

🇫🇷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

Production build 0.71.5 2024