4

I have installed civicrm with drupal8 and I am trying to implement behat in my site. When I am trying to test my site for as logged in user using behat feature file I am getting an notice Notice: Undefined index: q in /var/www/html/drupal8aritnew/libraries/civicrm/CRM/Utils/System/DrupalBase.php line 487 (Drupal\Core\Entity\EntityStorageException).

Below is the debug backtrace output:

0 CRM_Utils_System_DrupalBase->postURL() called at [/var/www/html/drupal8aritnew/libraries/civicrm/CRM/Utils/System.php:502]

  │ #1  CRM_Utils_System::postURL() called at [/var/www/html/drupal8aritnew/libraries/civicrm/packages/HTML/QuickForm.php:289]
  │ #2  HTML_QuickForm->HTML_QuickForm() called at [/var/www/html/drupal8aritnew/libraries/civicrm/packages/HTML/QuickForm/Page.php:71]
  │ #3  HTML_QuickForm_Page->HTML_QuickForm_Page() called at [/var/www/html/drupal8aritnew/libraries/civicrm/CRM/Core/Form.php:214]
  │ #4  CRM_Core_Form->__construct() called at [/var/www/html/drupal8aritnew/libraries/civicrm/CRM/Core/Controller.php:459]
  │ #5  CRM_Core_Controller->addPages() called at [/var/www/html/drupal8aritnew/libraries/civicrm/CRM/Core/Controller/Simple.php:81]
  │ #6  CRM_Core_Controller_Simple->__construct() called at [/var/www/html/drupal8aritnew/libraries/civicrm/CRM/Core/BAO/UFGroup.php:794]
  │ #7  CRM_Core_BAO_UFGroup::getEditHTML() called at [/var/www/html/drupal8aritnew/modules/civicrm/civicrm.user.inc:29]
  │ #8  civicrm_user_insert()
  │ #9  call_user_func_array() called at [/var/www/html/drupal8aritnew/core/lib/Drupal/Core/Extension/ModuleHandler.php:394]
  │ #10 Drupal\Core\Extension\ModuleHandler->invokeAll() called at [/var/www/html/drupal8aritnew/core/lib/Drupal/Core/Entity/EntityStorageBase.php:172]
  │ #11 Drupal\Core\Entity\EntityStorageBase->invokeHook() called at [/var/www/html/drupal8aritnew/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php:385]
  │ #12 Drupal\Core\Entity\ContentEntityStorageBase->invokeHook() called at [/var/www/html/drupal8aritnew/core/lib/Drupal/Core/Entity/EntityStorageBase.php:469]
  │ #13 Drupal\Core\Entity\EntityStorageBase->doPostSave() called at [/var/www/html/drupal8aritnew/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php:271]
  │ #14 Drupal\Core\Entity\ContentEntityStorageBase->doPostSave() called at [/var/www/html/drupal8aritnew/core/lib/Drupal/Core/Entity/EntityStorageBase.php:394]
  │ #15 Drupal\Core\Entity\EntityStorageBase->save() called at [/var/www/html/drupal8aritnew/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:746]
  │ #16 Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() called at [/var/www/html/drupal8aritnew/core/lib/Drupal/Core/Entity/Entity.php:340]
  │ #17 Drupal\Core\Entity\Entity->save() called at [/var/www/html/drupal8aritnew/vendor/drupal/drupal-driver/src/Drupal/Driver/Cores/Drupal8.php:108]
  │ #18 Drupal\Driver\Cores\Drupal8->userCreate() called at [/var/www/html/drupal8aritnew/vendor/drupal/drupal-driver/src/Drupal/Driver/DrupalDriver.php:102]
  │ #19 Drupal\Driver\DrupalDriver->userCreate() called at [/var/www/html/drupal8aritnew/vendor/drupal/drupal-extension/src/Drupal/DrupalExtension/Context/RawDrupalContext.php:363]
  │ #20 Drupal\DrupalExtension\Context\RawDrupalContext->userCreate() called at [/var/www/html/drupal8aritnew/vendor/drupal/drupal-extension/src/Drupal/DrupalExtension/Context/DrupalContext.php:52]
  │ #21 Drupal\DrupalExtension\Context\DrupalContext->assertAuthenticatedByRole()
  │ #22 call_user_func_array() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/Call/Handler/RuntimeCallHandler.php:99]
  │ #23 Behat\Testwork\Call\Handler\RuntimeCallHandler->executeCall() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/Call/Handler/RuntimeCallHandler.php:54]
  │ #24 Behat\Testwork\Call\Handler\RuntimeCallHandler->handleCall() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/Call/CallCenter.php:125]
  │ #25 Behat\Testwork\Call\CallCenter->handleCall() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/Call/CallCenter.php:80]
  │ #26 Behat\Testwork\Call\CallCenter->makeCall() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeStepTester.php:125]
  │ #27 Behat\Behat\Tester\Runtime\RuntimeStepTester->testDefinition() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeStepTester.php:73]
  │ #28 Behat\Behat\Tester\Runtime\RuntimeStepTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableStepTester.php:74]
  │ #29 Behat\Behat\Hook\Tester\HookableStepTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingStepTester.php:73]
  │ #30 Behat\Behat\EventDispatcher\Tester\EventDispatchingStepTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Behat/Tester/StepContainerTester.php:59]
  │ #31 Behat\Behat\Tester\StepContainerTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeScenarioTester.php:76]
  │ #32 Behat\Behat\Tester\Runtime\RuntimeScenarioTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableScenarioTester.php:74]
  │ #33 Behat\Behat\Hook\Tester\HookableScenarioTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingScenarioTester.php:103]
  │ #34 Behat\Behat\EventDispatcher\Tester\EventDispatchingScenarioTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeFeatureTester.php:83]
  │ #35 Behat\Behat\Tester\Runtime\RuntimeFeatureTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableFeatureTester.php:72]
  │ #36 Behat\Behat\Hook\Tester\HookableFeatureTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingFeatureTester.php:71]
  │ #37 Behat\Behat\EventDispatcher\Tester\EventDispatchingFeatureTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/Tester/Runtime/RuntimeSuiteTester.php:63]
  │ #38 Behat\Testwork\Tester\Runtime\RuntimeSuiteTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/Hook/Tester/HookableSuiteTester.php:73]
  │ #39 Behat\Testwork\Hook\Tester\HookableSuiteTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/EventDispatcher/Tester/EventDispatchingSuiteTester.php:72]
  │ #40 Behat\Testwork\EventDispatcher\Tester\EventDispatchingSuiteTester->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/Tester/Runtime/RuntimeExercise.php:71]
  │ #41 Behat\Testwork\Tester\Runtime\RuntimeExercise->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/EventDispatcher/Tester/EventDispatchingExercise.php:70]
  │ #42 Behat\Testwork\EventDispatcher\Tester\EventDispatchingExercise->test() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/Tester/Cli/ExerciseController.php:146]
  │ #43 Behat\Testwork\Tester\Cli\ExerciseController->testSpecifications() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/Tester/Cli/ExerciseController.php:108]
  │ #44 Behat\Testwork\Tester\Cli\ExerciseController->execute() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/Cli/Command.php:63]
  │ #45 Behat\Testwork\Cli\Command->execute() called at [/var/www/html/drupal8aritnew/vendor/symfony/console/Command/Command.php:259]
  │ #46 Symfony\Component\Console\Command\Command->run() called at [/var/www/html/drupal8aritnew/vendor/symfony/console/Application.php:878]
  │ #47 Symfony\Component\Console\Application->doRunCommand() called at [/var/www/html/drupal8aritnew/vendor/symfony/console/Application.php:195]
  │ #48 Symfony\Component\Console\Application->doRun() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/src/Behat/Testwork/Cli/Application.php:102]
  │ #49 Behat\Testwork\Cli\Application->doRun() called at [/var/www/html/drupal8aritnew/vendor/symfony/console/Application.php:126]
  │ #50 Symfony\Component\Console\Application->run() called at [/var/www/html/drupal8aritnew/vendor/behat/behat/bin/behat:31]

Can anyone help me understanding what I am doing wrong?

1

It would help to know which version of D8 you tried with. The readme says "It it currently verified to work against Drupal 8 beta 14 and CiviCRM 4.7"

I am not clear if your issue is purely with Behat.

We have not had a chance yet to find the bugs that might have been introduced with Drupal 8 rc1.

If you can help progress this please do report back. If you can help fund the ongoing work of getting CiviCRM working with Drupal 8 then please consider donating via this MIH.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.