Three of Scheduler's test involving Rules Integration fail at core 8.7 but are OK and 8.8 and 8.9. The initial message is:
Behat\Mink\Exception\DriverException: There is no element matching XPath "//html"
but running the tests locally with html output shows that fault is caused by:
Drupal\Core\Entity\EntityStorageException: SQLSTATE[21S01]: Insert value list does not match column list:
1136 Column count doesn't match value count at row 1: INSERT INTO {cache_rules} (cid, expire, created, tags, checksum, data, serialized) VALUES () ON DUPLICATE KEY UPDATE cid = VALUES(cid), expire = VALUES(expire), created = VALUES(created), tags = VALUES(tags), checksum = VALUES(checksum), data = VALUES(data), serialized = VALUES(serialized); Array ( )
in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()
(line 847 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
The failures started on 11th Jan 14:00 on Travis daily testing, which is using the latest Rules -dev version. So something commited to Rules between 10th Jan 14:00 and 11th Jan 14:00 has caused the problem.
Comments
Comment #2
jonathan1055 commentedThe same error happens in manual testing, when editing a node which would satisfy a scheduler condition. I have been able to find the commit in Rules which caused this - #3105760-4: Empty Rules are firing
Using a local Rules branch created by
git checkout 231324d5d32a9521d02627d3cfb84f5a913844e1the Scheduler conditions work fine and the node can be edited and saved. However, at the next commit, on a branchgit checkout b6c0b38b5408484697b20228dfec80cf09c87eb1we get the cache failure as above. It looks likes the values passed to the SQL query are emptyVALUES ()I have not found a solution yet, so I don't know if the fix will be in Rules or Scheduler.
Comment #3
jonathan1055 commentedI have investigated the problem with Rules and have a patch on #3105760-8: Empty Rules are firing
Using this patch in Travis the tests now pass at Core 8.7 https://travis-ci.org/jonathan1055/scheduler/builds/640990002
Comment #4
asomnia commentedI confirm this problem too.
Drupal core 8.7.10
Use Scheduler Rules, Scheduler, Rules, Webform
First time met error during filling webform. After disabling Scheduler Rules, Scheduler became better, but then the same error.
Users cannot use webform, every time get an error
Comment #5
jonathan1055 commentedHi asomnia,
I have tracked down the error in Rules code, and it will be fixed in #3108494: Exception when updating cache with empty data. I expect that TR the Rules maintainer will commit that patch fairly soon, but if you would like to try that patch, and tell us how you get on, that would be appreciated.
Jonathan
Comment #6
asomnia commentedHi Jonathan!
i've patch, got 502 error with message
ArgumentCountError: Too few arguments to function Drupal\rules\Core\RulesEventManager::__construct(), 1 passed in /var/www/html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 269 and exactly 2 expected in Drupal\rules\Core\RulesEventManager->__construct() (line 49 of /var/www/html/modules/contrib/rules/src/Core/RulesEventManager.php) #0 /var/www/html/core/lib/Drupal/Component/DependencyInjection/Container.php(269): Drupal\rules\Core\RulesEventManager->__construct(Object(Drupal\Core\Extension\ModuleHandler)) #1 /var/www/html/core/lib/Drupal/Component/DependencyInjection/Container.php(173): Drupal\Component\DependencyInjection\Container->createService(Array, 'plugin.manager....') #2 /var/www/html/core/lib/Drupal/Component/DependencyInjection/Container.php(487): Drupal\Component\DependencyInjection\Container->get('plugin.manager....', 1) #3 /var/www/html/core/lib/Drupal/Component/DependencyInjection/Container.php(237): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) #4 /var/www/html/core/lib/Drupal/Component/DependencyInjection/Container.php(173): Drupal\Component\DependencyInjection\Container->createService(Array, 'rules.event_sub...') #5 /var/www/html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(105): Drupal\Component\DependencyInjection\Container->get('rules.event_sub...') #6 /var/www/html/modules/contrib/rules/rules.module(167): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('rules_entity_in...', Object(Drupal\rules\Event\EntityEvent)) #7 [internal function]: rules_entity_insert(Object(Drupal\user\Entity\User)) #8 /var/www/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(403): call_user_func_array('rules_entity_in...', Array) #9 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(206): Drupal\Core\Extension\ModuleHandler->invokeAll('entity_insert', Array) #10 /var/www/html/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(835): Drupal\Core\Entity\EntityStorageBase->invokeHook('insert', Object(Drupal\user\Entity\User)) #11 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(535): Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('insert', Object(Drupal\user\Entity\User)) #12 /var/www/html/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(720): Drupal\Core\Entity\EntityStorageBase->doPostSave(Object(Drupal\user\Entity\User), false) #13 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(460): Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object(Drupal\user\Entity\User), false) #14 /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(838): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\user\Entity\User)) #15 /var/www/html/core/lib/Drupal/Core/Entity/EntityBase.php(394): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object(Drupal\user\Entity\User)) #16 /var/www/html/sites/default/modules/webform_handler_user_creation/src/Plugin/WebformHandler/UserCreationHandler.php(63): Drupal\Core\Entity\EntityBase->save() #17 /var/www/html/modules/contrib/webform/src/Entity/Webform.php(2530): Drupal\webform_handler_user_creation\Plugin\WebformHandler\UserCreationHandler->postSave(Object(Drupal\webform\Entity\WebformSubmission), false, NULL) #18 /var/www/html/modules/contrib/webform/src/WebformSubmissionStorage.php(1198): Drupal\webform\Entity\Webform->invokeHandlers('postSave', Object(Drupal\webform\Entity\WebformSubmission), false, NULL) #19 /var/www/html/modules/contrib/webform/src/WebformSubmissionStorage.php(1110): Drupal\webform\WebformSubmissionStorage->invokeWebformHandlers('postSave', Object(Drupal\webform\Entity\WebformSubmission), false) #20 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(460): Drupal\webform\WebformSubmissionStorage->doPostSave(Object(Drupal\webform\Entity\WebformSubmission), false) #21 /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(838): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\webform\Entity\WebformSubmission)) #22 /var/www/html/core/lib/Drupal/Core/Entity/EntityBase.php(394): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object(Drupal\webform\Entity\WebformSubmission)) #23 /var/www/html/modules/contrib/webform/src/Entity/WebformSubmission.php(843): Drupal\Core\Entity\EntityBase->save() #24 /var/www/html/modules/contrib/webform/src/WebformSubmissionForm.php(1831): Drupal\webform\Entity\WebformSubmission->save() #25 [internal function]: Drupal\webform\WebformSubmissionForm->save(Array, Object(Drupal\Core\Form\FormState)) #26 /var/www/html/core/lib/Drupal/Core/Form/FormSubmitter.php(111): call_user_func_array(Array, Array) #27 /var/www/html/core/lib/Drupal/Core/Form/FormSubmitter.php(51): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState)) #28 /var/www/html/core/lib/Drupal/Core/Form/FormBuilder.php(590): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState)) #29 /var/www/html/core/lib/Drupal/Core/Form/FormBuilder.php(319): Drupal\Core\Form\FormBuilder->processForm('webform_submiss...', Array, Object(Drupal\Core\Form\FormState)) #30 /var/www/html/core/lib/Drupal/Core/Entity/EntityFormBuilder.php(61): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\webform\WebformSubmissionForm), Object(Drupal\Core\Form\FormState)) #31 /var/www/html/modules/contrib/webform/src/Entity/Webform.php(1174): Drupal\Core\Entity\EntityFormBuilder->getForm(Object(Drupal\webform\Entity\WebformSubmission), 'test') #32 /var/www/html/modules/contrib/webform/src/Controller/WebformTestController.php(129): Drupal\webform\Entity\Webform->getSubmissionForm(Array, 'test') #33 [internal function]: Drupal\webform\Controller\WebformTestController->testForm(Object(Symfony\Component\HttpFoundation\Request)) #34 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #35 /var/www/html/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #36 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #37 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #38 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #39 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #40 /var/www/html/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #41 /var/www/html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #42 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #43 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #44 /var/www/html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #45 /var/www/html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #46 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #47 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #48 /var/www/html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #49 {main}.if it helps somehow...
Comment #7
jonathan1055 commentedHi asomnia,

Your previous comment is not showing in this thread, even though the revision history says you wrote a comment on 26 Jan - see attached.
This is an odd problem, and probably nothing to do with how you submitted it. Could you add it again here, please?
Jonathan
[edit: This is comment #7, the one above is #5. So comment #6 does exist somewhere but is hidden]
Comment #8
avpadernoI republished the comment, which was detect as spam (a false positive).
Comment #9
jonathan1055 commentedThanks @kiamlaluno for checking and publishing the comment.
Rules issue #3108494: Exception when updating cache with empty data has been committed, so if using Rules -dev release it should all be OK now.