Kyiv, Ukraine
Account created on 7 August 2017, over 7 years ago
#

Merge Requests

Recent comments

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

This is definitely an issue.
But patch #2 works only if you need to remove 1 element.
removeItem() function reassign deltas and for the next elements it won’t work.

The solution should be similar to the jsonapi module from Core:

  1. Collect deltas to remove
  2. Remove them in the desc order.

I tested with the multiple field reference to the paragraphs.
I have 3 paragraphs with 2 unpublished:

$items = [
  0 => 'paragraph-0-unpublished',
  1 => 'paragraph-1',
  2 => 'paragraph-2-unpublished',
];

Unpublished paragraphs are not shown in the $elements after viewElements() and should be removed from the $items

$elements = [
  1 => 'paragraph-1',
];

Created MR and added a patch.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

vselivanov β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

Thank you!
I use S3FS external file system and have the same issue with Chosen 4.0.2 and Drupal 10.3.2.
Patch works.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

I rerolled patch #48 for Admin Toolbar 3.5.0 on Drupal 10.3.1

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

Thanks @jan! Patch #7 with this fix works for me.
I also had related 500 PHP errors when visiting views page:

TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, __PHP_Incomplete_Class given in htmlspecialchars() (line 437 of /var/www/cmds/docroot/core/lib/Drupal/Component/Utility/Html.php).
#0 /var/www/cmds/docroot/core/lib/Drupal/Component/Utility/Html.php(437): htmlspecialchars()
#1 /var/www/cmds/docroot/core/lib/Drupal/Component/Render/FormattableMarkup.php(268): Drupal\Component\Utility\Html::escape()
#2 /var/www/cmds/docroot/core/lib/Drupal/Component/Render/FormattableMarkup.php(217): Drupal\Component\Render\FormattableMarkup::placeholderEscape()
#3 /var/www/cmds/docroot/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php(195): Drupal\Component\Render\FormattableMarkup::placeholderFormat()
#4 /var/www/cmds/docroot/core/lib/Drupal/Component/Utility/ToStringTrait.php(15): Drupal\Core\StringTranslation\TranslatableMarkup->render()
#5 /var/www/cmds/docroot/core/modules/views_ui/src/ViewEditForm.php(1148): Drupal\Core\StringTranslation\TranslatableMarkup->__toString()
#6 /var/www/cmds/docroot/core/modules/views_ui/src/ViewEditForm.php(622): Drupal\views_ui\ViewEditForm->getFormBucket()

And this one:

Error: Object of class __PHP_Incomplete_Class could not be converted to string in Drupal\views\Plugin\views\relationship\RelationshipPluginBase->defineOptions() (line 97 of /var/www/cmds/docroot/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php)
#0 /var/www/cmds/docroot/core/modules/views/src/Plugin/views/PluginBase.php(143): Drupal\views\Plugin\views\relationship\RelationshipPluginBase->defineOptions()
#1 /var/www/cmds/docroot/core/modules/views/src/Plugin/views/HandlerBase.php(109): Drupal\views\Plugin\views\PluginBase->init()
#2 /var/www/cmds/docroot/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php(67): Drupal\views\Plugin\views\HandlerBase->init()
πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

Thank you for this quick update.
Quiz dev-6.0.x works for me with Drupal 10.3.1.

I removed all my composer repository changes from the #5 of Closed #3463528: cannot install 6.0.0-alpha8 on drupal 10.3.1.
Now composer update pulls Rules 4.0.0.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

Hi @sarwan_verma,

I don't think it's possible to solve this with a patch for a usual composer based Drupal setup. Composer checks requirements for all children at the very beginning.

The issue here is that Rules module has a separate 4.0.x-dev β†’ branch for Drupal 10.3+.
I added it to the Quiz composer.json.

Also we have an issue to remove Rules dependency https://www.drupal.org/project/quiz/issues/3220608 ✨ Move rules integration into a sub module Active But it's not ready as for now.

For Drupal 10.3+ in the main composer.json you could use:

1. Exclude quiz from the main repository and add this issue fork for it in the repositories section:

"repositories": [
        {
            "type": "git",
            "url": "https://git.drupalcode.org/issue/quiz-3463528.git"
        },
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8",
            "exclude": [
                "drupal/quiz"
            ]
        },
],

2. Use the branch from this issue and fork in the require section:

"require": {
    "drupal/quiz": "dev-3463528-cannot-install-6.0.0-alpha8",
},
πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

vselivanov β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

vselivanov β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

Hi!
Have the same error. It happens because shield middleware do it's job before modules are loaded. It calls authenticate and flood whitelist checks, but there is no flood_control_get_whitelist_ips() function yet.

This patch to the shield module helped me:
https://www.drupal.org/project/shield/issues/3277210#comment-15104934 πŸ› Shield middleware invokes hooks before modules are loaded, corrupting module_implements cache Needs work

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

I have this issue with cloning custom entity and fixed it with MR 53 and custom code.

With entity_clone 2.0.0-beta6 we have isClonable() method in src/EntityCloneClonableField.php which also checks
$field_definition instanceof FieldConfigInterface
But all custom reference fields are instance of BaseFieldDefinition class.
So we need additional changes to this method.

I tried to remove this FieldConfigInterface check, but it adds a lot of not needed fields and caused recursions and "Circular reference detected" errors.

Finally I managed to clone custom entities with:
1. Apply patch from the MR 53 (attached it)
2. Extend EntityCloneClonableField class in the custom module and add hardcoded custom entity types check.

Example with 2 files:

1. File modules/custom/my_module/src/MyModuleServiceProvider.php

<?php

namespace Drupal\my_module;

use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderBase;

/**
 * Overrides EntityCloneClonableField class.
 */
class MyModuleServiceProvider extends ServiceProviderBase {

  /**
   * {@inheritdoc}
   */
  public function alter(ContainerBuilder $container) {
    if ($container->hasDefinition('entity_clone.clonable_field')) {
      /** @var \Symfony\Component\DependencyInjection\Definition $definition */
      $definition = $container->getDefinition('entity_clone.clonable_field');
      $definition->setClass('Drupal\my_module\EntityCloneClonableField');
    }
  }

}

2. File modules/custom/my_module/src/EntityCloneClonableField.php

<?php

namespace Drupal\my_module;

use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\Field\EntityReferenceFieldItemListInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\entity_clone\EntityCloneClonableField as EntityCloneClonableFieldSource;

/**
 * Manage entity clone clonable field.
 */
class EntityCloneClonableField extends EntityCloneClonableFieldSource {

  /**
   * {@inheritDoc}
   */
  public function isClonable(FieldDefinitionInterface $field_definition, FieldItemListInterface $field): bool {
    $isClonable = parent::isClonable($field_definition, $field);

    // Add custom entities fields as clonable.
    $customClonableEntityTypes = [
      'custom_entity_1',
      'custom_entity_2',
    ];
    if (!$isClonable && in_array($field_definition->getTargetEntityTypeId(), $customClonableEntityTypes)
      && $field_definition instanceof BaseFieldDefinition
      && $field instanceof EntityReferenceFieldItemListInterface && $field->count() > 0) {
      return TRUE;
    }

    return $isClonable;
  }

}
πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

Patch #126 doesn't work for me with the recent Drupal 10.2.6.
We used it previously, but now we found a bug with Media Library widget.

Steps to reproduce:
1. With applied patch #126 go to the node edit page with Image field, open popup with Media Library widget.
2. In the view with existing images below the upload area go to the 2nd page (with ajax pager)
3. Select image and click Insert selected.
4. You get an Ajax error in console.

With Drupal 10.2.6 I applied the patch #116, but without tests (sorry for that).
I don't think this is the right approach because of hardcoded view id:
$this->id() !== 'media_library'
But it works good for me as a hotfix.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

Created MR and attached patch. Also tested with ctools 4.0.4.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

I re-tested #7-9 with fresh install and had error for not enabled term_reference_change module dependency:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "term_merge.term_merger" has a dependency on a non-existent service "term_reference_change.migrator".

Fixed, updated MR and created this patch.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

Yes, just worked with the same fix.
Tested and looks good for me with taxonomy_manager 2.0.10 and Drupal 10.2.5

Solution depends on the pipeline. hook update works for me with such deploy:
1. composer install
2. drush updb -y
3. drush cim -y
4. drush cr
Note, that on local I run drush updb with this patch and exported configs with enabled term_merge module.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

vselivanov β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

I had exactly the same issue with scroll and patch #5 fixed it.
Thank you, @gouthamraon!

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

I had this issue with undefined and also similar with null with Drupal 10.1.5.
Added null check to the patch #2 and created MR.
But we still need a tests.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

+ The war is not over. We need community support

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

Hi @s_leu!
Thank you for work with this warnings.

But we should create a merge request to 2.x branch - not 8.x-1.x.
So we need only this commit

Only from this commit I created a patch that works good with the latest Drupal 10.1.5, CKEditor5 and Editor Advanced Link 2.2.4 release.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

Hi!
Thank you @ankur.
I also use only this opigno_scorm module and prefer to not have additional dependencies.

@axelm Could we just copy these traits from opigno_module to the current module?
If it's ok I'll create a merge request.

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

fgm, thank you for the patch.
It fixed 2 warnings on the node edit page with Drupal 9.5.9.

It's hard to define the reason of these warnings. Site uses a lot of contrib modules and custom alterations. Even on this node edit page.
One of them because of token replacements:

Deprecated function: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Core\Controller\TitleResolver->getTitle() (line 60 of /var/www/docroot/core/lib/Drupal/Core/Controller/TitleResolver.php)
#0 /var/www/docroot/core/includes/bootstrap.inc(347): _drupal_error_handler_real(8192, 'strlen(): Passi...', '/var/www/docroo...', 60)
#1 [internal function]: _drupal_error_handler(8192, 'strlen(): Passi...', '/var/www/docroo...', 60)
#2 /var/www/docroot/core/lib/Drupal/Core/Controller/TitleResolver.php(60): strlen(NULL)
#3 /var/www/docroot/modules/contrib/token/token.tokens.inc(843): Drupal\Core\Controller\TitleResolver->getTitle(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\Routing\Route))
#4 [internal function]: token_tokens('current-page', Array, Array, Array, Object(Drupal\Core\Render\BubbleableMetadata))
#5 /var/www/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php(426): call_user_func_array(Object(Closure), Array)
#6 /var/www/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php(405): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object(Closure), 'token')
#7 /var/www/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php(433): Drupal\Core\Extension\ModuleHandler->invokeAllWith('tokens', Object(Closure))
#8 /var/www/docroot/core/lib/Drupal/Core/Utility/Token.php(359): Drupal\Core\Extension\ModuleHandler->invokeAll('tokens', Array)
#9 /var/www/docroot/core/lib/Drupal/Core/Utility/Token.php(241): Drupal\Core\Utility\Token->generate('current-page', Array, Array, Array, Object(Drupal\Core\Render\BubbleableMetadata))
#10 /var/www/docroot/core/lib/Drupal/Core/Utility/Token.php(191): Drupal\Core\Utility\Token->doReplace(true, '[current-page:t...', Array, Array, Object(Drupal\Core\Render\BubbleableMetadata))
#11 /var/www/docroot/modules/contrib/metatag/src/MetatagToken.php(66): Drupal\Core\Utility\Token->replace('[current-page:t...', Array, Array, NULL)
#12 /var/www/docroot/modules/contrib/metatag/src/MetatagManager.php(771): Drupal\metatag\MetatagToken->replace('[current-page:t...', Array, Array)
#13 /var/www/docroot/modules/contrib/metatag/src/MetatagManager.php(617): Drupal\metatag\MetatagManager->processTagValue(Object(Drupal\metatag\Plugin\metatag\Tag\Title), Array, Array, false, 'en')
#14 /var/www/docroot/modules/contrib/metatag/src/MetatagManager.php(549): Drupal\metatag\MetatagManager->generateRawElements(Array, NULL)
#15 /var/www/docroot/modules/contrib/metatag/metatag.module(521): Drupal\metatag\MetatagManager->generateElements(Array, NULL)
#16 /var/www/docroot/modules/contrib/metatag/metatag.module(130): metatag_get_tags_from_route()
#17 /var/www/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(315): metatag_page_attachments(Array)
#18 /var/www/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php(405): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}(Object(Closure), 'metatag')
#19 /var/www/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(316): Drupal\Core\Extension\ModuleHandler->invokeAllWith('page_attachment...', Object(Closure))
#20 /var/www/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(289): Drupal\Core\Render\MainContent\HtmlRenderer->invokePageAttachmentHooks(Array)
#21 /var/www/docroot/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#22 /var/www/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(290): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#23 /var/www/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(132): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

Thank you sebasgd!
I have the same issue and patch #2 fixed it.
Tested with Facets 2.0.6 and Drupal 9.5.8.
Looks like it appeared after 2.0.6 release with this issue fixed https://www.drupal.org/project/facets/issues/3210353 β†’

πŸ‡ΊπŸ‡¦Ukraine vselivanov Kyiv, Ukraine

Rerolled #40 for the v3.3.1 - 3.x-dev 50ff7eb6 commit. Tested with Drupal 9.5.8.

Production build 0.71.5 2024