Drupal issueshttps://lab.civicrm.org/dev/drupal/-/issues2023-12-13T17:46:26Zhttps://lab.civicrm.org/dev/drupal/-/issues/133Breadcrumb error on CiviCRM admin pages (Drupal 8)2023-12-13T17:46:26ZW01FBreadcrumb error on CiviCRM admin pages (Drupal 8)Getting the following error on several CiviCRM admin pages, including /civicrm/admin
```
Warning: Invalid argument supplied for foreach() in CRM_Utils_System_Drupal8->appendBreadCrumb() (line 190 of /home/customer/www/youpickfarms.org/v...Getting the following error on several CiviCRM admin pages, including /civicrm/admin
```
Warning: Invalid argument supplied for foreach() in CRM_Utils_System_Drupal8->appendBreadCrumb() (line 190 of /home/customer/www/youpickfarms.org/vendor/civicrm/civicrm-core/CRM/Utils/System/Drupal8.php).
CRM_Utils_System_Drupal8->appendBreadCrumb('Administer CiviCRM', '/civicrm/admin?reset=1') (Line: 60)
CRM_Utils_System::__callStatic('appendBreadCrumb', Array) (Line: 76)
CRM_Contact_Form_Domain->preProcess() (Line: 599)
CRM_Core_Form->buildForm() (Line: 120)
CRM_Core_StateMachine->perform(Object, 'next', 'Next') (Line: 45)
CRM_Core_QuickForm_Action_Next->perform(Object, 'next') (Line: 203)
HTML_QuickForm_Controller->handle(Object, 'next') (Line: 103)
HTML_QuickForm_Page->handle('next') (Line: 347)
CRM_Core_Controller->run() (Line: 98)
CRM_Utils_Wrapper->run('CRM_Contact_Form_Domain', 'Organization Address and Contact Info', Array) (Line: 285)
CRM_Core_Invoke::runItem(Array) (Line: 68)
CRM_Core_Invoke::_invoke(Array) (Line: 36)
CRM_Core_Invoke::invoke(Array) (Line: 88)
Drupal\civicrm\Civicrm->invoke(Array) (Line: 80)
Drupal\civicrm\Controller\CivicrmController->main(Array, '')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
```5.70.0https://lab.civicrm.org/dev/drupal/-/issues/132Drupal 8 Profile menu items2020-10-04T04:46:49ZAlanDixonDrupal 8 Profile menu itemsWhen using the CiviCRM profiles for "View/Edit Drupal User Account", the tab generated on the user page doesn't use the 'public title'.
Fix on line 40 of
src/Plugin/Derivative/LocalTasks.php
change uf_group['title'] to uf_group['fronten...When using the CiviCRM profiles for "View/Edit Drupal User Account", the tab generated on the user page doesn't use the 'public title'.
Fix on line 40 of
src/Plugin/Derivative/LocalTasks.php
change uf_group['title'] to uf_group['frontend_title']5.31.0https://lab.civicrm.org/dev/drupal/-/issues/127Drupal 8 - Using Create User Record action on a contact with no email is too ...2020-08-04T13:32:09ZDaveDDrupal 8 - Using Create User Record action on a contact with no email is too quiet. Also CRM_Core_Session::setStatus is sometimes ignored.Followup to https://lab.civicrm.org/dev/drupal/-/issues/91 and https://github.com/civicrm/civicrm-core/pull/17771
It won't create the user but because of the way it fails the logged in user doesn't see an error, it just reloads the cont...Followup to https://lab.civicrm.org/dev/drupal/-/issues/91 and https://github.com/civicrm/civicrm-core/pull/17771
It won't create the user but because of the way it fails the logged in user doesn't see an error, it just reloads the contact view page. If you look in drupal watchdog though it will say `CRM_Core_Exception: is not of type String in CRM_Core_DAO::composeQuery() (line 1660 of ...\CRM\Core\DAO.php)`.
What's happening is hook_user_insert is trying to do stuff and it properly fails, but because of two compounding bugs you don't see the usual bounce message or fatal error screen.
One is that there are certain situations where if you call CRM_Core_Session::setStatus() and leave the message blank and only set a title, it won't show the popup.
The other is that the form doesn't look at the return value of the user create call, so even if the popup was working it would say success.
So two things:
Avoid the exception. I'm still looking closer where this should go. To be in line with https://github.com/civicrm/civicrm-drupal-8/pull/42 there could also be a non-form-related user-validation attached somewhere to handle blank emails when a drupal user is created programmatically.
Audit uses of setStatus to see if they are silently failing elsewhere, and see if fixing info.tpl makes them work. It looks like there are two others:
* On batch update for contacts, when you save it's supposed to display a popup message.
* Ditto when you delete a campaign survey.
* There is also when you delete or restore a case activity, but this follows a different path and is javascript only and doesn't use info.tpl.5.29.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/117Profiles used for editing user records in drupal 8 don't load civi javascript2021-06-14T15:53:02ZDaveDProfiles used for editing user records in drupal 8 don't load civi javascript1. Create a civi profile that has `View/Edit Drupal User Account` checked under "Used For".
1. Add the Individual birthdate field.
1. Clear drupal cache at admin/config/development/performance (otherwise the tab in the next step won't sh...1. Create a civi profile that has `View/Edit Drupal User Account` checked under "Used For".
1. Add the Individual birthdate field.
1. Clear drupal cache at admin/config/development/performance (otherwise the tab in the next step won't show up).
1. Edit any user record under /admin/people.
1. Click on the tab for the profile you made.
1. Birthdate field has no datepicker. If you turn off aggregation which is on by default you can see no civi javascript seems to be even listed (i.e. it's not a 404 or resource url issue).
Civi and civicrm-drupal-8 version is master.5.40.0https://lab.civicrm.org/dev/drupal/-/issues/114Installing drupal 8 using civicrm-setup leads to "incorrect resource url" sys...2020-08-17T04:43:57ZDaveDInstalling drupal 8 using civicrm-setup leads to "incorrect resource url" system status check errorsWhat the check is doing is evaluating `CRM_Core_Config::singleton()->userFrameworkResourceURL` as part of computing the path to the packages folder, but here that evaluates to `[cms.root]/libraries/civicrm/core/`, which in drupal 8 is se...What the check is doing is evaluating `CRM_Core_Config::singleton()->userFrameworkResourceURL` as part of computing the path to the packages folder, but here that evaluates to `[cms.root]/libraries/civicrm/core/`, which in drupal 8 is separated from packages.
One possibility is to instead evaluate `[civicrm.packages]`, i.e. line https://github.com/civicrm/civicrm-core/blob/5.23.3/CRM/Utils/Check/Component/Env.php#L867 should change to:
`$arrowUrl = \Civi::paths()->getUrl('[civicrm.packages]/jquery/css/images/arrow.png', 'absolute');`
I'm just not sure if that then works with other CMSs. Alternatively maybe it should check for something in core?5.29.0https://lab.civicrm.org/dev/drupal/-/issues/98CiviCRM session instance not working when Masquerading in Drupal 72021-09-01T21:02:42ZMichael McAndrewCiviCRM session instance not working when Masquerading in Drupal 7Have just upgraded to D7-5.20.1 and noticed that CRM_Core_Session::singleton() does not work when masquerading.
Setting a breakpoint in a Drupal page while masquerading and running `Civi::log()->debug(var_export(CRM_Core_Session::single...Have just upgraded to D7-5.20.1 and noticed that CRM_Core_Session::singleton() does not work when masquerading.
Setting a breakpoint in a Drupal page while masquerading and running `Civi::log()->debug(var_export(CRM_Core_Session::singleton(),true))`
Results in the following in the log:
```
Dec 11 13:08:57 [debug] CRM_Core_Session::__set_state(array(
'_key' => 'CiviCRM',
'_session' =>
array (
'masquerading' => '76',
),
))
```5.23.0https://lab.civicrm.org/dev/drupal/-/issues/91Drupal8: Buggy behavior if user account is created without email address2020-08-07T03:28:13ZJonGoldDrupal8: Buggy behavior if user account is created without email addressIn Drupal 8, the email address isn't a required field. However, if an email address isn't specified, then the `civicrm_uf_match` record isn't created, the corresponding CiviCRM contact isn't created, and this leads to some very buggy be...In Drupal 8, the email address isn't a required field. However, if an email address isn't specified, then the `civicrm_uf_match` record isn't created, the corresponding CiviCRM contact isn't created, and this leads to some very buggy behavior, such as the dashboard showing multiple dashboards (see https://lab.civicrm.org/dev/drupal/issues/54#note_23706), which I imagine is because `civicrm_dashboard_contact` is being queried by contact ID, and finding none, simply loads all dashlets for all users.
I think the correct way to handle this is to use a Drupal hook to make the email address required.5.29.0https://lab.civicrm.org/dev/drupal/-/issues/89Drupal8 - Contact Report does not load any values in the ACL Group/Role field2020-01-15T05:06:39ZjitendraDrupal8 - Contact Report does not load any values in the ACL Group/Role fieldNo values are loaded in Access Tab -> ACL Group/Role field in any contact reports eg `Constituent Summary `
![image](/uploads/476933860e82a4ab629031222dc9d925/image.png)No values are loaded in Access Tab -> ACL Group/Role field in any contact reports eg `Constituent Summary `
![image](/uploads/476933860e82a4ab629031222dc9d925/image.png)5.23.0jitendrajitendrahttps://lab.civicrm.org/dev/drupal/-/issues/85Drupal8: Enabling language breaks a fresh CiviCRM install2020-01-26T17:07:09ZRar9Drupal8: Enabling language breaks a fresh CiviCRM installInstalled a fresh D8+civicrm via composer.
composer create-project roundearth/drupal-civicrm-project:8.x-dev MyDomain --no-interaction
setup d8
chmod +w web/sites/default
drush en -y civicrm
Change the "Resource URL" to `[cms.root]/lib...Installed a fresh D8+civicrm via composer.
composer create-project roundearth/drupal-civicrm-project:8.x-dev MyDomain --no-interaction
setup d8
chmod +w web/sites/default
drush en -y civicrm
Change the "Resource URL" to `[cms.root]/libraries/civicrm`
As icons still were not 100% I added to civicrm.settings.php the hard coded ResourceURLs
```php
if (!defined('CIVICRM_UF_BASEURL')) {
define( 'CIVICRM_UF_BASEURL' , 'https://MyDomain');
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = '[cms.root]/libraries/civicrm';
$civicrm_paths['civicrm.root']['url'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/';
$civicrm_setting['domain']['userFrameworkResourceURL'] = '[cms.root]/libraries/civicrm';
$civicrm_paths['cms.root']['path'] = '/var/www/vhosts/MyDomain/web';
}
```
Now cleared cache and CiviCRM runs :-)
But when I enable D8 language under extensions the CiviCRM site breaks! :-(
[Screenshot_1](/uploads/b0edfe413622185916d319889f178cd8/Screenshot_1.jpg)
Disabling Drupal language again, will bring back CiviCRM.5.23.0https://lab.civicrm.org/dev/drupal/-/issues/79Error when upgrading to 5.16.02022-08-12T05:14:12ZJGauntError when upgrading to 5.16.0Not sure if this is the right place to add the issue so apologies in advance.
I've attempted to upgrade three separate sites on three separate servers from 5.14 and 5.15 to 5.16.0 and all three came back with the following error:
Error...Not sure if this is the right place to add the issue so apologies in advance.
I've attempted to upgrade three separate sites on three separate servers from 5.14 and 5.15 to 5.16.0 and all three came back with the following error:
Error: syntax error, unexpected ':', expecting '{' in /home/example/public_html/sites/all/modules/civicrm/vendor/league/csv/src/functions.php, line 33
The three sites are all on Drupal 7 on PHP 7.1 although I did upgrade one temporarily to 7.2 and also 7.3 to see if that made a difference which it didn't.
I'm used to upgrading civi on many different sites all the time so I don't believe it to be a fault of my own.
I tried to upgrade the usual way:
- Delete old codebase
- Unpack new code base
- Run 'drush civicrm-upgrade-db'
It is when I enter the drush command the error flags up and the update fails. I've used the same method countless times in the past so I do think there is an issue somewhere.
Thanks,
Jade5.16.3https://lab.civicrm.org/dev/drupal/-/issues/75[regression] `cv` fails on CiviCRM 5.15.02022-04-06T22:13:17ZJonGold[regression] `cv` fails on CiviCRM 5.15.0Any command that attempts to access Civi fails with:
```
[RuntimeException]
Cannot resolve path using "cms.root.url"
```
Civi 5.14.2 works fine.
The issue is `CRM...Any command that attempts to access Civi fails with:
```
[RuntimeException]
Cannot resolve path using "cms.root.url"
```
Civi 5.14.2 works fine.
The issue is `CRM_Utils_System_Drupal8::languageNegotiationURL()`, which was added in 5.15.0. Removing this function restores the correct behavior, but I assume has a detrimental effect on multilingual.
The underlying cause of the error is hidden because of a later PR by @bgm that accounts for the REST API. If you roll back his change, the error becomes:
```
[Drupal\Core\DependencyInjection\ContainerNotInitializedException]
\Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container.
```5.16.0https://lab.civicrm.org/dev/drupal/-/issues/66Recurring contributions fail to be recorded2019-06-03T08:37:17ZBobSRecurring contributions fail to be recordedAfter upgrading from from 5.10.3 to 5.13.4, certain recurring contributions from PayPal began to not be recorded, while others were recorded.
The server log indicated:
* Posts to civicrm/extern/ipn.php were failing with "Call to undefin...After upgrading from from 5.10.3 to 5.13.4, certain recurring contributions from PayPal began to not be recorded, while others were recorded.
The server log indicated:
* Posts to civicrm/extern/ipn.php were failing with "Call to undefined function variable_get() in ...civicrm/CRM/Utils/System/Drupal.php:790"
* Posts to civicrm/payment/ipn/1 were successful.
It appears that during the failed posts, we arrive in civicrm/CRM/Utils/System/Drupal.php::getTimeZoneString() without bootstrapping Drupal and die on a call to variable_get('configurable_timezones', 1).
Failure was confirmed on https://civicrm.demo.civihosting.com (received HTTP status 500 on a post to civicrm/extern/ipn.php).5.14.0https://lab.civicrm.org/dev/drupal/-/issues/63Drupal8: drupal_set_message is deprecated (or: Event Cart messages display HTML)2019-06-13T15:07:11ZbgmDrupal8: drupal_set_message is deprecated (or: Event Cart messages display HTML)When using the CiviCRM Event Cart in Drupal8, some status messages display HTML to the user.
[This PR](https://github.com/civicrm/civicrm-core/pull/13959) fixes two things:
* It uses `\Drupal\Core\Render\Markup::create` to handle marku...When using the CiviCRM Event Cart in Drupal8, some status messages display HTML to the user.
[This PR](https://github.com/civicrm/civicrm-core/pull/13959) fixes two things:
* It uses `\Drupal\Core\Render\Markup::create` to handle markup before displaying it.
* It uses the Messenger service, because drupal_set_message is deprecated since Drupal 8.5.x (2017) https://www.drupal.org/node/27749315.16.0https://lab.civicrm.org/dev/drupal/-/issues/59deprecate civicrm_engage2021-02-02T00:49:50Zjamiedeprecate civicrm_engageI'd like to propose we begin a process of deprecating and then removing the civicrm_engage module from the civivicrm-drupal repository.
I've just posted a blog outlining replacement extensions that can now be used with some instructions...I'd like to propose we begin a process of deprecating and then removing the civicrm_engage module from the civivicrm-drupal repository.
I've just posted a blog outlining replacement extensions that can now be used with some instructions for anyone still using civicrm_engage:
https://civicrm.org/blog/jamie/civicrmengage-is-dead-long-live-civicrmengage
I'm not sure the best process to take to deprecate a drupal module. Open to suggestions or, if we have already deprecated a drupal module in the past, pointers to the documentation or code changes we made.5.18.0https://lab.civicrm.org/dev/drupal/-/issues/54Drupal8 CiviCRM conflicts with Masquerade module2022-02-24T00:33:50ZJonGoldDrupal8 CiviCRM conflicts with Masquerade moduleReported on d.o originally by jptillman (who is on chat.c.o with the same name) in the Masquerade queue: https://www.drupal.org/project/masquerade/issues/3019665
I confirmed the same issue, and also confirmed that uninstalling CiviCRM r...Reported on d.o originally by jptillman (who is on chat.c.o with the same name) in the Masquerade queue: https://www.drupal.org/project/masquerade/issues/3019665
I confirmed the same issue, and also confirmed that uninstalling CiviCRM resolves this issue. This fits a pattern of Civi having some sort of incorrect interaction with the D8 user login - see #53, core#231, and [CRM-19878](https://issues.civicrm.org/jira/browse/CRM-19878) for other examples.5.41.0https://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/31CiviMember Role sync is no longer syncing Pending memberships2022-10-08T12:04:06ZjitendraCiviMember Role sync is no longer syncing Pending membershipsPending membership does not sync roles even if the option is configured in the settings page.Pending membership does not sync roles even if the option is configured in the settings page.5.9jitendrajitendrahttps://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/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.0bgmbgm