Oulu
Account created on 13 May 2016, about 8 years ago
  • Senior Developer at Exove 
#

Merge Requests

More

Recent comments

🇫🇮Finland HeikkiY Oulu

Excellent. It would be good to act fast because it seems like it is already used to distribute malicious code based on https://github.com/polyfillpolyfill/polyfill-service/issues/2873#issueco....

🇫🇮Finland HeikkiY Oulu

We have encountered this issue in at least two client projects. While investigating the issue, the issue can be fixed temporarily by clearing caches and this allows the content to be saved again. But after the content is saved again, the second revision is visible again and it blocks saving the content a second time with the same error related to untranslated fields not being editable.

🇫🇮Finland HeikkiY Oulu

I opened a MR for this for easier review and commenting.

🇫🇮Finland HeikkiY Oulu

I tried to improve the code a bit and made some small improvements. Here is an attached patch with following changes.

1. Added a check for $route_object being null to avoid potential errors.
2. Used instanceof instead of is_a for checking if $arg is an instance of EntityInterface.
3. Some small style changes.

Tested that the issue is still resolved.

🇫🇮Finland HeikkiY Oulu

I found this issue when installing Notification message to our side crashed a view with contextual filters in the URL.

The error in our case was this

The website encountered an unexpected error. Try again later.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "arg_0" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

Drupal\Core\Entity\EntityTypeManager->getHandler() (Line: 192)
Drupal\Core\Entity\EntityTypeManager->getStorage() (Line: 129)
Drupal\notification_message\Cache\Context\RouteEntityUuidCacheContext->attachViewRouteEntities() (Line: 86)
Drupal\notification_message\Cache\Context\RouteEntityUuidCacheContext->entityCacheTagsFromRoute() (Line: 60)
Drupal\notification_message\Cache\Context\RouteEntityUuidCacheContext->getContext() (Line: 123)
Drupal\Core\Cache\Context\CacheContextsManager->convertTokensToKeys() (Line: 244)
Drupal\Core\Cache\VariationCache->createCacheIdFast() (Line: 175)
Drupal\Core\Cache\VariationCache->getRedirectChain() (Line: 35)
Drupal\Core\Cache\VariationCache->get() (Line: 71)
Drupal\Core\Render\RenderCache->get() (Line: 113)
Drupal\Core\Render\PlaceholderingRenderCache->get() (Line: 317)
Drupal\Core\Render\Renderer->doRender() (Line: 493)
Drupal\Core\Render\Renderer->doRender() (Line: 240)
Drupal\Core\Render\Renderer->render() (Line: 475)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 122)
__TwigTemplate_a80a95a6a8c5a3904dde60ae71cea77e->block_page_pre_content() (Line: 171)
Twig\Template->displayBlock() (Line: 130)
__TwigTemplate_f0b5e2f7c622ad70fb53191694409337->doDisplay() (Line: 394)
Twig\Template->displayWithErrorHandling() (Line: 367)
Twig\Template->display() (Line: 61)
__TwigTemplate_a80a95a6a8c5a3904dde60ae71cea77e->doDisplay() (Line: 394)
Twig\Template->displayWithErrorHandling() (Line: 367)
Twig\Template->display() (Line: 39)
__TwigTemplate_9e59da2f5f2329765a9dfd034cd52843->doDisplay() (Line: 394)
Twig\Template->displayWithErrorHandling() (Line: 367)
Twig\Template->display() (Line: 379)
Twig\Template->render() (Line: 38)
Twig\TemplateWrapper->render() (Line: 39)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 480)
Drupal\Core\Render\Renderer->doRender() (Line: 240)
Drupal\Core\Render\Renderer->render() (Line: 475)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 81)
__TwigTemplate_cba7f8237d6b6745d5fea617efe7d916->doDisplay() (Line: 394)
Twig\Template->displayWithErrorHandling() (Line: 367)
Twig\Template->display() (Line: 39)
__TwigTemplate_f020d8f0b6dad9d1f81515d1f59f880c->doDisplay() (Line: 394)
Twig\Template->displayWithErrorHandling() (Line: 367)
Twig\Template->display() (Line: 379)
Twig\Template->render() (Line: 38)
Twig\TemplateWrapper->render() (Line: 39)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 480)
Drupal\Core\Render\Renderer->doRender() (Line: 240)
Drupal\Core\Render\Renderer->render() (Line: 158)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 153)
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: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->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: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)

The patch in this issue fixed the problem. I would be willing to mark this RTBC and mark it Major or even Critical because it causes a crash. I will see if I can come up with another suggestion how to fix this.

🇫🇮Finland HeikkiY Oulu

@joshahubbers-0 Can you change the MR from Draft to an actual MR?

Also there are a couple of comments to the MR which would be low hanging fruits like adding the core requirement and PHP requirement to composer.json.

🇫🇮Finland HeikkiY Oulu

Agreed. We can review these with @kekkis and approve the MR as soon as possible.

🇫🇮Finland HeikkiY Oulu

Running the project through PHP Compatibility tests finds more deprecations. I tested the module with PHP 8.3 but the deprecations are old.

---------------------------------------------
FOUND 11 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------
 36 | ERROR | Function mcrypt_get_iv_size() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
 36 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
 36 | ERROR | The constant "MCRYPT_RIJNDAEL_128" is deprecated since PHP 7.1 and removed since PHP 7.2
 36 | ERROR | The constant "MCRYPT_MODE_CBC" is deprecated since PHP 7.1 and removed since PHP 7.2
 37 | ERROR | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL instead
 37 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
 37 | ERROR | The constant "MCRYPT_RAND" is deprecated since PHP 7.1 and removed since PHP 7.2
 41 | ERROR | Function mcrypt_encrypt() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
 41 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
 41 | ERROR | The constant "MCRYPT_RIJNDAEL_128" is deprecated since PHP 7.1 and removed since PHP 7.2
 41 | ERROR | The constant "MCRYPT_MODE_CBC" is deprecated since PHP 7.1 and removed since PHP 7.2
------------------------------------------------------------------------------------------------------------------------------------------------------
🇫🇮Finland HeikkiY Oulu

Sounds good @silviaddweb. Added it.

🇫🇮Finland HeikkiY Oulu

This is now merged and new 2.1.2 version released.

🇫🇮Finland HeikkiY Oulu

Thank you for the report @dressedk!

I can verify your bug report and I created a MR to fix the issue.

🇫🇮Finland HeikkiY Oulu

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

🇫🇮Finland HeikkiY Oulu

We discussed this issue in Slack and I tested the latest patch from 🐛 Configuration being imported by the ConfigImporter sometimes has stale original data RTBC against 10.2.6 to solve the issue. At least in our staging environment which was suffering from this issue, the patch seems to now solve it. Our symptom was that taxonomy term and select list values in frontend were showing in wrong language after Drush deployment. Previously I tried the patch from this issue and 🐛 Wrong language field labels after `drush cr` because of Drush language negotiation Needs work to solve it.

🇫🇮Finland HeikkiY Oulu

We discussed this issue in Slack and I tested the latest patch from 🐛 Configuration being imported by the ConfigImporter sometimes has stale original data RTBC against 10.2.6 to solve the issue. At least in our staging environment which was suffering from this issue, the patch seems to now solve it. Our symptom was that taxonomy term and select list values in frontend were showing in wrong language after Drush deployment. I was also able to remove the patch from 🐛 Add multilingual support for caching basefield definitions Needs work without it having a visible regression.

🇫🇮Finland HeikkiY Oulu

We are experiencing the same issue. We are updating to Drupal core 10.2 and at the same time updating from Config split 1.x to 2.x. We have two sites where the update seemed to go fine initially but config sync and drush deploy seem to fail with this same error. Drush deploy faisl for us but also switching branches between 1.x and 2.x version of the module and trying to sync configuratin seems to also produce the same error in local development environment.

I think this is a critical issue because it breaks the whole deployment flow.

I was partly able to solve the problem by installing Config filter as a dependency with Composer to the project but it doesn't seem like a proper fix because the automated update process should handle this without needing to do an extra step.

🇫🇮Finland HeikkiY Oulu

Thanks for the fixes!

The original test report was sent to @joshahubbers-0 through e-mail. The module was audited in collaboration with Cookie information who owns Piwik Pro currently. I will add the PHPStan and PHPUnit test results here so that we have the completely history also in Drupal.org.

The original audit was done for level 9 but that is probably too strict level because even core doesn't validate for that. Looking at https://github.com/mglaman/phpstan-drupal/blob/main/phpstan.neon it seems like level 8 would be good. I will test your changes and report any findings.

------ -----------------------------------------------------------------------------------------------------------------------
Line piwik_pro.module
------ -----------------------------------------------------------------------------------------------------------------------
17 Function piwik_pro_help() has no return type specified.
17 Function piwik_pro_help() has parameter $route_name with no type specified.
37 Function piwik_pro_page_attachments() has no return type specified.
37 Function piwik_pro_page_attachments() has parameter $attachments with no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iter...
56 Function piwik_pro_page_top() has no return type specified.
56 Function piwik_pro_page_top() has parameter $page with no type specified.
------ -----------------------------------------------------------------------------------------------------------------------

------ --------------------------------------------------------------------------------------------------------------------------------------------------
Line src/Form/PiwikProAdminSettingsForm.php
------ --------------------------------------------------------------------------------------------------------------------------------------------------
23 Method Drupal\piwik_pro\Form\PiwikProAdminSettingsForm::getEditableConfigNames() return type has no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iter...
30 Method Drupal\piwik_pro\Form\PiwikProAdminSettingsForm::buildForm() has parameter $form with no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iter...
30 Method Drupal\piwik_pro\Form\PiwikProAdminSettingsForm::buildForm() return type has no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iter...
102 Method Drupal\piwik_pro\Form\PiwikProAdminSettingsForm::validateForm() has no return type specified.
102 Method Drupal\piwik_pro\Form\PiwikProAdminSettingsForm::validateForm() has parameter $form with no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iter...
106 Parameter #1 $string of function rtrim expects string, mixed given.
112 Parameter #1 $string of function strtolower expects string, mixed given.
118 Parameter #2 $subject of function preg_match expects string, mixed given.
123 Parameter #1 $string of function trim expects string, mixed given.
127 Parameter #2 $subject of function preg_split expects string, mixed given.
128 Argument of an invalid type array|false supplied for foreach, only iterables are supported.
140 Method Drupal\piwik_pro\Form\PiwikProAdminSettingsForm::submitForm() has no return type specified.
140 Method Drupal\piwik_pro\Form\PiwikProAdminSettingsForm::submitForm() has parameter $form with no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iter...
145 Parameter #1 $string of function substr expects string, mixed given.
------ --------------------------------------------------------------------------------------------------------------------------------------------------

------ ----------------------------------------------------------------------------------------------------------------------
Line src/PiwikProSnippet.php
------ ----------------------------------------------------------------------------------------------------------------------
83 Method Drupal\piwik_pro\PiwikProSnippet::getScript() return type has no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iter...
97 Parameter #2 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
97 Parameter #3 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
97 Parameter #4 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
100 Parameter #2 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
100 Parameter #3 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
109 Method Drupal\piwik_pro\PiwikProSnippet::getScript() should return array but returns null.
131 Parameter #2 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
131 Parameter #3 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
131 Parameter #4 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
137 Method Drupal\piwik_pro\PiwikProSnippet::getSyncScript() should return string but returns null.
145 Method Drupal\piwik_pro\PiwikProSnippet::getVisibilityPages() has no return type specified.
155 Parameter #1 $string of function mb_strtolower expects string, mixed given.
------ ----------------------------------------------------------------------------------------------------------------------

------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------
Line tests/src/Functional/PiwikProSnippetTest.php
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------
53 Property Drupal\Tests\piwik_pro\Functional\PiwikProSnippetTest::$config (Drupal\Core\Config\ImmutableConfig) does not accept Drupal\Core\Config\Config.
71 Parameter #1 $account of method Drupal\Tests\BrowserTestBase::drupalLogin() expects Drupal\Core\Session\AccountInterface, Drupal\user\Entity\User|false given.
80 Method Drupal\Tests\piwik_pro\Functional\PiwikProSnippetTest::testPiwikProConfiguration() has no return type specified.
93 Method Drupal\Tests\piwik_pro\Functional\PiwikProSnippetTest::testPiwikProHelp() has no return type specified.
96 Call to an undefined method Drupal\Tests\WebAssert::pageTextContains().
100 Call to an undefined method Drupal\Tests\WebAssert::pageTextContains().
106 Method Drupal\Tests\piwik_pro\Functional\PiwikProSnippetTest::testSnippetVisibility() has no return type specified.
110 Parameter #2 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
111 Parameter #3 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
113 Parameter #1 $text of method Drupal\Tests\WebAssert::responseContains() expects object|string, mixed given.
117 Parameter #2 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
122 Parameter #1 $text of method Drupal\Tests\WebAssert::responseNotContains() expects object|string, mixed given.
128 Method Drupal\Tests\piwik_pro\Functional\PiwikProSnippetTest::testSnippetVisibilityPagesInverted() has no return type specified.
133 Parameter #1 $text of method Drupal\Tests\WebAssert::responseNotContains() expects object|string, mixed given.
136 Parameter #1 $text of method Drupal\Tests\WebAssert::responseContains() expects object|string, mixed given.
142 Method Drupal\Tests\piwik_pro\Functional\PiwikProSnippetTest::testSnippetVisibilitySyncSnippet() has no return type specified.
148 Parameter #2 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
155 Method Drupal\Tests\piwik_pro\Functional\PiwikProSnippetTest::testSnippetVisibilityChangedDataLayer() has no return type specified.
162 Parameter #3 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
169 Method Drupal\Tests\piwik_pro\Functional\PiwikProSnippetTest::testSnippetVisibilityInvalidSettings() has no return type specified.
205 Method Drupal\Tests\piwik_pro\Functional\PiwikProSnippetTest::testSettingsForm() has no return type specified.
207 Call to an undefined method Drupal\Tests\WebAssert::statusCodeEquals().
208 Call to an undefined method Drupal\Tests\WebAssert::pageTextContains().
209 Call to an undefined method Drupal\Tests\WebAssert::elementExists().
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------

[ERROR] Found 57 errors

Also the PHPUnit test results were the following

Piwik Pro Snippet (Drupal\Tests\piwik_pro\Functional\PiwikProSnippet)
✔ Piwik pro configuration
✘ Piwik pro help

│ Behat\Mink\Exception\ResponseTextException: The text "Piwik Pro is a GDPR-proof tracking tool that allows you to track user visits." was not found anywhere in the text of the current page.

│ /var/www/html/vendor/behat/mink/src/WebAssert.php:907
│ /var/www/html/vendor/behat/mink/src/WebAssert.php:293
│ /var/www/html/tests/src/Functional/PiwikProSnippetTest.php:100
│ /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

✔ Snippet visibility
✔ Snippet visibility pages inverted
✔ Snippet visibility sync snippet
✔ Snippet visibility changed data layer
✔ Snippet visibility invalid settings
✘ Settings form

│ TypeError: Behat\Mink\Element\TraversableElement::findButton(): Argument #1 ($locator) must be of type string, Drupal\Core\StringTranslation\TranslatableMarkup given, called in /var/www/html/web/core/tests/Drupal/Tests/WebAssert.php on line 143

│ /var/www/html/vendor/behat/mink/src/Element/TraversableElement.php:97
│ /var/www/html/web/core/tests/Drupal/Tests/WebAssert.php:143
│ /var/www/html/web/core/tests/Drupal/Tests/UiHelperTrait.php:78
│ /var/www/html/tests/src/Functional/PiwikProSnippetTest.php:215
│ /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

Time: 00:13.857, Memory: 4.00 MB

Summary of non-successful tests:

Piwik Pro Snippet (Drupal\Tests\piwik_pro\Functional\PiwikProSnippet)
✘ Piwik pro help

│ Behat\Mink\Exception\ResponseTextException: The text "Piwik Pro is a GDPR-proof tracking tool that allows you to track user visits." was not found anywhere in the text of the current page.

│ /var/www/html/vendor/behat/mink/src/WebAssert.php:907
│ /var/www/html/vendor/behat/mink/src/WebAssert.php:293
│ /var/www/html/tests/src/Functional/PiwikProSnippetTest.php:100
│ /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

✘ Settings form

│ TypeError: Behat\Mink\Element\TraversableElement::findButton(): Argument #1 ($locator) must be of type string, Drupal\Core\StringTranslation\TranslatableMarkup given, called in /var/www/html/web/core/tests/Drupal/Tests/WebAssert.php on line 143

│ /var/www/html/vendor/behat/mink/src/Element/TraversableElement.php:97
│ /var/www/html/web/core/tests/Drupal/Tests/WebAssert.php:143
│ /var/www/html/web/core/tests/Drupal/Tests/UiHelperTrait.php:78
│ /var/www/html/tests/src/Functional/PiwikProSnippetTest.php:215
│ /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

ERRORS!
Tests: 8, Assertions: 75, Errors: 2.
Failed to run phpunit : exit status 2

🇫🇮Finland HeikkiY Oulu

I encountered the same issue while updating from Config split 1.x to 2.x. The problem in my case was that during the upgrade process I had mixed up 1.x and 2.x configuration files for the splits when switching development branches.

Basically in my config_split.config_split.environment.yml file I still had the old blacklist and graylist keys instead of the keys that 2.x is using. Config export was expecting to find an array but because the key was missing, it gave the error.

The error was fixed by adding the correct keys to the config split configuration file:

complete_list: {  }
partial_list: { }
🇫🇮Finland HeikkiY Oulu

We encountered the same issue in our multisite environment. We have had the default site working for over a year now without issues but the new multisite was experiencing this issue. It seems like Administrator role is not affected but basic editors are.

Clearing the cache solves the issue as expected. We are now waiting if it will be reported again.

🇫🇮Finland HeikkiY Oulu

+1 for this feature. We have encountered the issue several times now. It even doesn't necessarily involve several developers but a single developer might have hard time figuring out what the conflict with the structure data YAML file is.

We have used Fixed block content module in another project and it splits for example each block config into a separate file and we haven't had the same issue there.

I think it would make sense here also because each block, taxonomy and menu is a separate configuration in core also so you would have a linked structure file for it.

🇫🇮Finland HeikkiY Oulu

The patch from #5 does not seem to apply anymore against the latest alpha 3. Marking this as Needs work. I will test if the related issues could also solve the issue.

🇫🇮Finland HeikkiY Oulu

I can confirm that updating Field permissions module to 1.3.0 fixed the issue for us also.

🇫🇮Finland HeikkiY Oulu

This seems to fix the issue for us. Marking as RTBC.

🇫🇮Finland HeikkiY Oulu

We encountered the same issue also and it broke the content type view form completely with the following error:

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/web/modules/contrib/field_formatter/src/Plugin/Field/FieldFormatter/FieldWrapperBase.php on line 194

The latest RC version of the module is quite old. Would it be possible to make at least a new RC release where this is fixed? 3.0.0-rc2 was released 16 December 2022.

🇫🇮Finland HeikkiY Oulu

True, sorry about that.

There is an older similar issue 📌 DomPDF vulnerability Fixed in PDF API where the requirement is more strict to make sure a safe version is installed.

The change is making sure it installs a safe version https://git.drupalcode.org/project/pdf_api/-/merge_requests/18/diffs.

🇫🇮Finland HeikkiY Oulu

I can also confirm that #30 solves the issue. We had a confusing list of duplicated content in the admin/content listing when we added an exposed filter for the Author to be able to find the content for certain user more easily.

🇫🇮Finland HeikkiY Oulu

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

🇫🇮Finland HeikkiY Oulu

This should be now ready for review.

The basic functionality works and it also adds support for custom iframe blocking if the needed data attributes are already available in the iframe. In this case the iframe blocking logic is skipped.

I also added context to all module translated strings because they were missing from all t() functions. This should be mentioned in the change log when we release the next version.

After this is merged we can continue with Allow the administrator to define the message and button text for blocking iframes Active . We need to decide how we can support the dynamic cookie category in the iframe functionality and custom message with translation support. Perhaps we can for example separate the general message that can be customized from the category information.

🇫🇮Finland HeikkiY Oulu

@maxilein You can get the patch file from the MR: https://git.drupalcode.org/project/field_group/-/merge_requests/44.patch

Note that it's always recommended to save the patch file in local repository and use it from there. The MR patch can change if new commits are added to it might break existing functionality and it's also a possible attack vector because someone could slip malicious code to the MR.

🇫🇮Finland HeikkiY Oulu

Just want to comment that glad this issue is now RTBC. We have been experiencing also mysterious situations where paragraphs are not rendered on the page. We originally installed this patch because had some cases where the Paragraph Library submodule was causing issues where it was rendering the same element in multiple places at the same time.

In the current project we have been having this issue, we don't have Paragraph library yet enabled but we installed this patch because the feature was planned to be implemented.

In our case we were also thinking the reason could be Quick node clone module which can also clone the same paragraph content multiple times.

In our case the symptom was that the paragraph content went missing from anonymous users but it was visible for logged in users. So it definitely seemed like a cache issue. The issue gets solved when you save the node again.

I am happy with the RTBC situation and I can report back if we still experience the issue with paragraphs with the latest patch. But I also want to point out that there might be edge cases that contrib modules are cloning or rendering the same element many times in different places (Paragraph library and Quick node clone for one). In Quick node clone there is an open issue 🐛 Nested paragraph support RTBC where the cloning doesn't revision the cloned parent paragraph correctly which in part might explain some edge case bugs.

We are currently using the patch from #155. I compared that patch to the latest MR and there seems to be just differences in tests.

🇫🇮Finland HeikkiY Oulu

@jhuhta Thanks for clarifying it up. I will see what we can do. We are in the process of testing different AI powered translation options and this module came up as a suitable candidate. We will see if we end up needing the feature in the current project and we can then contribute to submitting a patch.

🇫🇮Finland HeikkiY Oulu

We have encountered a similar report from our client. We have had the module installed for a couple of years now and no huge issues with it.

But recently we received a bug report where a content that should not be indexed in the search appeared there for a moment. Now it has again disappeared from the index. I wonder if there is some gap between the indexing process where the content might appear in the search results before it gets unindexed again?

I was also leaning towards some configuration issue or that the exclude checkbox would have been unchecked. I used the Diff-module to compare the content revisions and it seems that the Exclude entity checkbox has been on the whole time.

Our relevant versions are
Drupal core: 10.1.15
Search API: 1.29
Search API Solr: 4.3.0

🇫🇮Finland HeikkiY Oulu

I would personally want to migrate the setting to a select option where you can make only one selection. Form validation can of course also work but I vote we create a follow up ticket, I would make a new select option to use Google consent mode v1 or v2 and map the old setting to the new select value if it exists.

🇫🇮Finland HeikkiY Oulu

Created the first MR to add the missing consent types.

🇫🇮Finland HeikkiY Oulu

Fixed conflict and merged. Thanks @aelfendir.

🇫🇮Finland HeikkiY Oulu

I can confirm that #175 works but #176 does not. We were previously using the patch from #171 and it doesn't work with core 10.2.

🇫🇮Finland HeikkiY Oulu

As mentioned in #150, applying patches against MR's is a security issue and the patch from that comment doesn't anymore apply against core 10.2.3, I will attach a newer patch from the MR here.

This patch applies against 10.2.3.

🇫🇮Finland HeikkiY Oulu

@mfb

Yes, you are absolutely correct. Sorry for the confusion, I had a failing patch against 10.2.3 and that lead to the codebase already seemingly having the fix in it.

And yes, it does seem to be missing from the release notes and would be good to be there since it's a regression. We didn't catch it either during our D10.2 testing but only in production after third party contacted the client that the RSS feed is broken.

🇫🇮Finland HeikkiY Oulu

We are running 10.2.2 and we still seem to be experiencing this issue after upgrading our site from 10.1.x to 10.2.2. Looking at our source code we seem to have https://git.drupalcode.org/project/drupal/-/commit/a5369ac460 already applied but when using a text field as rss feed source, it converts empty spaces as &nbsp in the rss feed source.

The RSS feed was working before the update but now we get a validation error The entity "nbsp" was referenced, but not declared.

When looking at the RSS feed source, I can see that empty spaces are encoded as   like so:

<description>Lorem ipsum.&nbsp;</description>
🇫🇮Finland HeikkiY Oulu

I tested that the 10.x patches don't seem to apply against 10.2.3.

🇫🇮Finland HeikkiY Oulu

I encountered a bit similar issue with a multisite.

I did the following steps which caused the error.

1. Enabled Diff and configured it in site A.
2. Exported all changed configs with drush cex.
3. Copied the new configurations to a site B
4. Run drush cim which enabled Diff and imported the related configs.
5. When trying to compare revisions, I got the same error as in this issue.

Also the settings page for Diff was broken and it was missing all the needed settings. In my case I was able to fix it by removing the configs and importing configs again which uninstalled Diff. After that I was able to install the module with Drush and all the settings appeared correctly.

It seems like installing the module from configurations is missing possible some database update step.

🇫🇮Finland HeikkiY Oulu

We have been using the forked version for a while now without issues.

🇫🇮Finland HeikkiY Oulu

The code looks good and it seems to also support the changes in Google Consent Mode v2. There was a good technical documentation available in Cookie information also: https://support.cookieinformation.com/en/articles/8707953-how-to-update-....

One thing I am wondering is that should this still be configurable in the module? We have implemented support for GCM in Cookie information module https://www.drupal.org/project/cookieinformation and it has a module setting to enable the additional tag. I don't see it as an huge issue that it's enabled by default but for example the blog article from Cookie information mentions that you also need to update the cookie popup template to support v2.

🇫🇮Finland HeikkiY Oulu

We also encountered this problem. In our case the error happened when we were syncing configurations between two Drupal sites and we had an taxonomy term reference field.

The entity reference field was generated correctly but it was missing the field setting for vocabularies that can be referenced. This broke saving the node and the error from this issue happened.

We were able to solve the issue by editing the field configurations in the content type and selecting the correct vocabulary.

🇫🇮Finland HeikkiY Oulu

We debugged this more and it seems to be related to this Token patch we are using:

"drupal/token": {
   "#3281871 Token generation of entity references are not respecting the given langcode": "https://www.drupal.org/files/issues/2023-11-09/3281871_token_entity_references_langcode.patch"
},

I will close this ticket and continue the discussion there.

🇫🇮Finland HeikkiY Oulu

Looks good now. I will mark this as RTBC. We will check when we can merge this.

Can @aelfendir you make a merge request for this?

🇫🇮Finland HeikkiY Oulu

I checked our staging and we seem to be still getting this error during cron run. We will try to debug this a bit more to understood where this error is coming from.

It might be that this issue should be moved to Token module issue queue because the error is coming from web/modules/contrib/token/token.tokens.inc.

🇫🇮Finland HeikkiY Oulu

A small update. I tried today to reproduce the issue in my local but so far I have not been able to. I would like to ask for help from others here to help me understand that what database tables might be affected if a nested paragraph is cloned and the parent paragraph id is not duplicated correctly?

I did however update both Paragraphs and Quick node clone to latest version which might also affect my testing. I will also try with the older version.

I will also try to explain our structure a bit more to understand the situation.

We have some event content types where there is a nested paragraph like this:
- Section
-- Accordion
--- Accordion item
--- Accordion item
- Section
-- Accordion
--- Accordion item
--- Accordion item

What happens is that there are several contents which are cloned from the same template. And randomly it happens so that the content first looks fine but then suddently the Section and Accordion paragraphs seem to be intact but the Accordion items are missing. And resaving the clone brings them back.

Also notable is that we are using Asymmetric translations widget module to bring better support for different language versions.

🇫🇮Finland HeikkiY Oulu

We encountered an error when using this patch in core with Redirect 404 submodule of Redirect.

After upgrading to Drupal 10.2, I get the following error when trying to disable the maintenance mode in en/admin/config/development/maintenance:

The website encountered an unexpected error. Try again later.

TypeError: Drupal\system\Form\SiteMaintenanceModeForm::__construct(): Argument #1 ($logger_factory) must be of type Drupal\Core\Logger\LoggerChannelFactory, Drupal\redirect_404\Render\Redirect404LogSuppressor given, called in /var/www/html/web/core/modules/system/src/Form/SiteMaintenanceModeForm.php on line 74 in Drupal\system\Form\SiteMaintenanceModeForm->__construct() (line 58 of core/modules/system/src/Form/SiteMaintenanceModeForm.php).

Drupal\system\Form\SiteMaintenanceModeForm::create(Object) (Line: 28)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('\Drupal\system\Form\SiteMaintenanceModeForm') (Line: 48)
Drupal\Core\Controller\HtmlFormController->getFormObject(Object, '\Drupal\system\Form\SiteMaintenanceModeForm') (Line: 58)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
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: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

🇫🇮Finland HeikkiY Oulu

Thank you @swentel. I can confirm that the latest patch from #10 fixes my issue and the site opens again. I will do a bit more testing in our staging environment but I would be willing to mark this as RTBC.

🇫🇮Finland HeikkiY Oulu

Sorry, was debugging a wrong breakpoint. Here is a screenshot what $variables['content'] is giving me when the error happens.

🇫🇮Finland HeikkiY Oulu

I debugged this and I think this is related to preprocessing Gin / Claro because the content array is not there at all but it contains a html array.

I'll attach what the variable contains when I add a breakpoint to ds_theme_suggestions_alter() during the error. I will attach an image from xdebug what $variables is currently giving me.

🇫🇮Finland HeikkiY Oulu

Thanks a lot for the quick reply @sarwan_verma. I tested the patch and it applies correctly against 3.17 but unfortunately it doesn't fix the error.

Our guess is that this is related to the following line: https://git.drupalcode.org/project/ds/-/blob/8.x-3.x/ds.module?ref_type=...

Most likely $variables['content']['#ds_configuration']['layout'] has been previously an array but is now returning an object. I'll try to debug what it's returning for me at the moment.

🇫🇮Finland HeikkiY Oulu

We are experiencing a similar issue.

We have a client who is creating templates for complicate pages with nested paragraphs. They have for example accordion type paragraphs which contain multiple levels of paragraphs.

We were investigating an issue where it seems like editing two different clones makes the content from the other clone disappear until the content is saved again. I presume that the parent paragraph id is always the same and it gets mixed up between the contents.

We will test if this patch will solve the issue for us.

🇫🇮Finland HeikkiY Oulu

Verified that latest changes seem to fix the error.

🇫🇮Finland HeikkiY Oulu

I can also confirm that the latest merge request applies against 10.2.

Are there any clear instructions how to repeat the issue without the patch? Would make it easier to test that it works.

I originally applied this patch in our project because we had trouble reordering the fields in the node edit form layout but I also had other related patches applied so I would like to confirm I am testing the right thing.

Production build 0.69.0 2024