CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Drupal 8 Buildkit Sadness
Pages: [1] 2

Author Topic: Drupal 8 Buildkit Sadness  (Read 1457 times)

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Drupal 8 Buildkit Sadness
March 06, 2016, 07:43:07 am
Hi,

(With buildkit)

1) You can only install Drupal 8 with CiviCRM Master as there is no branch in https://github.com/civicrm/civicrm-drupal for 8.x-4.6

2) When running it with master I got the following error:

./buildkit/bin/civibuild create "d8" --admin-pass "password" --civi-ver "master" --type "drupal8-demo" url "http://d8" --force

// ...

++ drush site-install -y --db-url=mysql://d8cms_88h0q:fZFRPBhjPThnn4cq@127.0.0.1:3306/d8cms_88h0q --account-name=admin --account-pass=password --account-mail=admin@example.com --site-name=d8 --sites-subdir=default
Drush 7.0-dev does not support Drupal . See http://drupal.org/project/drush for more information.                                                                                                                                                                   [error]
PHP Fatal error:  Call to undefined function conf_path() in /home/john/buildkit/vendor/drush/drush/includes/bootstrap.inc on line 789
PHP Stack trace:
PHP   1. {main}() /home/john/buildkit/vendor/drush/drush/drush.php:0
PHP   2. drush_main() /home/john/buildkit/vendor/drush/drush/drush.php:16
PHP   3. _drush_bootstrap_and_dispatch() /home/john/buildkit/vendor/drush/drush/drush.php:61
PHP   4. drush_bootstrap_to_phase() /home/john/buildkit/vendor/drush/drush/drush.php:78
PHP   5. drush_bootstrap_validate() /home/john/buildkit/vendor/drush/drush/includes/bootstrap.inc:306
PHP   6. _drush_bootstrap_drupal_site_validate() /home/john/buildkit/vendor/drush/drush/includes/bootstrap.inc:267
Drush command terminated abnormally due to an unrecoverable error.
Error: Call to undefined function conf_path() in /home/john/buildkit/vendor/drush/drush/includes/bootstrap.inc, line 789
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Drupal 8 Buildkit Sadness
March 06, 2016, 03:23:52 pm
Piece missing from the installation instructions - where can I add them?

I had to change my CiviCRM settings file to include the following line:

define( 'CIVICRM_UF'        , 'Drupal8');

As %%cms%% doesn't evaluate to anything, so you get the world's least helpful error :P
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Drupal 8 Buildkit Sadness
March 06, 2016, 03:28:38 pm
Oh, and you need to clear the cache before it appears in the menu...
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Drupal 8 Buildkit Sadness
March 06, 2016, 03:35:16 pm
The website encountered an unexpected error. Please try again later.
Recoverable fatal error: Argument 1 passed to Drupal\civicrm\CivicrmPageState::addCSS() must be of the type array, string given, called in /var/www/html/drupal8/libraries/civicrm/CRM/Utils/System/Drupal8.php on line 264 and defined in Drupal\civicrm\CivicrmPageState->addCSS() (line 21 of modules/civicrm/src/CivicrmPageState.php).

Drupal\civicrm\CivicrmPageState->addCSS('libraries/civicrm/bower_components/jquery-ui/themes/smoothness/jquery-ui.min.css', Array) (Line: 264)
CRM_Utils_System_Drupal8->addStyleUrl('/libraries/civicrm/bower_components/jquery-ui/themes/smoothness/jquery-ui.min.css?r=hrCWE', 'html-header') (Line: 209)
CRM_Core_Region->render('') (Line: 64)
Drupal\civicrm\Controller\CivicrmController->main(Array, '', '', '', '', '')
call_user_func_array(Array, Array) (Line: 128)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 577)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 129)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 102)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 139)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 62)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 103)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 55)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 637)
Drupal\Core\DrupalKernel->handle(Object) (Line: 25)
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Drupal 8 Buildkit Sadness
March 06, 2016, 03:48:45 pm
Got past that last one by popping the string in an array. Now:

Warning: Illegal string offset '#type' in Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processHtmlHead() (line 381 of core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php).

Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processHtmlHead(Array) (Line: 205)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments(Object) (Line: 50)
Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond(Object, 'kernel.response', Object) (Line: 116)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.response', Object) (Line: 179)
Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 161)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 62)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 103)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 55)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 637)
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Drupal 8 Buildkit Sadness
March 06, 2016, 04:18:16 pm
Ah. Updating to the latest version fixed the errors :D - lesson there, Drupal 8 is only for 4.7.latest
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Drupal 8 Buildkit Sadness
March 06, 2016, 04:30:07 pm
Seems that any 4.6 extension that uses civicrm_setting table directly will need to update :/
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: Drupal 8 Buildkit Sadness
March 06, 2016, 04:36:17 pm
I also was pretty confused about the CMS UF issue, so I sent a PR for the README:
https://github.com/civicrm/civicrm-drupal/pull/359
https://issues.civicrm.org/jira/browse/CRM-18171

The API handles settings pretty well (:

Thanks for documenting your progress! It motivated me to work on D8 as well.
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Drupal 8 Buildkit Sadness
March 07, 2016, 03:56:51 pm
Extensions that use cj for javascript don't appear to work. From the console: "Uncaught ReferenceError: cj is not defined"
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: Drupal 8 Buildkit Sadness
March 07, 2016, 05:14:57 pm
cj was quietly deprecated around civicrm 4.5, replaced by CRM.$()

https://wiki.civicrm.org/confluence/display/CRMDOC/Javascript+Reference
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Drupal 8 Buildkit Sadness
March 08, 2016, 04:58:13 pm
Sure, but it always worked with a nice message until now.

Do you know if extensions on 4.4 installs will work with CRM.$
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: Drupal 8 Buildkit Sadness
March 09, 2016, 08:57:19 am
CRM.$ was not backported to 4.4 (if I recall correctly, there was a lot of JS cleanup in 4.5).
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Drupal 8 Buildkit Sadness
March 09, 2016, 04:54:55 pm
Can't install modules on vanilla Drupal 8 with Civi installed:

 Fatal error: Call to undefined method Symfony\Component\DependencyInjection\Definition::setFactory() in /var/www/html/drupal8/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php on line 190

Call Stack
#   Time   Memory   Function   Location
1   0.0000   243120   {main}( )   ../index.php:0
2   0.0007   582024   Drupal\Core\DrupalKernel->handle( )   ../index.php:25
3   0.0039   1544096   Stack\StackedHttpKernel->handle( )   ../DrupalKernel.php:637
4   0.0039   1544208   Drupal\Core\StackMiddleware\NegotiationMiddleware->handle( )   ../StackedHttpKernel.php:23
5   0.0040   1544680   Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle( )   ../NegotiationMiddleware.php:55
6   0.0040   1545112   Drupal\page_cache\StackMiddleware\PageCache->handle( )   ../ReverseProxyMiddleware.php:51
7   0.0040   1545616   Drupal\page_cache\StackMiddleware\PageCache->pass( )   ../PageCache.php:82
8   0.0040   1545696   Drupal\Core\StackMiddleware\KernelPreHandle->handle( )   ../PageCache.php:103
9   0.0056   1792944   Drupal\Core\StackMiddleware\Session->handle( )   ../KernelPreHandle.php:53
10   0.0076   1951264   Symfony\Component\HttpKernel\HttpKernel->handle( )   ../Session.php:62
11   0.0076   1952120   Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   ../HttpKernel.php:62
12   0.0227   4653376   call_user_func_array:{/var/www/html/drupal8/vendor/symfony/http-kernel/HttpKernel.php:139} ( )   ../HttpKernel.php:139
13   0.0227   4653576   Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}( )   ../HttpKernel.php:139
14   0.0227   4653824   Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext( )   ../EarlyRenderingControllerWrapperSubscriber.php:102
15   0.0227   4665808   Drupal\Core\Render\Renderer->executeInRenderContext( )   ../EarlyRenderingControllerWrapperSubscriber.php:129
16   0.0227   4666256   Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}( )   ../Renderer.php:577
17   0.0227   4666304   call_user_func_array:{/var/www/html/drupal8/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:128} ( )   ../EarlyRenderingControllerWrapperSubscriber.php:128
18   0.0227   4667024   Drupal\Core\Controller\FormController->getContentResult( )   ../EarlyRenderingControllerWrapperSubscriber.php:128
19   0.0233   4853224   Drupal\Core\Form\FormBuilder->buildForm( )   ../FormController.php:79
20   0.4892   13112136   Drupal\Core\Form\FormBuilder->processForm( )   ../FormBuilder.php:319
21   0.5290   15356848   Drupal\Core\Form\FormSubmitter->doSubmitForm( )   ../FormBuilder.php:588
22   0.5290   15356960   Drupal\Core\Form\FormSubmitter->executeSubmitHandlers( )   ../FormSubmitter.php:56
23   0.5290   15358352   call_user_func_array:{/var/www/html/drupal8/core/lib/Drupal/Core/Form/FormSubmitter.php:116} ( )   ../FormSubmitter.php:116
24   0.5290   15358744   Drupal\system\Form\ModulesListForm->submitForm( )   ../FormSubmitter.php:116
25   0.5295   15402416   Drupal\Core\ProxyClass\Extension\ModuleInstaller->install( )   ../ModulesListForm.php:445
26   0.5306   15663072   Drupal\Core\Extension\ModuleInstaller->install( )   ../ModuleInstaller.php:87
27   0.7153   16104400   Drupal\Core\Extension\ModuleInstaller->updateKernel( )   ../ModuleInstaller.php:196
28   0.7153   16104504   Drupal\Core\DrupalKernel->updateModules( )   ../ModuleInstaller.php:525
29   0.7153   16110072   Drupal\Core\DrupalKernel->initializeContainer( )   ../DrupalKernel.php:757
30   0.7645   16112608   Drupal\Core\DrupalKernel->compileContainer( )   ../DrupalKernel.php:824
31   0.7743   16667280   Drupal\Core\DependencyInjection\YamlFileLoader->load( )   ../DrupalKernel.php:1171
32   0.8762   17312112   Drupal\Core\DependencyInjection\YamlFileLoader->parseDefinitions( )   ../YamlFileLoader.php:100
33   0.8771   17429488   Drupal\Core\DependencyInjection\YamlFileLoader->parseDefinition( )   ../YamlFileLoader.php:120
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: Drupal 8 Buildkit Sadness
March 09, 2016, 05:32:46 pm
Seems like these issues:
https://issues.civicrm.org/jira/browse/CRM-17652
https://issues.civicrm.org/jira/browse/CRM-17041

View all D8 issues:
https://issues.civicrm.org/jira/issues/?jql=labels%20%3D%20drupal8

Weirdly I haven't run into these issues, but I installed CiviCRM in the "modules" directory. I have no idea if that makes a difference. (in order to install in modules, I had to patch the civicrm.install requirements to look in modules, not libraries).
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Drupal 8 Buildkit Sadness
March 10, 2016, 07:21:15 pm
Great job mathieu. Not tried it yet - did you submit a PR?
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Drupal 8 Buildkit Sadness

This forum was archived on 2017-11-26.