On D9.4.9: when require_login is enabled, the /cron/{key} url can no longer be reached when logged out, even when "/cron/*" is added to the "request path" section of the module settings. This page is not a node but seems to be tested by the 'NodeIsSticky' class, throwing an error.
Error log:
2022-12-31T09:54:54.602177558Z 2022/12/31 09:54:54 [error] 8#8: *2161 FastCGI sent in stderr: "PHP message: TypeError: Drupal\rules\Plugin\Condition\NodeIsSticky::doEvaluate(): Argument #1 ($node) must be of type Drupal\node\NodeInterface, null given in /usr/share/nginx/html/modules/contrib/rules/src/Plugin/Condition/NodeIsSticky.php on line 37 #0 [internal function]: Drupal\rules\Plugin\Condition\NodeIsSticky->doEvaluate(NULL)
2022-12-31T09:54:54.602275373Z #1 /usr/share/nginx/html/modules/contrib/rules/src/Core/RulesConditionBase.php(70): call_user_func_array(Array, Array)
2022-12-31T09:54:54.602285993Z #2 /usr/share/nginx/html/core/lib/Drupal/Core/Condition/ConditionManager.php(77): Drupal\rules\Core\RulesConditionBase->evaluate()
2022-12-31T09:54:54.602294033Z #3 /usr/share/nginx/html/core/lib/Drupal/Core/Condition/ConditionPluginBase.php(84): Drupal\Core\Condition\ConditionManager->execute(Object(Drupal\rules\Plugin\Condition\NodeIsSticky))
2022-12-31T09:54:54.602329370Z #4 /usr/share/nginx/html/core/lib/Drupal/Core/Condition/ConditionAccessResolverTrait.php(26): Drupal\Core\Condition\ConditionPluginBase->execute()
2022-12-31T09:54:54.602337783Z #5 /usr/share/nginx/html/modules/contrib/require_login/src/LoginRequirementsManager.php(178): Drupal\require_login\LoginRequirementsManager->resolveConditions(Array, 'and')
2022-12-31T09:54:54.602345841Z #6 /usr/share/nginx/html/modules/contrib/require_login/src/EventSubscriber/LoginEventSubscriber.php(66): Drupal\require_login\LoginRequirementsManager->evaluate()
2022-12-31T09:54:54.602353661Z #7 [internal function]: Drupal\require_login\EventSubscriber\LoginEventSubscriber->onRequestRedirect(Object(Symfony\Component\HttpKernel\Event\RequestEvent), 'kernel.request', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
2022-12-31T09:54:54.602362594Z #8 /usr/share/nginx/html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\RequestEvent), 'kernel.request', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
2022-12-31T09:54:54.602371490Z #9 /usr/share/nginx/html/vendor/symfony/http-kernel/HttpKernel.php(145): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\RequestEvent), '
1. Enable require_login
2. add /cron/* to the "request path" section of the module settings
3. using curl go to the cron url specified on /admin/config/system/cron
Do a check if the url is a node, if not do not try to test if it is sticky or not.
Closed: works as designed
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.