Drupal issueshttps://lab.civicrm.org/dev/drupal/-/issues2019-01-08T14:53:17Zhttps://lab.civicrm.org/dev/drupal/-/issues/36Unfork zetacomponents/mail (also helps Drupal8)2019-01-08T14:53:17ZbgmUnfork zetacomponents/mail (also helps Drupal8)zetacomponents/mail was [forked](https://github.com/civicrm/zetacomponents-mail/tree/1.7-civi) in early 2017 for PHP 7 compatibility. However, the base branch has had updates since which fix the PHP issues, and also add a new features fo...zetacomponents/mail was [forked](https://github.com/civicrm/zetacomponents-mail/tree/1.7-civi) in early 2017 for PHP 7 compatibility. However, the base branch has had updates since which fix the PHP issues, and also add a new features for STARTTLS that might be interesting (and solves issues such as: https://github.com/civicrm/zetacomponents-mail/pull/2)
I encounted this issue while playing around with composer and Drupal8 from scratch:
```
$ composer create-project drupal-composer/drupal-project:8.x-dev myproject --stability dev --no-interaction
$ cd myproject
$ composer require civicrm/civicrm-core:5.7.2 --prefer-dist
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for civicrm/civicrm-core 5.7.2 -> satisfiable by civicrm/civicrm-core[5.7.2].
- civicrm/civicrm-core 5.7.2 requires zetacomponents/mail dev-1.7-civi -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
[...]
```
This can be fixed by specifying the URL of CiviCRM's fork, but eh, if we can remove it, why not?
cc @jackrabbithanna @dsnopekhttps://lab.civicrm.org/dev/drupal/-/issues/43Drupal8: composer requires psr/log ~1.0.0, incompatible with psr/log 1.1.02019-01-09T02:48:58ZJonGoldDrupal8: composer requires psr/log ~1.0.0, incompatible with psr/log 1.1.0I found this issue reported on Stack Exchange: https://civicrm.stackexchange.com/q/27832/12
`civicrm-core` and `civicrm-cxn-rpc` both specify a dependency on `psr/log ~1.0.0`. `psr/log` version 1.1 came out last month, and apparently s...I found this issue reported on Stack Exchange: https://civicrm.stackexchange.com/q/27832/12
`civicrm-core` and `civicrm-cxn-rpc` both specify a dependency on `psr/log ~1.0.0`. `psr/log` version 1.1 came out last month, and apparently some Drupal-related package already requires it.
There are only three commits' difference between 1.0.2 and 1.1.0, and one is in the README. I'm not a PSR-3 expert, but my sense is that we can change our composer dependencies to support the newer version.https://lab.civicrm.org/dev/drupal/-/issues/93Create access role for importing memberships2019-11-04T08:53:10ZedvanleeuwenCreate access role for importing membershipsAt the moment, there is an access role to import contacts, but not for memberships. The latter shows up in the menu of users who are not allowed to import contacts.
It would be better to have a separate role for this or to attach this a...At the moment, there is an access role to import contacts, but not for memberships. The latter shows up in the menu of users who are not allowed to import contacts.
It would be better to have a separate role for this or to attach this access to the contact import role.https://lab.civicrm.org/dev/drupal/-/issues/33Implement userFrameworkFrontend Configuration for Drupal2019-11-24T05:41:04ZseamusleeImplement userFrameworkFrontend Configuration for DrupalThis is to support the concept of Separate frontend and backend themesThis is to support the concept of Separate frontend and backend themes5.16.0https://lab.civicrm.org/dev/drupal/-/issues/2Implement D8 initialization for civicrm-setup2020-07-16T17:23:36ZtottenImplement D8 initialization for civicrm-setup__Background__: When installing on Drupal 8, settings such as DSN and locale should be autodetected.
__Task__:
* Copy `plugins/init/Drupal.civi-setup.php` or `plugins/init/WordPress.civi-setup.php`
* Create `Drupal8.civi-setup.php`
* A...__Background__: When installing on Drupal 8, settings such as DSN and locale should be autodetected.
__Task__:
* Copy `plugins/init/Drupal.civi-setup.php` or `plugins/init/WordPress.civi-setup.php`
* Create `Drupal8.civi-setup.php`
* Adapt for D8. For source material on how to detect things like DSN, look at `civicrm-drupal@8.x-master` in `civicrm.install` / `drush.civicrm.inc`.D8 General AvailabilityMonish DebMonish Debhttps://lab.civicrm.org/dev/drupal/-/issues/5Add support for Drupal 8 to cv (`Bootstrap.php` and `CmsBootstrap.php`)2020-07-16T17:23:37ZtottenAdd support for Drupal 8 to cv (`Bootstrap.php` and `CmsBootstrap.php`)D8 General Availabilitytottentottenhttps://lab.civicrm.org/dev/drupal/-/issues/6Migrate 8.x branches to separate git repo2020-07-16T17:23:37ZtottenMigrate 8.x branches to separate git repo__Background__: The `civicrm-drupal.git` repo has branches named `8.x-*`. However, these are not detectable/addressable via `composer`/`packagist`.
__Tasks__
* __(a)__: Create new repo `civicrm-drupal-8`. Migrate the `8.x-*` branches, ...__Background__: The `civicrm-drupal.git` repo has branches named `8.x-*`. However, these are not detectable/addressable via `composer`/`packagist`.
__Tasks__
* __(a)__: Create new repo `civicrm-drupal-8`. Migrate the `8.x-*` branches, but remove the `8.x-` prefix.
* __(b)__: Update release process to ensure that these are branched/tagged.D8 General Availabilityhttps://lab.civicrm.org/dev/drupal/-/issues/8Problem: How to address Bower dependencies installable via `composer`2020-07-16T17:23:37ZtottenProblem: How to address Bower dependencies installable via `composer`D8 General Availabilityhttps://lab.civicrm.org/dev/drupal/-/issues/10Keep `civicrm-version.php` up-to-date without running GenCode on all builds2020-07-16T17:23:38ZtottenKeep `civicrm-version.php` up-to-date without running GenCode on all buildsWe aim to allow installing CiviCRM on Drupal 8 via `composer`/`git` without requiring the admin to run `GenCode`.
The file `civicrm-version.php` is generated by `GenCode`. A typical copy looks like this:
```php
<?php
/**
* Get the Civ...We aim to allow installing CiviCRM on Drupal 8 via `composer`/`git` without requiring the admin to run `GenCode`.
The file `civicrm-version.php` is generated by `GenCode`. A typical copy looks like this:
```php
<?php
/**
* Get the CiviCRM version.
*/
function civicrmVersion() {
return array(
'version' => '4.7.30',
'cms' => 'Drupal',
'revision' => '4.7.30',
);
}
```
A simple fix might be:
* Commit the file to `civicrm-core.git` (much like in #1).
* Update `tools/bin/scripts/set-version.php` to maintain this file. (That script is part of the workflow whenever setup a new release.)
There's one catch: the `cms` field varies depending on the local runtime. *However*, we may be lucky here -- in a cursory check, I only found a couple places that relied on it. ~~The task here would be to take a closer look and potentially remove this element.~~ We'd also need to resolve these stale references to `cms`:
* `civicrm.drush.inc` (in `civicrm-backdrop-1.x`, `civicrm-drupal-6.x`, `civicrm-drupal-7.x`, `civicrm-drupal-8.x`)
* Use constants or functions from Drupal/Drush/Backdrop to detect the active environment.
* `install/index.php` and `install/template.html`
* Remove or rewrite any optional sanity checks that rely on this field.
* Use `$installType` to backfill `$civicrm_version['cms']` (like the WordPress conditional does)D8 General Availabilityhttps://lab.civicrm.org/dev/drupal/-/issues/12Keep 'CRM/Core/DAO/AllCoreTables.data.php' up-to-date without running CRM_Cor...2020-07-16T17:23:38ZMonish DebKeep 'CRM/Core/DAO/AllCoreTables.data.php' up-to-date without running CRM_Core_CodeGen_Reflection on all buildsThis file is updated via `CRM_Core_CodeGen_Reflection` and uses `xml/templates/listAll.tpl` to populate all Civi table metadata in this php file - https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/DAO/AllCoreTables.data.php .
...This file is updated via `CRM_Core_CodeGen_Reflection` and uses `xml/templates/listAll.tpl` to populate all Civi table metadata in this php file - https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/DAO/AllCoreTables.data.php .
A simple fix might be:
* Extend plugins/installDatabase/InstallSchema.civi-setup.php to do this task
* Use `CRM_Core_CodeGen_Reflection` workflow to create/update `AllCoreTables.data.php` and notify this task before doing it via installer.Monish DebMonish Debhttps://lab.civicrm.org/dev/drupal/-/issues/17Drupal8: Get UF locale/language is not supported (ex: for inheritLocale)2020-07-16T17:23:38ZbgmDrupal8: Get UF locale/language is not supported (ex: for inheritLocale)The option for `inhericLocale` does not seem to be working. To reproduce:
* In Drupal, enable translation and enable a second language, set language-detection using the URL prefix.
* Create a multi-lingual site (admin > locale > languag...The option for `inhericLocale` does not seem to be working. To reproduce:
* In Drupal, enable translation and enable a second language, set language-detection using the URL prefix.
* Create a multi-lingual site (admin > locale > languages, enable multilingual, then enable a second language)
* Enable the "inherit CMS language" option.
![Capture_d_écran_de_2018-04-26_14-35-12](/uploads/6573bb26a55bffe8729724d5e9b028f7/Capture_d_écran_de_2018-04-26_14-35-12.png)
Result: no matter whether accessing CiviCRM in English or French, the site is always in the default language.5.3.0bgmbgmhttps://lab.civicrm.org/dev/drupal/-/issues/19Drupal8: Implement set UF locale/language (affects mailing tokens)2020-07-16T17:23:38ZbgmDrupal8: Implement set UF locale/language (affects mailing tokens)This is a follow-up to dev/drupal#17.
How to reproduce:
* Create a bilingual Drupal site, with the locale module, with URL-prefix language detection (example.org/fr/civicrm)
* Enable multi-lingual CiviCRM, with two languages (ex: FR/EN...This is a follow-up to dev/drupal#17.
How to reproduce:
* Create a bilingual Drupal site, with the locale module, with URL-prefix language detection (example.org/fr/civicrm)
* Enable multi-lingual CiviCRM, with two languages (ex: FR/EN)
* Send a mailing in French, with the unsubscribe URL token
Expected result: the token should link to the page in French.
Related JIRA issue for Drupal7: https://issues.civicrm.org/jira/browse/CRM-16352
cc @monish.deb @samuelsov5.15.0bgmbgmhttps://lab.civicrm.org/dev/drupal/-/issues/21Drupal8: CiviCRM menu does not use the correct locale2020-07-16T17:23:38ZbgmDrupal8: CiviCRM menu does not use the correct localeHow to reproduce:
* Create a bilingual Drupal site, with the locale module
* Setup CiviCRM as multilingual, bilingual, using URL prefix language detection (example.org/fr/civicrm)
Result: the menu is always in the default CiviCRM langu...How to reproduce:
* Create a bilingual Drupal site, with the locale module
* Setup CiviCRM as multilingual, bilingual, using URL prefix language detection (example.org/fr/civicrm)
Result: the menu is always in the default CiviCRM language (or default Drupal language?).
Debugging the issue, in Drupal, the menu JS would be called this way:
`https://example.org/en/civicrm/ajax/menujs/2/en_US/1/5H7zVVcT`
However in D8 it is being called without the language prefix:
`https://example.org/civicrm/ajax/menujs/2/en_US/1/5H7zVVcT`
I suspect it is related to `CRM_Utils_System::languageNegotiationURL()`, which seems to test for the `locale` module.
cc @JoeMurray @monish.deb5.16.2https://lab.civicrm.org/dev/drupal/-/issues/22Drupal8: implement views and multilingual CiviCRM2020-07-16T17:23:38ZbgmDrupal8: implement views and multilingual CiviCRMHow to reproduce:
* Create a bilingual Drupal site, with the locale module
* Setup CiviCRM as multilingual, bilingual, using URL prefix language detection (example.org/fr/civicrm)
* Create a view of CiviCRM Events, add the title field.
...How to reproduce:
* Create a bilingual Drupal site, with the locale module
* Setup CiviCRM as multilingual, bilingual, using URL prefix language detection (example.org/fr/civicrm)
* Create a view of CiviCRM Events, add the title field.
Result: fatal database error because it cannot find `civicrm_event.title` (should be `civicrm_event.title_en_US`).
This was a quickfix, incoming PR.
cc @JoeMurray @monish.deb @samuelsovbgmbgmhttps://lab.civicrm.org/dev/drupal/-/issues/28Drupal8: Deprecate the Views integration?2020-07-16T17:23:38ZbgmDrupal8: Deprecate the Views integration?From: https://github.com/civicrm/civicrm-drupal-8/pull/3#issuecomment-412927333
> "Just wanted to let you'll know that the latest CiviCRM Entity 8.x-3.x-dev version includes Views support....Not telling you what to do, but the "Core Vie...From: https://github.com/civicrm/civicrm-drupal-8/pull/3#issuecomment-412927333
> "Just wanted to let you'll know that the latest CiviCRM Entity 8.x-3.x-dev version includes Views support....Not telling you what to do, but the "Core Views Integration" could be handled by that module...." (@jackrabbithanna)
Since CiviCRM-D8 is not officially supported yet, now might be a good time to cut-off core views support? (although pingbacks report over 100 sites).
It's still a fair amount of work, however, to PSA and confirm that CiviCRM Entity feature-equivalent?
+/-1? cc @jackrabbithanna @dsnopek @eileen .. who else?https://lab.civicrm.org/dev/drupal/-/issues/4Use `civicrm-setup` to handle installation2020-08-07T03:28:13ZtottenUse `civicrm-setup` to handle installation**Background**: During installation, one must check system-requirements, populate database, etc. To do this, the Drupal 8 integration currently calls some functions from `install/`.
However, the functions in the `install/` folder are t...**Background**: During installation, one must check system-requirements, populate database, etc. To do this, the Drupal 8 integration currently calls some functions from `install/`.
However, the functions in the `install/` folder are too narrowly crafted -- we don't have much ability to add/change/rearrange/remove installer steps. [civicrm-setup](https://civicrm.org/blog/totten/developers-revising-the-civicrm-installer-library-cli-wordpress) aims to redress that limitation and make it easier to iterate on the installer. For any new distribution channels (like D8), we should call `civicrm-setup`.
__Tasks__:
* __(a)__ `civicrm.drush.inc`: The function `drush_civicrm_install()` must use the `civicrm-setup` API (eg `installFiles()`, `installDatabase()`).
* __(b)__ `civicrm.install`: The function `civicrm_install()` must use setup API (eg `installFiles()`, `installDatabase()`).
* __(c)__ `civicrm.install`: The function `civicrm_requirements()` should use the setup API (eg `checkRequirements`, `checkAuthorized`).D8 General Availabilityhttps://lab.civicrm.org/dev/drupal/-/issues/9Problem: Easily allow 'vendor' directory not under the webroot2020-09-30T12:35:40ZtottenProblem: Easily allow 'vendor' directory not under the webrootThis is currently possible, but requires some patches and a build process.
**Here's the patches and process currently used by myDropWizard for Roundearth.io:**
*Patches:*
1. Find CKEditor relative to the resource URL: https://github.c...This is currently possible, but requires some patches and a build process.
**Here's the patches and process currently used by myDropWizard for Roundearth.io:**
*Patches:*
1. Find CKEditor relative to the resource URL: https://github.com/mydropwizard/civicrm-core/commit/9fc3877e2eb14e2829b530445c5e5491afc4bbe
2. Look for vendor directory above web root: https://github.com/mydropwizard/civicrm-core/commit/f57954392f8026d17b7f19f7c01ceeb65e703384
Both of those could probably be merged upstream?
*Process:*
1. Build process to copy web assets to `WEBROOT/libraries/civicrm` so they are web accessible. Here's the version from [roundearth's build process](https://gitlab.com/mydropwizard/roundearth-drops-8/blob/master/rebuild.sh#L74):
```
# Copy CiviCRM assets
asset_source=./vendor/civicrm/civicrm-core
asset_dest=./web/libraries/civicrm
mkdir -p $asset_dest
rsync -mr --include='*.'{html,js,css,svg,png,jpg,jpeg,ico,gif,woff,woff2,ttf,eot} --include='*/' --exclude='*' $asset_source/ $asset_dest/
rm -rf $asset_dest/tests
cp -r $asset_source/extern $asset_dest/
cp $asset_source/civicrm.config.php $asset_dest/
cat << EOF > $asset_dest/settings_location.php
<?php
define('CIVICRM_CONFDIR', '../../../sites');
EOF
```
2. Set the "Resource URL" to `[cms.root]/libraries/civicrm/`
**Getting support for this upstream:**
1. I think the patches might be good to just commit upstream? They don't seem controversial
2. The build process could be put in a PHP class in civicrm-corm which could be referred to as a script in a sites composer.json
3. We should be able to detect that we're using the vendor outside the webroot - could we somehow make the necessary "Resource URL" the default?5.5.0https://lab.civicrm.org/dev/drupal/-/issues/119Exception handling - 'Allowed memory size' exhasted issues2020-10-05T22:47:08ZRob_SException handling - 'Allowed memory size' exhasted issuesI'm having issues with Exception handling. I've hit a few places, where rather than getting provided with a useful error message, I am getting WSOD and then in the Apache error logs I am seeing "PHP Fatal error: Allowed memory size of x...I'm having issues with Exception handling. I've hit a few places, where rather than getting provided with a useful error message, I am getting WSOD and then in the Apache error logs I am seeing "PHP Fatal error: Allowed memory size of xxx bytes exhausted (tried to allocate xxx bytes) in Unknown on line 0".
"Unknown on line 0" isn't very helpful. One instance where I am getting this is if I want to view a contribution page, that has "Allow individuals to contribute and / or signup for membership on behalf of an organisation?" selected, but the user does not have the 'CiviCRM: profile create' permission.
It's taken me a while to narrow down the problem following a debug_backtrace() in templates/CRM/Contribute/Form/Contribution/Main.tpl.
I've tracked it as far as CRM_Core_Exception. The constructor method here is working ok, but there is another method, getErrorData() which is somehow getting called, but I cannot figure out where from. It seems to me that there must be some kind of infinite loop thing going on with one Exception class calling another. CRM_Core_Exception extends PEAR_Exception which extends Exception.
I have at least three other instances of WSOD on the site, with the same uninformative 'Allowed memory size ..' errors in the Apache log, but I haven't got as far as tracking them down to see if it is the same thing yet.
Is anyone else having problems like this? Would appreciate any thoughts.5.31.0https://lab.civicrm.org/dev/drupal/-/issues/23[webform_civicrm] - Webform CiviCRM module - Drupal 8 prototyping2020-10-15T16:29:06ZKarinG[webform_civicrm] - Webform CiviCRM module - Drupal 8 prototypingI sat down with Will & David this week to take a look at what D8 Webform-CiviCRM might look like. I've been playing with the Webform 5 module and really love it. We talked about handlers and element types and the pros & cons of those. I'...I sat down with Will & David this week to take a look at what D8 Webform-CiviCRM might look like. I've been playing with the Webform 5 module and really love it. We talked about handlers and element types and the pros & cons of those. I'm still learning the new system so I may revise this, but here are my thoughts so far.
In Webform-CiviCRM D7, there is a massive configuration form for the CiviCRM-related form settings. It configures the data handling and it also auto-generates webform elements and links them to their corresponding CiviCRM entity field. It looks like this:
![Webform-CiviCRM-D7](/uploads/68e92ea62fe22aaf37293c778aa5ee3a/Webform-CiviCRM-D7.png)
Note that checking a box on this form will actually insert a corresponding element into the Webform. I've always thought that was much more user-frieldly than the alternative of making the user create a new element and then go over to a "mapping" screen to link it to CiviCRM. So I'd like to keep that kind of behavior.
But playing around with the D8 interface, I think we could break this monolithic form up by entity and integrate it better with the webform admin screen. Here's my spitball proposal:
1. Create a bunch of new "container" type elements, one per supported CiviCRM entity type (Contact, Participant, Activity, etc).
2. Add a new button on the webform elements page to add these CiviCRM entity containers to the form.
3. Adding one would automatically enable our CiviCRM submission handler.
4. Editing a container would pop up a configuration form specific to that entity - it would look a lot like one of the panes on the webform-civicrm D7 admin screen above.
5. Checking a checkbox on that form would result in a new webform element being added into the container.
6. The admin user would still be free to move elements around and rename them. I don't see any reason why they wouldn't be able to move them outside of the container too. The mapping wouldn't be dependent on that.
7. The entity container itself could be styled to look like a fieldset, flexbox, div, etc.
Here's a photoshopped mockup of what that might look like. Note that in D8, popups float to the right on wide screens, so what you're seeing here would be the result of clicking the "Edit" button on the CiviCRM contact.
![Webform_Mockup_1](/uploads/b369bedbee01eb0f70cce22910c5472d/Webform_Mockup_1.png)https://lab.civicrm.org/dev/drupal/-/issues/35Drupal8: CiviCRM checks assume a single-database installation2020-10-26T15:25:58ZJonGoldDrupal8: CiviCRM checks assume a single-database installationI typically set up CiviCRM in a separate database, with a single MySQL user granted the minimum necessary permissions to change both CMS and CRM.
Drupal8 is incorporating CiviCRM checks into Drupal - but I get the error message (with th...I typically set up CiviCRM in a separate database, with a single MySQL user granted the minimum necessary permissions to change both CMS and CRM.
Drupal8 is incorporating CiviCRM checks into Drupal - but I get the error message (with the permissions below) that I don't have permission to create triggers on my database.
What's actually happening is I don't have permission to create triggers on the Drupal database. I can create triggers on the Civi db.
Below you can see the command I ran that bypassed the issue.
Since this blocks Drupal upgrades, it feels reasonably serious to resolve. I feel a little lost in D8 though - I was looking for `hook_requirement`, which is how I'd ordinarily add a status check in D7, but couldn't find it (except in the install file).
```
mysql> show grants for myorg_test@localhost;
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for myorg_test@localhost |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'myorg_test'@'localhost' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, TRIGGER ON `myorg_test_civi`.* TO 'myorg_test'@'localhost' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON `myorg_test_drupal`.* TO 'myorg_test'@'localhost' |
| GRANT EXECUTE, ALTER ROUTINE ON FUNCTION `myorg_test_civi`.`civicrm_strip_non_numeric` TO 'myorg_test'@'localhost' |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4 rows in set (0.00 sec)
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, TRIGGER ON `myorg_test_drupal`.* TO 'myorg_test'@'localhost';
Query OK, 0 rows affected (0.00 sec)```