Freiburg, Germany
Account created on 17 January 2008, over 16 years ago
#

Merge Requests

More

Recent comments

🇩🇪Germany geek-merlin Freiburg, Germany

geek-merlin created an issue.

🇩🇪Germany geek-merlin Freiburg, Germany

geek-merlin created an issue.

🇩🇪Germany geek-merlin Freiburg, Germany

Yes, this gave me headaches too.

Closed an issue as dup.

🇩🇪Germany geek-merlin Freiburg, Germany

Yep this can be a PITA.
I suppose this is a dup of the related issue.

🇩🇪Germany geek-merlin Freiburg, Germany

Looks like a dup of the related issue to me.

🇩🇪Germany geek-merlin Freiburg, Germany

Looking into this: #2 looks like a good start to me.

I wonder though:
The the restriction is enforced in a constraint validator. Which means: User is informed about the limit AFTER they created group content (and potentially filled a very big form).

UX-wise, restricting access seems like the better option to me (and that may also apply to the group cardinality restrictions that are already in that validator).

@kristiaan, do you have an opinion on that?

🇩🇪Germany geek-merlin Freiburg, Germany

So closing as dup of Set max cardinality on GroupContentEnables config Needs work

🇩🇪Germany geek-merlin Freiburg, Germany

Added a trivial fix that covers the case when $elements['widget']['add_more'] is empty.

Applies cleanly on my composer site and fixes the issue for me.

🇩🇪Germany geek-merlin Freiburg, Germany

I can confirm that #6 applies to current version and fixes the issue for me.

🇩🇪Germany geek-merlin Freiburg, Germany

#7: According to jquery docs that should not matter.
https://api.jquery.com/jQuery/

🇩🇪Germany geek-merlin Freiburg, Germany

> LanguageNegotiationUrlFallback uses interface language as URL fallback language. It should use content language instead.

I can not follow this. In which case it's wontfix.

🇩🇪Germany geek-merlin Freiburg, Germany

Hmm, there is a release. Set that to "recommended" in the DrupalOrg UI.

Composer sees the release too:

$ composer show -a drupal/rat
name     : drupal/rat
descrip. : 
keywords : 
versions : 1.0.x-dev, * 1.0.0, 1.0.0-rc2, 1.0.0-rc1
type     : library
license  : GNU General Public License v2.0 or later (gpl-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
homepage : 
source   : [git] https://git.drupalcode.org/project/rat.git 28202b02262a39ac8dbbfd43696b67c0c8c46b71
dist     : []  
path     : /home/merlin/Code/geeks4change/sites/site-h4d-greenopolis/vendor/drupal/rat
names    : drupal/rat

autoload
psr-4
Drupal\rat\ => src/

requires
php ^7.4 || ^8.0

requires (dev)
drupal/core ^9.4
drupal/core-dev ^9.4

🇩🇪Germany geek-merlin Freiburg, Germany

Fix lifecycle property.

🇩🇪Germany geek-merlin Freiburg, Germany

See related issue.

🇩🇪Germany geek-merlin Freiburg, Germany

The \Drupal\Core\Ajax\CommandWithAttachedAssetsTrait::getRenderedContent now contains this line

      $html = \Drupal::service('renderer')->renderRoot($this->content);

which in fact makes this fixed.

🇩🇪Germany geek-merlin Freiburg, Germany

Yo! I made the same omission in translation_bliss module, now fixed:
You need a $name check in getCacheableMetadata.

That said, imho it's still a core bug if it WSODs on too much config cachability.

🇩🇪Germany geek-merlin Freiburg, Germany

@Dieter
I debugged a similar thing lately, it looks like the new permission negitiation code is not robust against some config override cacheability.
Can you grep "implements ConfigFactoryOverrideInterface" modules?

🇩🇪Germany geek-merlin Freiburg, Germany

Nope, that does not work out.
How to fix:
- Decorate MailManager
- Override Mailsystem config
I'd favor the latter.

🇩🇪Germany geek-merlin Freiburg, Germany

Imho the key question is: Should the "tag" be alter-able.
If not, a MarkerInterface or Atrtribute does well.
If yes, extending the plugin definition with some kind of tags property springs to mind.

+1 for the latter from me.

🇩🇪Germany geek-merlin Freiburg, Germany

See #13, we have paramter level #[Autowire].

🇩🇪Germany geek-merlin Freiburg, Germany

Feedback: We used patch #52 in a project, but it broke access for links because the access check code is wrong (must not use current context as access can also be checked via $url->access().
Did not investigate further, will do it differently.

🇩🇪Germany geek-merlin Freiburg, Germany

I ran into this too and debugged it.

- YES (at least from my case) it looks like this should NOT be silenced, because it would hide an underlying issue.
- NO, it is not wontfix, any such warning means that a warning should be emitted somewhere else already, which is a bug.

How to debug

(might go into a docs page "How to debug backtraces in theming")
- Note the full backtrace and publish it
- It contains sth like this:

Drupal\Component\Utility\Html::getUniqueId(NULL) (Line: 42)
__TwigTemplate_0818f4f8612ad478e98a373e283b0d1d->doDisplay(Array, Array) (Line: 360)

which means that the template with the long name called the function above in template line 42 (!)
- Note the full template and publish it. (without this, the trace is likely useless.)
- Look on line 42 what is missing.

Example

In my case the template had top line
/* core/modules/navigation/templates/navigation-menu.html.twig */
and line 42 is

        $context["menu_heading_id"] = ("menu--" . \Drupal\Component\Utility\Html::getUniqueId($this->sandbox->ensureToStringAllowed(($context["menu_name"] ?? null), 2, $this->source)));

Also i see this in the backtrace:

twig_render_template('core/modules/navigation/templates/navigation-menu.html.twig', Array) (Line: 348)

Which spots me to this line of custom code:

    $build = [
      '#theme' => 'navigation_menu',
      '#items' => self::getLinkItems($linkTreeList, $cacheabilityCollector),
      '#sorted' => TRUE,
    ];

and the following change fixes my instance of the issue

    $build = [
      '#theme' => 'navigation_menu',
      '#items' => self::getLinkItems($linkTreeList, $cacheabilityCollector),
      '#sorted' => TRUE,
      '#menu_name' => 'dummy',
    ];

The underlying bug is that the template does not emit a missing-value warning, and no default is set.

Hope this helps.

🇩🇪Germany geek-merlin Freiburg, Germany

@ksenzee #12:
Thanks for clarifying. Looks like we are totally on the same boat:

> The original reason for this issue, as far as I can tell, was more about good internal architecture than about specifically letting other modules access the data. I think that reason still stands as well.

I boldly updated the title to what i understand. By any means challenge that if it's not correct.

> I’m fairly sure a server-side API is still needed.
> [tourauto ... needs to record taken tours]

Yes, that use case sounds reasonable. I see some room for bikeshedding though. When is a tour taken? Seen one tip? Finished it? But that's a different story for a different issue.

🇩🇪Germany geek-merlin Freiburg, Germany

Let's see how the last patch is tested.

🇩🇪Germany geek-merlin Freiburg, Germany

According to the last comment this can not be reproduced. This issue will be closed after some time unless confirmed to still apply.

🇩🇪Germany geek-merlin Freiburg, Germany

Implemented and worksforme. See related module for usage (in component js).

🇩🇪Germany geek-merlin Freiburg, Germany

Blocked by related tour issue.

🇩🇪Germany geek-merlin Freiburg, Germany

geek-merlin created an issue.

🇩🇪Germany geek-merlin Freiburg, Germany

Yep, i assumed nut much happened until core, but looking through the commits, i see the code.

Closing as dup.

🇩🇪Germany geek-merlin Freiburg, Germany

I have worked quite a bit with this module now, and really think a client-side API is needed to start, stop, and mess with existing tours, so opened 📌 Provide a JS interface by exposing Shepherd Tour object Active .

Also i think a server-side API is needed, to create dynamic tour objects. After some fiddling i found i can create config on the fly and pass it to TourViewBuilder, and call it a day. Not an elegant way in any sense, but it works for me. (I'll publish amodule soon-ish which may serve as documentaton.)

I thought a bit about, and do not see other obvious use cases.

So unless there are such use cases, let's remove the code-todo and close as WONTFIX.

🇩🇪Germany geek-merlin Freiburg, Germany

geek-merlin created an issue.

🇩🇪Germany geek-merlin Freiburg, Germany

Woohoo, i found it.

FTR: One module (in my case ErrorLevelPermission, which myself created a long time ago) erroneously added a user.permission cache context on (any config and thus also) user.role.*. Fixed in the current 1.4 release of ErrorLevelPermission.

This might happen with other contrib or custom modules in the future, so documenting for now.

Maybe the core code may need some robustification, but let's see if this happens again.

Closing for now.

🇩🇪Germany geek-merlin Freiburg, Germany

FYI but out of scope here: For my own needs i use Composable Inheritance to avoid (amongst others) this kind of pain on highly self-coupled classes that are a pain to decorate but nice to inherit.

🇩🇪Germany geek-merlin Freiburg, Germany

Ran into this when i had a site with hux:1.4 on core:10.3. Updating to hux:1.5 fixes the site problem.

As for MR !8558:

I reviewed the code and can confirm that it trivially implements the #30.1 proposal (single extended interface).

Requiring a test for this imho is only boilerplate.

Behavior-wise: I can confirm that adding this patch changed the core:10.3+hux:1.4 error like below:

Before:

$ drush cim
 [notice] There are no changes to import.
PHP Fatal error:  Uncaught Error: Call to undefined method Drupal\hux\HuxModuleHandler::destruct() in /home/merlin/Code/geeks4change/sites/site-h4d-greenopolis/web/core/lib/Drupal/Core/DrupalKernel.php:723

After:

$ drush cr
PHP Fatal error:  Class Drupal\hux\HuxModuleHandler contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Drupal\Core\DestructableInterface::destruct) in /home/merlin/Code/geeks4change/sites/site-h4d-greenopolis/web/modules/contrib/hux/src/HuxModuleHandler.php on line 21

Thus RTBC-ing.

🇩🇪Germany geek-merlin Freiburg, Germany

I can NOT reproduce this with core and webform alone.

Investigating.

🇩🇪Germany geek-merlin Freiburg, Germany

Tried to workaround by deleting mentioned drush.services.yml.
Also token and symfony_mailer trigger this.

🇩🇪Germany geek-merlin Freiburg, Germany

Pathauto triggers the same bug:

$ drush -vvv updb
 [preflight] Config paths: vendor/drush/drush/drush.yml,drush/drush.yml
 [preflight] Alias paths: web/drush/sites,drush/sites
 [preflight] Commandfile search paths: vendor/drush/drush/src,drush
 [info] Starting bootstrap to full [0.53 sec, 10.74 MB]
 [info] Drush bootstrap phase 5 [0.53 sec, 10.74 MB]
 [info] Try to validate bootstrap phase 5 [0.53 sec, 10.74 MB]
 [info] Try to validate bootstrap phase 5 [0.53 sec, 10.75 MB]
 [info] Try to bootstrap at phase 5 [0.53 sec, 10.75 MB]
 [info] Drush bootstrap phase: bootstrapDrupalRoot() [0.53 sec, 10.75 MB]
 [info] Change working directory to web [0.53 sec, 10.75 MB]
 [info] Initialized Drupal 10.3.0 root directory at web [0.53 sec, 10.85 MB]
 [info] Try to validate bootstrap phase 5 [0.53 sec, 10.85 MB]
 [info] Try to bootstrap at phase 5 [0.55 sec, 11.31 MB]
 [info] Drush bootstrap phase: bootstrapDrupalSite() [0.55 sec, 11.31 MB]
 [debug] Could not find a Drush config file at sites/default/drush.yml. [0.56 sec, 11.49 MB]
 [info] Initialized Drupal site localhost:9999 at sites/default [0.56 sec, 11.49 MB]
 [info] Try to validate bootstrap phase 5 [0.56 sec, 11.49 MB]
 [info] Try to bootstrap at phase 5 [0.56 sec, 11.49 MB]
 [info] Drush bootstrap phase: bootstrapDrupalConfiguration() [0.56 sec, 11.49 MB]
 [info] Try to validate bootstrap phase 5 [0.6 sec, 11.69 MB]
 [info] Try to bootstrap at phase 5 [0.66 sec, 12.96 MB]
 [info] Drush bootstrap phase: bootstrapDrupalDatabase() [0.66 sec, 12.96 MB]
 [info] Successfully connected to the Drupal database. [0.66 sec, 12.96 MB]
 [info] Try to validate bootstrap phase 5 [0.66 sec, 12.96 MB]
 [info] Try to bootstrap at phase 5 [0.66 sec, 12.96 MB]
 [info] Drush bootstrap phase: bootstrapDrupalFull() [0.66 sec, 12.96 MB]
 [debug] Start bootstrap of the Drupal Kernel. [0.66 sec, 12.96 MB]
 [debug] Get container builder [0.93 sec, 15.38 MB]
 [debug] Finished bootstrap of the Drupal Kernel. [2.05 sec, 43.42 MB]
 [debug] Loading drupal module drush commands & etc. [2.05 sec, 43.42 MB]
 [debug] Found drush.services.yml for token Drush commands [2.07 sec, 43.59 MB]
 [debug] Found drush.services.yml for webform Drush commands [2.08 sec, 43.59 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeCommands [3.35 sec, 60.96 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeCommentsCommands [3.35 sec, 60.97 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeSessionsCommands [3.35 sec, 60.97 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeUserFieldsCommands [3.35 sec, 60.97 MB]
 [debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeUserTableCommands [3.36 sec, 60.98 MB]
 [debug] Add a commandfile class: Drupal\config_actions\Commands\ConfigActionsCommands [3.36 sec, 60.98 MB]
 [debug] Add a commandfile class: Drupal\default_content\Commands\DefaultContentCommands [3.36 sec, 60.99 MB]
 [debug] Add a commandfile class: Drupal\entity_reference_revisions\Commands\EntityReferenceRevisionsCommands [3.37 sec, 61 MB]
 [debug] Add a commandfile class: Drupal\l10n_tools\Commands\L10nToolsCommands [3.39 sec, 61 MB]
 [debug] Add a commandfile class: Drupal\smart_date\Commands\SmartDateDrushCommands [3.39 sec, 61.01 MB]
 [debug] Add a commandfile class: Drupal\symfony_mailer\Commands\MailerCommands [3.39 sec, 61.02 MB]
 [debug] Add a commandfile class: Drupal\token\Commands\TokenCommands [3.39 sec, 61.02 MB]
 [debug] Add a commandfile class: Drupal\webform\Commands\WebformSubmissionCommands [3.4 sec, 61.02 MB]
 [debug] Add a commandfile class: Drupal\webform\Commands\WebformLibrariesCommands [3.4 sec, 61.06 MB]
 [debug] Add a commandfile class: Drupal\webform\Commands\WebformUtilityCommands [3.41 sec, 61.07 MB]
 [debug] Add a commandfile class: Drupal\webform\Commands\WebformDevelCommands [3.41 sec, 61.08 MB]
 [debug] Add a commandfile class: Drupal\webform\Commands\WebformSanitizeSubmissionsCommands [3.41 sec, 61.09 MB]
 [debug] Add a commandfile class: Drupal\pathauto\Commands\PathautoCommands [3.41 sec, 61.09 MB]
"""
#0 web/core/lib/Drupal/Core/Cache/VariationCache.php(242): Drupal\Core\Cache\Context\CacheContextsManager->convertTokensToKeys()\n
#1 web/core/lib/Drupal/Core/Cache/VariationCache.php(173): Drupal\Core\Cache\VariationCache->createCacheIdFast()\n
#2 web/core/lib/Drupal/Core/Cache/VariationCache.php(35): Drupal\Core\Cache\VariationCache->getRedirectChain()\n
#3 web/core/lib/Drupal/Core/Session/AccessPolicyProcessor.php(85): Drupal\Core\Cache\VariationCache->get()\n
#4 web/core/lib/Drupal/Core/Session/PermissionsHashGenerator.php(126): Drupal\Core\Session\AccessPolicyProcessor->processAccessPolicies()\n
#5 web/core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php(53): Drupal\Core\Session\PermissionsHashGenerator->getCacheableMetadata()\n
#6 web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(189): Drupal\Core\Cache\Context\AccountPermissionsCacheContext->getCacheableMetadata()\n
#7 web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(115): Drupal\Core\Cache\Context\CacheContextsManager->optimizeTokens()\n
#8 web/core/lib/Drupal/Core/Cache/VariationCache.php(219): Drupal\Core\Cache\Context\CacheContextsManager->convertTokensToKeys()\n
#9 web/core/lib/Drupal/Core/Cache/VariationCache.php(57): Drupal\Core\Cache\VariationCache->createCacheId()\n
#10 web/core/lib/Drupal/Core/Session/AccessPolicyProcessor.php(137): Drupal\Core\Cache\VariationCache->set()\n
#11 web/core/lib/Drupal/Core/Session/PermissionsHashGenerator.php(126): Drupal\Core\Session\AccessPolicyProcessor->processAccessPolicies()\n
#12 web/core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php(53): Drupal\Core\Session\PermissionsHashGenerator->getCacheableMetadata()\n
#13 web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(189): Drupal\Core\Cache\Context\AccountPermissionsCacheContext->getCacheableMetadata()\n
#14 web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(115): Drupal\Core\Cache\Context\CacheContextsManager->optimizeTokens()\n
#15 web/core/lib/Drupal/Core/Cache/VariationCache.php(219): Drupal\Core\Cache\Context\CacheContextsManager->convertTokensToKeys()\n
#16 web/core/lib/Drupal/Core/Cache/VariationCache.php(57): Drupal\Core\Cache\VariationCache->createCacheId()\n
#17 web/core/lib/Drupal/Core/Session/AccessPolicyProcessor.php(137): Drupal\Core\Cache\VariationCache->set()\n
#18 web/core/lib/Drupal/Core/Session/PermissionsHashGenerator.php(126): Drupal\Core\Session\AccessPolicyProcessor->processAccessPolicies()\n
#19 web/core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php(53): Drupal\Core\Session\PermissionsHashGenerator->getCacheableMetadata()\n
#20 web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(189): Drupal\Core\Cache\Context\AccountPermissionsCacheContext->getCacheableMetadata()\n
#21 web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(115): Drupal\Core\Cache\Context\CacheContextsManager->optimizeTokens()\n
#22 web/core/lib/Drupal/Core/Cache/VariationCache.php(219): Drupal\Core\Cache\Context\CacheContextsManager->convertTokensToKeys()\n
#23 web/core/lib/Drupal/Core/Cache/VariationCache.php(57): Drupal\Core\Cache\VariationCache->createCacheId()\n
#24 web/core/lib/Drupal/Core/Session/AccessPolicyProcessor.php(137): Drupal\Core\Cache\VariationCache->set()\n
#25 web/core/lib/Drupal/Core/Session/PermissionChecker.php(23): Drupal\Core\Session\AccessPolicyProcessor->processAccessPolicies()\n
#26 web/core/lib/Drupal/Core/Session/UserSession.php(129): Drupal\Core\Session\PermissionChecker->hasPermission()\n
#27 web/core/lib/Drupal/Core/Session/AccountProxy.php(121): Drupal\Core\Session\UserSession->hasPermission()\n
#28 web/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUserAdmin.php(106): Drupal\Core\Session\AccountProxy->hasPermission()\n


#29 web/core/modules/language/src/LanguageNegotiator.php(197): Drupal\user\Plugin\LanguageNegotiation\LanguageNegotiationUserAdmin->getLangcode()\n
#30 web/core/modules/language/src/LanguageNegotiator.php(137): Drupal\language\LanguageNegotiator->negotiateLanguage()\n
#31 web/core/modules/language/src/ConfigurableLanguageManager.php(218): Drupal\language\LanguageNegotiator->initializeType()\n
#32 web/core/lib/Drupal/Core/Menu/LocalActionManager.php(141): Drupal\language\ConfigurableLanguageManager->getCurrentLanguage()\n
#33 [internal function]: Drupal\Core\Menu\LocalActionManager->__construct()\n


#34 vendor/symfony/dependency-injection/ContainerBuilder.php(1140): ReflectionClass->newInstanceArgs()\n
#35 vendor/symfony/dependency-injection/ContainerBuilder.php(586): Symfony\Component\DependencyInjection\ContainerBuilder->createService()\n
#36 vendor/symfony/dependency-injection/ContainerBuilder.php(1258): Symfony\Component\DependencyInjection\ContainerBuilder->doGet()\n
#37 vendor/symfony/dependency-injection/ContainerBuilder.php(1210): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices()\n
#38 vendor/symfony/dependency-injection/ContainerBuilder.php(1673): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices()\n
#39 vendor/symfony/dependency-injection/ContainerBuilder.php(1166): Symfony\Component\DependencyInjection\ContainerBuilder->callMethod()\n
#40 vendor/symfony/dependency-injection/ContainerBuilder.php(586): Symfony\Component\DependencyInjection\ContainerBuilder->createService()\n
#41 vendor/symfony/dependency-injection/ContainerBuilder.php(531): Symfony\Component\DependencyInjection\ContainerBuilder->doGet()\n
#42 vendor/drush/drush/src/Commands/core/CacheCommands.php(62): Symfony\Component\DependencyInjection\ContainerBuilder->get()\n
#43 vendor/drush/drush/src/Runtime/ServiceManager.php(329): Drush\Commands\core\CacheCommands::create()\n


#44 vendor/drush/drush/src/Boot/DrupalBoot8.php(305): Drush\Runtime\ServiceManager->instantiateServices()\n
#45 vendor/drush/drush/src/Boot/DrupalBoot8.php(233): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands()\n
#46 vendor/drush/drush/src/Boot/BootstrapManager.php(236): Drush\Boot\DrupalBoot8->bootstrapDrupalFull()\n
#47 vendor/drush/drush/src/Boot/BootstrapManager.php(377): Drush\Boot\BootstrapManager->doBootstrap()\n
#48 vendor/drush/drush/src/Boot/BootstrapManager.php(329): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex()\n
#49 vendor/drush/drush/src/Boot/BootstrapHook.php(36): Drush\Boot\BootstrapManager->bootstrapToPhase()\n
#50 vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(44): Drush\Boot\BootstrapHook->initialize()\n
#51 vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(36): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook()\n
#52 vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(29): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook()\n
#53 vendor/consolidation/annotated-command/src/CommandProcessor.php(145): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize()\n
#54 vendor/consolidation/annotated-command/src/AnnotatedCommand.php(376): Consolidation\AnnotatedCommand\CommandProcessor->initializeHook()\n
#55 vendor/symfony/console/Command/Command.php(292): Consolidation\AnnotatedCommand\AnnotatedCommand->initialize()\n
#56 vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run()\n
#57 vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()\n
#58 vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()\n
#59 vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()\n
#60 vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()\n
#61 vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run()\n
#62 vendor/drush/drush/drush(4): require('...')\n
#63 vendor/bin/drush(119): include('...')\n
#64 {main}
"""

🇩🇪Germany geek-merlin Freiburg, Germany

After hunting down the recursion set a trap:

  // \Drupal\Core\Cache\Context\CacheContextsManager::convertTokensToKeys
  public function convertTokensToKeys(array $context_tokens) {
    static $i=0;
    $i++;
    if ($i > 10) {
      dd((new \Exception())->getTraceAsString());
    }

Yielding:

$ drush -vvv updb
 [preflight] Config paths: vendor/drush/drush/drush.yml,drush/drush.yml
 [preflight] Alias paths: web/drush/sites,drush/sites
 [preflight] Commandfile search paths: vendor/drush/drush/src,drush
 [info] Starting bootstrap to full [0.73 sec, 10.74 MB]
 [info] Drush bootstrap phase 5 [0.73 sec, 10.74 MB]
 [info] Try to validate bootstrap phase 5 [0.73 sec, 10.75 MB]
 [info] Try to validate bootstrap phase 5 [0.73 sec, 10.75 MB]
 [info] Try to bootstrap at phase 5 [0.73 sec, 10.75 MB]
 [info] Drush bootstrap phase: bootstrapDrupalRoot() [0.73 sec, 10.75 MB]
 [info] Change working directory to web [0.73 sec, 10.75 MB]
 [info] Initialized Drupal 10.3.0 root directory at web [0.73 sec, 10.85 MB]
 [info] Try to validate bootstrap phase 5 [0.73 sec, 10.85 MB]
 [info] Try to bootstrap at phase 5 [0.74 sec, 11.31 MB]
 [info] Drush bootstrap phase: bootstrapDrupalSite() [0.74 sec, 11.31 MB]
 [debug] Could not find a Drush config file at sites/default/drush.yml. [0.74 sec, 11.49 MB]
 [info] Initialized Drupal site localhost:9999 at sites/default [0.74 sec, 11.49 MB]
 [info] Try to validate bootstrap phase 5 [0.74 sec, 11.49 MB]
 [info] Try to bootstrap at phase 5 [0.74 sec, 11.49 MB]
 [info] Drush bootstrap phase: bootstrapDrupalConfiguration() [0.74 sec, 11.49 MB]
 [info] Try to validate bootstrap phase 5 [0.74 sec, 11.69 MB]
 [info] Try to bootstrap at phase 5 [0.76 sec, 12.96 MB]
 [info] Drush bootstrap phase: bootstrapDrupalDatabase() [0.76 sec, 12.96 MB]
 [info] Successfully connected to the Drupal database. [0.76 sec, 12.96 MB]
 [info] Try to validate bootstrap phase 5 [0.76 sec, 12.96 MB]
 [info] Try to bootstrap at phase 5 [0.76 sec, 12.96 MB]
 [info] Drush bootstrap phase: bootstrapDrupalFull() [0.76 sec, 12.96 MB]
 [debug] Start bootstrap of the Drupal Kernel. [0.76 sec, 12.96 MB]
 [debug] Get container builder [0.85 sec, 15.38 MB]
 [debug] Finished bootstrap of the Drupal Kernel. [1.23 sec, 43.42 MB]
 [debug] Loading drupal module drush commands & etc. [1.23 sec, 43.42 MB]
 [debug] Found drush.services.yml for token Drush commands [1.23 sec, 43.59 MB]
 [debug] Found drush.services.yml for webform Drush commands [1.23 sec, 43.59 MB]
"""
#0 web/core/lib/Drupal/Core/Cache/VariationCache.php(242): Drupal\Core\Cache\Context\CacheContextsManager->convertTokensToKeys()\n
#1 web/core/lib/Drupal/Core/Cache/VariationCache.php(173): Drupal\Core\Cache\VariationCache->createCacheIdFast()\n
#2 web/core/lib/Drupal/Core/Cache/VariationCache.php(35): Drupal\Core\Cache\VariationCache->getRedirectChain()\n
#3 web/core/lib/Drupal/Core/Session/AccessPolicyProcessor.php(85): Drupal\Core\Cache\VariationCache->get()\n
#4 web/core/lib/Drupal/Core/Session/PermissionsHashGenerator.php(126): Drupal\Core\Session\AccessPolicyProcessor->processAccessPolicies()\n
#5 web/core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php(53): Drupal\Core\Session\PermissionsHashGenerator->getCacheableMetadata()\n
#6 web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(189): Drupal\Core\Cache\Context\AccountPermissionsCacheContext->getCacheableMetadata()\n
#7 web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(115): Drupal\Core\Cache\Context\CacheContextsManager->optimizeTokens()\n
#8 web/core/lib/Drupal/Core/Cache/VariationCache.php(219): Drupal\Core\Cache\Context\CacheContextsManager->convertTokensToKeys()\n
#9 web/core/lib/Drupal/Core/Cache/VariationCache.php(57): Drupal\Core\Cache\VariationCache->createCacheId()\n
#10 web/core/lib/Drupal/Core/Session/AccessPolicyProcessor.php(137): Drupal\Core\Cache\VariationCache->set()\n
#11 web/core/lib/Drupal/Core/Session/PermissionsHashGenerator.php(126): Drupal\Core\Session\AccessPolicyProcessor->processAccessPolicies()\n
#12 web/core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php(53): Drupal\Core\Session\PermissionsHashGenerator->getCacheableMetadata()\n
#13 web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(189): Drupal\Core\Cache\Context\AccountPermissionsCacheContext->getCacheableMetadata()\n
#14 web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(115): Drupal\Core\Cache\Context\CacheContextsManager->optimizeTokens()\n
#15 web/core/lib/Drupal/Core/Cache/VariationCache.php(219): Drupal\Core\Cache\Context\CacheContextsManager->convertTokensToKeys()\n
#16 web/core/lib/Drupal/Core/Cache/VariationCache.php(57): Drupal\Core\Cache\VariationCache->createCacheId()\n
#17 web/core/lib/Drupal/Core/Session/AccessPolicyProcessor.php(137): Drupal\Core\Cache\VariationCache->set()\n
#18 web/core/lib/Drupal/Core/Session/PermissionsHashGenerator.php(126): Drupal\Core\Session\AccessPolicyProcessor->processAccessPolicies()\n
#19 web/core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php(53): Drupal\Core\Session\PermissionsHashGenerator->getCacheableMetadata()\n
#20 web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(189): Drupal\Core\Cache\Context\AccountPermissionsCacheContext->getCacheableMetadata()\n
#21 web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(115): Drupal\Core\Cache\Context\CacheContextsManager->optimizeTokens()\n
#22 web/core/lib/Drupal/Core/Cache/VariationCache.php(219): Drupal\Core\Cache\Context\CacheContextsManager->convertTokensToKeys()\n
#23 web/core/lib/Drupal/Core/Cache/VariationCache.php(57): Drupal\Core\Cache\VariationCache->createCacheId()\n
#24 web/core/lib/Drupal/Core/Session/AccessPolicyProcessor.php(137): Drupal\Core\Cache\VariationCache->set()\n
#25 web/core/lib/Drupal/Core/Session/PermissionChecker.php(23): Drupal\Core\Session\AccessPolicyProcessor->processAccessPolicies()\n
#26 web/core/lib/Drupal/Core/Session/UserSession.php(129): Drupal\Core\Session\PermissionChecker->hasPermission()\n
#27 web/core/lib/Drupal/Core/Session/AccountProxy.php(121): Drupal\Core\Session\UserSession->hasPermission()\n
#28 web/modules/contrib/webform/src/WebformHelpManager.php(1555): Drupal\Core\Session\AccountProxy->hasPermission()\n
#29 web/modules/contrib/webform/src/WebformHelpManager.php(146): Drupal\webform\WebformHelpManager->initHelp()\n
#30 [internal function]: Drupal\webform\WebformHelpManager->__construct()\n


#31 vendor/symfony/dependency-injection/ContainerBuilder.php(1140): ReflectionClass->newInstanceArgs()\n
#32 vendor/symfony/dependency-injection/ContainerBuilder.php(586): Symfony\Component\DependencyInjection\ContainerBuilder->createService()\n
#33 vendor/symfony/dependency-injection/ContainerBuilder.php(531): Symfony\Component\DependencyInjection\ContainerBuilder->doGet()\n
#34 vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(288): Symfony\Component\DependencyInjection\ContainerBuilder->get()\n
#35 vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(253): Drush\Runtime\LegacyServiceInstantiator->resolveFromContainer()\n
#36 [internal function]: Drush\Runtime\LegacyServiceInstantiator->resolveArgument()\n
#37 vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(223): array_map()\n
#38 vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(193): Drush\Runtime\LegacyServiceInstantiator->resolveArguments()\n
#39 vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(174): Drush\Runtime\LegacyServiceInstantiator->instantiateObject()\n
#40 vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(131): Drush\Runtime\LegacyServiceInstantiator->create()\n
#41 vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(60): Drush\Runtime\LegacyServiceInstantiator->instantiateServices()\n
#42 vendor/drush/drush/src/Boot/DrupalBoot8.php(257): Drush\Runtime\LegacyServiceInstantiator->loadServiceFiles()\n
#43 vendor/drush/drush/src/Boot/DrupalBoot8.php(233): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands()\n
#44 vendor/drush/drush/src/Boot/BootstrapManager.php(236): Drush\Boot\DrupalBoot8->bootstrapDrupalFull()\n
#45 vendor/drush/drush/src/Boot/BootstrapManager.php(377): Drush\Boot\BootstrapManager->doBootstrap()\n
#46 vendor/drush/drush/src/Boot/BootstrapManager.php(329): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex()\n
#47 vendor/drush/drush/src/Boot/BootstrapHook.php(36): Drush\Boot\BootstrapManager->bootstrapToPhase()\n
#48 vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(44): Drush\Boot\BootstrapHook->initialize()\n
#49 vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(36): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook()\n
#50 vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(29): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook()\n
#51 vendor/consolidation/annotated-command/src/CommandProcessor.php(145): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize()\n
#52 vendor/consolidation/annotated-command/src/AnnotatedCommand.php(376): Consolidation\AnnotatedCommand\CommandProcessor->initializeHook()\n
#53 vendor/symfony/console/Command/Command.php(292): Consolidation\AnnotatedCommand\AnnotatedCommand->initialize()\n
#54 vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run()\n
#55 vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()\n
#56 vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()\n
#57 vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()\n
#58 vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()\n
#59 vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run()\n
#60 vendor/drush/drush/drush(4): require('...')\n
#61 vendor/bin/drush(119): include('...')\n
#62 {main}
"""
🇩🇪Germany geek-merlin Freiburg, Germany

Ah, i see, the testUnsupportedOperation test is still red. Know how to fix this, but this needs a thorough code comment. Freaky 3-state semantics again...

🇩🇪Germany geek-merlin Freiburg, Germany

Ups, merge error? The MR seems to be onto 7.x? I guess this issue was re-purposed 7 / 8. Or whatever.

🇩🇪Germany geek-merlin Freiburg, Germany

- Added MR with the simplified code to review and test.
- Verified that the patch applies and fixes the issue for me.

🇩🇪Germany geek-merlin Freiburg, Germany

Ran into this when a wrong translation made it into prod. Setting critical as of data loss. (If s.o. bikesheds it to major, i won't argue.)

Notes:
- Code concerning Drupal 6 i not needed anymore.
- Which obsoletes #23.
- #27 is obviously a different bug. Please file it as such.

🇩🇪Germany geek-merlin Freiburg, Germany

Added MR with one commit that adds a language key to the static cache.

It fixes the issue for me and proves that this low-level approach fixes the described behavioral issue.

The proper fix is of course a memory cache backend that handles invalidation too.

🇩🇪Germany geek-merlin Freiburg, Germany

Further analysis shows this must be tackled in this AND the other issue.

🇩🇪Germany geek-merlin Freiburg, Germany

It looks like the related issue brings the fix.

🇩🇪Germany geek-merlin Freiburg, Germany

geek-merlin created an issue.

🇩🇪Germany geek-merlin Freiburg, Germany

Also adding a branch combining this with Make 'folder' option multiple RTBC . Can be ignored for the sake of this issue.

🇩🇪Germany geek-merlin Freiburg, Germany

Assuming that potx is still in l.d.o legacy mode according to #3344899-3: Offering to co-maintain Translation template extractor .

So being super conservitive about the API for now, which should also make the patch trivial to review.
Added hooks for _potx_explore_dir, _potx_process_file, potx_finish_processing, with exactly same signatures.
Which should be enough-for-everyone (tm).

🇩🇪Germany geek-merlin Freiburg, Germany

Good idea, but unfortunately:

> Note: GLOB_BRACE is not available on some non GNU systems, like Solaris or Alpine Linux.

https://www.php.net/manual/en/function.glob.php

🇩🇪Germany geek-merlin Freiburg, Germany

Patch applies cleanly to HEAD and does what it announces.

🇩🇪Germany geek-merlin Freiburg, Germany

FTR: If this causes regressions, i guess the #states voodoo needs to care for #required too.

Production build 0.71.5 2024