Drupal issueshttps://lab.civicrm.org/dev/drupal/-/issues2024-02-14T09:52:26Zhttps://lab.civicrm.org/dev/drupal/-/issues/193drush: use \Civi\Setup instead of custom installer2024-02-14T09:52:26Zbgmdrush: use \Civi\Setup instead of custom installerInitial discussion: https://github.com/civicrm/civicrm-core/pull/29242#issuecomment-1926066031
The old installer would rely on having the l10n files installed with both the 'mysql' files and the 'mo' files. The newer `\Civi\Setup`, whic...Initial discussion: https://github.com/civicrm/civicrm-core/pull/29242#issuecomment-1926066031
The old installer would rely on having the l10n files installed with both the 'mysql' files and the 'mo' files. The newer `\Civi\Setup`, which is used by the Drupal 7/10 UI and by WordPress and Joomla, runs the mysql files through `ts` at run-time, so it's not necessary to generate those files anymore.
The last bastion is in the drush 8 functions, which presumably no-one uses anymore except Aegir users.
(I have pending PRs and will link them here)https://lab.civicrm.org/dev/drupal/-/issues/190Links in Drupal Views are improperly URL-encoded2023-10-05T12:00:17ZresgaLinks in Drupal Views are improperly URL-encodedOriginal and open issue: [CRM-21716 Links in Drupal Views are improperly URL-encoded](https://issues.civicrm.org/jira/browse/CRM-21716).
As I read https://lab.civicrm.org/infra/ops/-/wikis/gitlab-roadmap#what-about-the-2000-open-issues-...Original and open issue: [CRM-21716 Links in Drupal Views are improperly URL-encoded](https://issues.civicrm.org/jira/browse/CRM-21716).
As I read https://lab.civicrm.org/infra/ops/-/wikis/gitlab-roadmap#what-about-the-2000-open-issues-in-jira-that-are-not-confirmed not all issues were migrated, and it looks like this one wasn't.
The updated code in the issue above works well, and URLs are properly formatted.https://lab.civicrm.org/dev/drupal/-/issues/189Epic: Drupal 10 finalization2023-10-30T18:30:20ZtottenEpic: Drupal 10 finalizationThis is a follow-up to #176. Where #176 did the main work of achieving compatibility, this issue is for the final wrap-up to handle Drupal 10 as a publicly visible option.
* [x] Add build types for test/demo infra
* [x] Add public sandb...This is a follow-up to #176. Where #176 did the main work of achieving compatibility, this issue is for the final wrap-up to handle Drupal 10 as a publicly visible option.
* [x] Add build types for test/demo infra
* [x] Add public sandbox on https://civicrm.org/demo (https://d10-master.demo.civicrm.org/)
* [ ] Add to test matrices
* [x] CiviCRM-E2E-Matrix (master)
* [ ] CiviCRM-E2E-Matrix (stable/rc)
* [ ] Fix distinctive test failures on D10
* [x] Concurrent mail tests (https://github.com/civicrm/civicrm-core/pull/27072)
* [ ] Authx tests (*these may be non-blockers since D9 has similar issues -- but we should look again*)
* [ ] Add to `Installation Guide` ([Requirements](https://docs.civicrm.org/installation/en/latest/general/requirements/), [Install on Drupal](https://docs.civicrm.org/installation/en/latest/drupal/))
* [x] Add to https://civicrm.org/downloadhttps://lab.civicrm.org/dev/drupal/-/issues/188drupal 9: Event registration with drupal user creation crashes if using first...2023-06-28T07:09:49ZDaveDdrupal 9: Event registration with drupal user creation crashes if using first+last+email dedupe ruleThis is pulled out from https://lab.civicrm.org/dev/drupal/-/issues/186 since it's not recent and while touching a similar code area it's not exactly the same.
Part of the problem here is it only sends on the email to createUser, but as...This is pulled out from https://lab.civicrm.org/dev/drupal/-/issues/186 since it's not recent and while touching a similar code area it's not exactly the same.
Part of the problem here is it only sends on the email to createUser, but as in the other ticket it already has the contact id so it shouldn't need to do dedupe rules, it's just how to get that contact id to get passed on to synchronizeUFMatch: https://github.com/civicrm/civicrm-core/blob/c0a3d0e01a7d8df34786a1510d8a4661dffee82b/CRM/Event/Form/Registration.php#L807. Using $_POST is not great, but it needs to be something that gets passed on from the _drupal_ insert hook. And it would be nice to re-use whatever mechanism for the contact user add task too.https://lab.civicrm.org/dev/drupal/-/issues/187Installing drupal/fontawesome causes CiviCRM to freeze the browser.2023-05-24T06:53:44Zdarren.woodsInstalling drupal/fontawesome causes CiviCRM to freeze the browser.Install vanilla Drupal 9 via composer.
Installed CiviCRM via composer according to docs.
Installed the Fontawesome module: composer require 'drupal/fontawesome:^2.25'
Loading any CiviCRM paths /civicrm/admin causes the browser to enter...Install vanilla Drupal 9 via composer.
Installed CiviCRM via composer according to docs.
Installed the Fontawesome module: composer require 'drupal/fontawesome:^2.25'
Loading any CiviCRM paths /civicrm/admin causes the browser to enter an infinite loop once the DOM is loaded.
Tracked it down to all.js from Fontawesome.
Removing Fontawesome module resolves it: composer remove 'drupal/fontawesome'
Could this be related to the civicrm asset plugin?
Before the browser freezes, I can see there are two icons for each admin menu option.
We would dearly love to use fa icons in our Drupal theme :pray:https://lab.civicrm.org/dev/drupal/-/issues/186drupal 9: Create User Record action crashes if using first+last+email as unsu...2023-07-05T23:49:05ZDaveDdrupal 9: Create User Record action crashes if using first+last+email as unsupervised ruleSee https://civicrm.stackexchange.com/questions/44841/create-user-record-action-on-a-contact-summary-page-throws-error-is-this-a-bug
Putting as regression for now but not completely sure.
Doesn't happen in drupal 7.See https://civicrm.stackexchange.com/questions/44841/create-user-record-action-on-a-contact-summary-page-throws-error-is-this-a-bug
Putting as regression for now but not completely sure.
Doesn't happen in drupal 7.5.63.0https://lab.civicrm.org/dev/drupal/-/issues/185CiviCRM public theme always the same as the CiviCRM Administrator theme2023-01-30T10:28:23ZspalmstromCiviCRM public theme always the same as the CiviCRM Administrator themeWhen running CiviCRM 5.57.1 under Drupal 9.5.2 under IIS it seems that the public theme setting is ignored; CiviCRM just uses the theme set for CiviCRM administration. To replicate got to Manage -> Appearance and select the various theme...When running CiviCRM 5.57.1 under Drupal 9.5.2 under IIS it seems that the public theme setting is ignored; CiviCRM just uses the theme set for CiviCRM administration. To replicate got to Manage -> Appearance and select the various themes. It doesn't appear to be browser related, I see the same with Edge, Chrome, Opera and Firefox. I don't know if it is IIS specific, but, of course, being theme related can't be replicated in the Demo environment.https://lab.civicrm.org/dev/drupal/-/issues/179KCFinder on D9: You don't have permissions to browse server.2022-08-12T05:14:07ZSandor SemseyKCFinder on D9: You don't have permissions to browse server.## Overview
The issue is very similar to this one:
https://civicrm.stackexchange.com/questions/41023/cannot-upload-images-using-ckeditor-on-message-template-after-5-45-upgrade
and the proposed workaround is solving it (reverting [this...## Overview
The issue is very similar to this one:
https://civicrm.stackexchange.com/questions/41023/cannot-upload-images-using-ckeditor-on-message-template-after-5-45-upgrade
and the proposed workaround is solving it (reverting [this](https://github.com/civicrm/civicrm-packages/commit/0bb407782b810c32a81e0ad42af67a435b44c845) commit), but I think the root cause is different.
**Steps to reproduce**
1. Use CKEditor4 as Wysiwig Editor
1. Create Event
1. Insert image to description
1. Try to browse, or upload image
1. Error: You don't have permissions to browse server.
## Analysis
In my case classes are found, so it's not namespacing. After some debugging, I think the following happens:
1. In `civicrm/packages/kcfinder/integration/civicrm.php` Drupal is bootstrapped, user authenticated and correct `KCFINDER` params are added to the `$_SESSION` var:
```
$_SESSION['KCFINDER']['disabled'] = false;
$_SESSION['KCFINDER']['uploadURL'] = $config->imageUploadURL;
$_SESSION['KCFINDER']['uploadDir'] = $config->imageUploadDir;
```
1. Then in `\kcfinder\uploader::construct()` session ID is requested from Drupal (`\CRM_Core_Config::singleton()->userSystem->getSessionId()`)
1. Eventually `Drupal\Core\Session\SessionManager::start()` finds no session so starts a new one, thus removing `KCFINDER` array from `$_SESSION`. This way kcfinder defaults are used, which is to disable access.
So I thought it's a cookie issue (though `$_COOKIE` was populated with all the cookies all the way through).
I changed `CRM_Utils_System_Drupal8::loadBootStrap()` to pass cookies to the Symfony request:
```
$request = new \Symfony\Component\HttpFoundation\Request([], [], [], $_COOKIE, [], $_SERVER);
```
This way session was found in step 3 above, it was restored, but it also didn't contained the `KCFINDER` array as `$_SESSION` was overwritten by restoring.
So I'm stuck here, probably I'm missing something obvious, but currently I can't see why should it behave differently.
Has anybody any idea?
**Drupal: 9.3.12**
**Civi: 5.47.4**
## UPDATE
Relevant issues in other repos:
https://lab.civicrm.org/dev/core/-/issues/3419#note_74113
https://lab.civicrm.org/dev/civicrm-asset-plugin/-/issues/45.51.0https://lab.civicrm.org/dev/drupal/-/issues/178Drupal 8 - End of Life2023-05-13T18:45:09ZtottenDrupal 8 - End of LifeDrupal 8 officially went end-of-life in November 2021 (https://www.drupal.org/psa-2021-11-30). The focus of this issue is to gauge sentiment about (and identify tasks for) ending CiviCRM's Drupal 8.x support.
(_Note: This issue has no i...Drupal 8 officially went end-of-life in November 2021 (https://www.drupal.org/psa-2021-11-30). The focus of this issue is to gauge sentiment about (and identify tasks for) ending CiviCRM's Drupal 8.x support.
(_Note: This issue has no impact on CiviCRM's support for Drupal 7 or Drupal 9 -- both continue to be supported by `drupal.org` and `civicrm.org`._)
Rationale
----------
@DaveD [made the case on Github](https://github.com/civicrm/civicrm-core/pull/23302#discussion_r858700890) as follows
> * There's the 3 reasons already mentioned:
> * Has been EOL for 6 months
> * No security updates.
> * And there have been recent drupal security fixes which would have helped prompt people to move off 8 if they were still on it.
> * Civi works equally as well on 9 as on 8
> * There's support for dropping it in chat, with nobody dissenting: https://chat.civicrm.org/civicrm/pl/qh6t761dt7gsdyp78m6stbmpwo
> * Drupal 8 to 9 is _very_ different than 6 to 7. Drupal 9 is identical to drupal 8.9 except for some deprecated functions. It's not much different than if they had called it 8.10.
> * There were many blog posts about this on the internet, about how easy it would be to upgrade compared to other jumps.
> * There was plenty of awareness ahead of time in the drupal world that drupal 8 would be unsupported.
> * From May 2021 to November 2021, the only updates for drupal 8.9.x were security updates, with repeated notices that 8 was becoming EOL.
> * There was a module available that was pretty good about pointing out what if anything you needed to change.
> * There is no CIVICRM_UF=Drupal9, because it's not needed.
I would add two more items in favor of dropping D8:
* ___Drupal 10 Support___: Preserving D8 may make it harder to add D10. While most changes can be bridged to support 2 versions major (eg D8+D9 or D9+D10), it gets more complicated with 3 major versions (D8+D9+D10). We've encountered at least one issue (involving changes in Symfony Dispatcher / PSR-14) that gets prickly with 3 major versions.
* ___Pingbacks___: There are only ~30 Civi deployments still reporting Drupal 8.x. They represent <1% of Civi-Drupal deployments.
* Note: This is based on directly examining pingbacks from 2022 -- and only counting sites with multiple pingbacks (e.g. to exclude most ephemeral test-sites). The data on `stats.civicrm.org` is confusing in this regard, because Drupal 8.x and Drupal 9.x are lumped together with UF `Drupal8`. My comments are based on examining actual version-numbers and not just UF name.
Tasks
-----
There are a few tasks to do as follow-up:
* Update installation guide
* Remove Drupal 8.x from test infra
Suggested Emojis
----------------
Please do register a quick reaction on D8 EOL. Some suggested emojis:
* :rocket: - Remove Drupal 8 compatibility at the soonest convenience.
* :turtle: - Remove Drupal 8 compatibility... just not quite yet. (Keep it until 5.51 ESR).
* :shield: - Protect Drupal 8 compatibility for a longer period of time.
* :bangbang: - Extra importance modifier. (Add this if the sentiment on the first emoji is strong - eg if you will be significantly impacted by the issue.)
(Flag whichever is the soonest that you think is appropriate/acceptable.)
(Example: If you maintain a site that's been held back on D8 because of some complicated issue and cannot resolve it in the near future, then you could say ":shield: :bangbang:".)
(You may see `totten` on all emojis for a while, since I put them in as placeholders.)https://lab.civicrm.org/dev/drupal/-/issues/177Cannot resolve path using "cms.root.url"2022-04-29T09:11:35ZalmadorxCannot resolve path using "cms.root.url"Hi! I'm having the issue with
```
In Paths.php line 140:
Cannot resolve path using "cms.root.url"
```
I'm using Drupal 9 and the last version of CiviCRM
I've tried the solution from here
([regression `cv` fails on CiviCRM 5.15.0](htt...Hi! I'm having the issue with
```
In Paths.php line 140:
Cannot resolve path using "cms.root.url"
```
I'm using Drupal 9 and the last version of CiviCRM
I've tried the solution from here
([regression `cv` fails on CiviCRM 5.15.0](https://lab.civicrm.org/dev/drupal/-/issues/75))
\vendor\civicrm\civicrm-core\CRM\Utils\System\Drupal8.php:
` public function getCurrentLanguage() {
// Drupal might not be bootstrapped if being called by the REST API.
if (!class_exists('Drupal') || !\Drupal::hasContainer()) {
return NULL;`
I've replaced _return NULL;_ with _return $url;_ but that doesn't solved the issue.https://lab.civicrm.org/dev/drupal/-/issues/176Epic: Drupal 10 readiness2023-08-19T00:44:33ZDaveDEpic: Drupal 10 readinessLab snippet with a full set of instructions on how to scrape and claw a drupal 10+civi install into existence:
https://lab.civicrm.org/-/snippets/84
- [ ] Requires php 8.1 https://lab.civicrm.org/dev/core/-/issues/3181
- [x] Requires s...Lab snippet with a full set of instructions on how to scrape and claw a drupal 10+civi install into existence:
https://lab.civicrm.org/-/snippets/84
- [ ] Requires php 8.1 https://lab.civicrm.org/dev/core/-/issues/3181
- [x] Requires symfony 6 (this currently prevents even downloading the civi files even if you try really hard) https://lab.civicrm.org/dev/core/-/issues/2316 / PR https://github.com/civicrm/civicrm-core/pull/24132
- [x] Hooks defined by getSubscribedEvents don't work: https://lab.civicrm.org/dev/core/-/issues/3802
- [x] Composer-compile-lib [restricts to symfony 5](https://github.com/civicrm/composer-compile-lib/blob/a03d219bc4bad5aa878e198719b83178a910984b/composer.json#L26) / PR https://github.com/civicrm/composer-compile-lib/pull/5
- [x] Miscellaneous other composer.json updates - see the lab snippet above.
- [x] Why does cache/integration-tests need to be in a prod install? Can it be in require-dev instead? PR: https://github.com/civicrm/civicrm-core/pull/25054
- [x] https://github.com/civicrm/civicrm-core/pull/25499 covers these:
- [x] symfony/config
- [x] symfony/dependency-injection
- [x] symfony/event-dispatcher
- [x] symfony/filesystem
- [x] symfony/process
- [x] symfony/var-dumper
- [x] symfony/service-contracts
- [x] symfony/finder
- [x] psr/container
- [x] cv uses some deprecated symfony [in bootstrap](https://github.com/civicrm/cv/issues/117) / PR: https://github.com/civicrm/cv/pull/120
- [x] Followup fix because the attempt to keep supporting drupal 8 doesn't work with drupal 10: https://github.com/civicrm/cv/pull/126
- [x] core loadBoostrap(), needed e.g. for `cv`. https://github.com/civicrm/civicrm-core/pull/24133
- [x] similarly CRM_Utils_System_Drupal8 - https://github.com/civicrm/civicrm-core/pull/23302
- [x] financialacls core extension: https://lab.civicrm.org/dev/core/-/issues/3184
- [x] Requires guzzle 7 (I think this is easy) https://lab.civicrm.org/dev/drupal/-/issues/171 / PR: https://github.com/civicrm/civicrm-core/pull/22918
- [x] Requires psr/log 2.0. PR: https://github.com/civicrm/civicrm-core/pull/23409
- [x] Deprecation prevents civicrm-setup from running (already PR'd): https://github.com/civicrm/civicrm-core/pull/21809 / https://lab.civicrm.org/dev/drupal/-/issues/167
- [x] civicrm-drupal-8 won't enable because it doesn't [declare it is compatible](https://github.com/civicrm/civicrm-drupal-8/blob/b55fb5027c453ce86f76f357a3087e19a3bb4d41/civicrm.info.yml#L5)
- PR: https://github.com/civicrm/civicrm-drupal-8/pull/73
- [x] civicrm-drupal-8 civicrmtheme submodule won't enable because it doesn't [declare it is compatible](https://github.com/civicrm/civicrm-drupal-8/blob/b55fb5027c453ce86f76f357a3087e19a3bb4d41/modules/civicrmtheme/civicrmtheme.info.yml#L5)
- PR: https://github.com/civicrm/civicrm-drupal-8/pull/73
- [ ] For running unit tests:
- [ ] phpunit9 support: https://github.com/civicrm/civicrm-core/compare/master...demeritcowboy:civicrm-core:phpunit9?expand=1 along with `composer require yoast/phpunit-polyfills`
- [x] deprecated theme for mink tests: https://github.com/civicrm/civicrm-drupal-8/pull/76
- [ ] Possibly move this file to a community-maintained drupal module? It needs to be in a drupal module. Not much uses it currently - civicrm_entity and 2 extensions.
Timewise it would be cool to have something at least installable for Drupalcon (Apr 25).
cc: @KarinG @jackrabbithanna5.60.0https://lab.civicrm.org/dev/drupal/-/issues/175Call to deprecated function CRM_Contribute_PseudoConstant::pcpStatus in drupa...2022-03-08T14:11:00ZDaveDCall to deprecated function CRM_Contribute_PseudoConstant::pcpStatus in drupal 7 views modulehttps://civicrm.stackexchange.com/questions/41350/why-am-i-getting-deprecated-function-warnings
Coming from https://github.com/civicrm/civicrm-drupal/blob/e22d89a50108a2b4da99e971d0fdcdd656edd56c/modules/views/civicrm/civicrm_handler_fi...https://civicrm.stackexchange.com/questions/41350/why-am-i-getting-deprecated-function-warnings
Coming from https://github.com/civicrm/civicrm-drupal/blob/e22d89a50108a2b4da99e971d0fdcdd656edd56c/modules/views/civicrm/civicrm_handler_filter_pseudo_constant.inc#L45
`$this->_pseudo_constant = call_user_func_array($this->definition['pseudo class'] . "::" . $this->definition['pseudo method'], $pseudo_args);`
```
1 .../sites/all/modules/civicrm/CRM/Contribute/PseudoConstant.php(352): CRM_Core_Error::deprecatedFunctionWarning("Function pcpStatus will be removed")
2 .../sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_filter_pseudo_constant.inc(45): CRM_Contribute_PseudoConstant::pcpStatus()
3 .../sites/all/modules/views/includes/handlers.inc(65): civicrm_handler_filter_pseudo_constant->construct()
4 .../sites/all/modules/views/includes/handlers.inc(87): _views_create_handler((Array:8), "handler", "filter")
5 .../sites/all/modules/views/views.module(1399): _views_prepare_handler((Array:8), (Array:18), "status", "filter")
6 .../sites/all/modules/date/date_views/includes/date_views_fields.inc(59): views_get_handler("civicrm_pcp", "status", "filter")
7 .../sites/all/modules/date/date_views/date_views.module(156): _date_views_fields("civicrm_contact")
8 .../sites/all/modules/calendar/includes/calendar.views_template.inc(37): date_views_fields("civicrm_contact")
9 .../sites/all/modules/views/views.module(1520): calendar_views_templates()
10 .../sites/all/modules/views/views_ui.module(56): views_get_all_templates()
11 .../includes/menu.inc(2831): views_ui_menu()
12 .../includes/menu.inc(2794): menu_router_build()
13 .../includes/menu.inc(468): menu_rebuild()
14 .../includes/menu.inc(1779): menu_get_item()
15 .../includes/menu.inc(1794): menu_get_custom_theme(TRUE)
16 .../includes/common.inc(5402): menu_set_custom_theme()
17 .../includes/bootstrap.inc(2602): _drupal_bootstrap_full()
18 .../index.php(20): drupal_bootstrap(7)
19 {main}
```https://lab.civicrm.org/dev/drupal/-/issues/174Change message so it doesn't say Drupal8 on Drupal9 site2022-09-20T22:27:16ZJoeMurrayChange message so it doesn't say Drupal8 on Drupal9 siteThere was a message today on page for Synchronize Users to Contacts (/civicrm/admin/synchuser:
Synchronize Drupal8 Users
This was on a Drupal9 site, and the client got concerned about what they were running.
Please adjust the message s...There was a message today on page for Synchronize Users to Contacts (/civicrm/admin/synchuser:
Synchronize Drupal8 Users
This was on a Drupal9 site, and the client got concerned about what they were running.
Please adjust the message so that it either refers to just Drupal or ideally emits the correct major version of Drupal, eg Drupal9, Drupal10, etc.5.55.0Monish DebMonish Debhttps://lab.civicrm.org/dev/drupal/-/issues/173Leaking cacheability metadata2022-02-09T22:36:58ZfkohrtLeaking cacheability metadataAfter installing CiviCRM 5.45 on a fresh Drupal 9.3.2 running on Ubuntu 20.04.3 LTS, the [SAML Authentication](https://www.drupal.org/project/samlauth) module issues a warning after every successful authentication event:
> While process...After installing CiviCRM 5.45 on a fresh Drupal 9.3.2 running on Ubuntu 20.04.3 LTS, the [SAML Authentication](https://www.drupal.org/project/samlauth) module issues a warning after every successful authentication event:
> While processing SAML authentication response, code leaked cacheability metadata. This indicates a bug somewhere (but it is hard to pinpoint where): if the same code is called in other scenarios too, it may cause fatal crashes, or bloat the render cache unnecessarily. Please investigate. Metadata: i:6;:O:37:"Drupal\Core\Render\BubbleableMetadata":4:{s:16:"*cacheContexts";a:0:{}s:12:"*cacheTags";a:0:{}s:14:"*cacheMaxAge";i:-1;s:14:"*attachments";a:0:{}}
One of the maintainers of the `samlauth` module explains in a corresponding ticket:
> the samlauth module isn't leaking metadata. It's detecting that some other code in your website, which was executed during the login process, is leaking metadata and should be fixed.
>
> — roderik, “[Code leaked cacheability metadata](https://www.drupal.org/project/samlauth/issues/3232577)”, [comment #4](https://www.drupal.org/project/samlauth/issues/3232577#comment-14354950)
Before installing CiviCRM, no warnings appeared in the log, therefore I'd say the appearance of the warnings somehow correspond to the fact that CiviCRM has been installed: CiviCRM code for Drupal might leak cacheability metadata.https://lab.civicrm.org/dev/drupal/-/issues/172Deprecated function drupal_get_installed_schema_version() in 9.3, but with a ...2022-01-02T15:47:07ZDaveDDeprecated function drupal_get_installed_schema_version() in 9.3, but with a twistdrupal_get_installed_schema_version() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Update\UpdateHookRegistry::getInstalledVersion() or \Drupal\Core\Update\UpdateHookRegistry::getAllInstalledVersions()...drupal_get_installed_schema_version() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Update\UpdateHookRegistry::getInstalledVersion() or \Drupal\Core\Update\UpdateHookRegistry::getAllInstalledVersions() instead. See https://www.drupal.org/node/2444417
This is in vendor\civicrm\civicrm-core\CRM/Utils/System/Drupal8.php:
```
public function getModules() {
$modules = [];
$module_data = \Drupal::service('extension.list.module')->reset()->getList();
foreach ($module_data as $module_name => $extension) {
if (!isset($extension->info['hidden']) && $extension->origin != 'core') {
$extension->schema_version = drupal_get_installed_schema_version($module_name);
$modules[] = new CRM_Core_Module('drupal.' . $module_name, ($extension->status == 1));
}
}
return $modules;
}
```
The reason I haven't just put up a simple replacement PR is because if you look at the above function you'll notice schema_version is never used. If you look at the docblock in Base.php it says "List modules installed in the CMS, _including enabled and disabled ones_." Looking at the drupal 7 version (in DrupalBase.php), it does this:
`'SELECT name, status FROM {system} WHERE type = \'module\' AND schema_version <> -1'`
which means only the modules that are installed (but possibly disabled - that's what status is). Now in drupal 8 there is no concept of disabled, it's either installed or uninstalled, but the drupal 8 code is including all of them. In drupal 8 $extension->status means installed or uninstalled.
So two options are:
1. Try to match the drupal 7 implementation/docblock, which means excluding it if $extension->status is 0, and always passing 1 as the second parameter to CRM_Core_Module(), because disabled doesn't mean anything in drupal 8.
2. Leave it the way it is and just remove the unused line about schema_version.
Trying to track down where this gets used, it seems it's mostly in ManagedEntities, which I usually stay away from, and I'm not even sure why ManagedEntities would be dealing with drupal modules other than civicrm itself.
So I'm tempted to stop thinking about it and do item 2.5.46.0https://lab.civicrm.org/dev/drupal/-/issues/171Drupal 10 requires Guzzle 72022-07-10T15:27:07ZDaveDDrupal 10 requires Guzzle 7It doesn't seem like there is any major change but I'm not super-familiar with everywhere civi uses guzzle: https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#other-backwards-compatibility-breaking-changes
The main thing at the m...It doesn't seem like there is any major change but I'm not super-familiar with everywhere civi uses guzzle: https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#other-backwards-compatibility-breaking-changes
The main thing at the moment is you need to do something like `composer require guzzlehttp/guzzle:"6.3.0 as 7.4.0"` just to get the civi files downloaded, but that's obviously not the right thing to do.5.52.0https://lab.civicrm.org/dev/drupal/-/issues/170kcfinder error 5002021-12-16T13:14:52Zolivierkcfinder error 500Civicrm 5.43 and 5.44 under Drupal 8, launching kcfinder from ckeditor give an 500 error.
Php script integration/civicrm.php try to call civicrm.config.php located in web/libraries/civicrm/, and this file does not exist.
Copying this fil...Civicrm 5.43 and 5.44 under Drupal 8, launching kcfinder from ckeditor give an 500 error.
Php script integration/civicrm.php try to call civicrm.config.php located in web/libraries/civicrm/, and this file does not exist.
Copying this file from an Drupal 7 installation is not sufficent, because civicrm.settings.php is not searched in correct location.
```
--- ../../mcm65/sites/all/modules/civicrm/civicrm.config.php 2021-11-15 21:42:13.000000000 +0100
+++ libraries/civicrm/civicrm.config.php 2021-12-07 21:14:33.380121826 +0100
@@ -87,6 +87,11 @@
return $confdir;
}
+ if (file_exists($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . 'default' .
+ DIRECTORY_SEPARATOR . 'civicrm.settings.php')) {
+ return $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . 'default';
+ }
+
if (!file_exists($confdir) && !$skipConfigError) {
echo "Could not find valid configuration dir, best guess: $confdir<br/><br/>\n";
exit();
```
Another point, .htaccess in /web directory Deny access to most php files in public directory.
We must allow access to php files under kcfinder directory :
```
# For security reasons, deny access to other PHP files on public sites.
# Note: The following URI conditions are not anchored at the start (^),
# because Drupal may be located in a subdirectory. To further improve
# security, you can replace '!/' with '!^/'.
# Allow access to PHP files in /core (like authorize.php or install.php):
RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$
# Allow access to test-specific PHP files:
RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?.php
# Allow access to Statistics module's custom front controller.
# Copy and adapt this rule to directly execute PHP files in contributed or
# custom modules or to run another PHP application in the same directory.
RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$
RewriteCond %{REQUEST_URI} !/libraries/civicrm/packages/kcfinder/[a-z_]+\.php$
RewriteCond %{REQUEST_URI} !/libraries/civicrm/packages/kcfinder/.*/[a-z_]+\.php$
# Deny access to any other PHP files that do not match the rules above.
# Specifically, disallow autoload.php from being served directly.
RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F]
```https://lab.civicrm.org/dev/drupal/-/issues/169"Your browser session has expired and we are unable to complete your form sub...2022-03-16T00:19:54ZJonGold"Your browser session has expired and we are unable to complete your form submission" on all D9.2 anonymous sessions### Overview
This is an expensive bug, so I'm reporting it even though I don't have complete information.
On all D9.2 sites, anonymous users whose first visit to a CiviCRM page is a contribution or event registration page, will receive ...### Overview
This is an expensive bug, so I'm reporting it even though I don't have complete information.
On all D9.2 sites, anonymous users whose first visit to a CiviCRM page is a contribution or event registration page, will receive the error "Your browser session has expired and we are unable to complete your form submission" on submission. If they resubmit the page it will go through.
### Steps to Replicate
* Install a fresh D8 buildkit site.
* Upgrade to D9.2.0 or higher.
* Open an incognito window and paste in the URL to an event/contribution page (easiest to test if it's a free event with a confirmation page).
* Submit the page. See the error.
### Analysis
I'm still tracking this down and I don't really know the Civi session manager well - but on initial page load, `CRM_Core_Key::sessionID()` returns an empty string. On submitting the form, it finds a session ID correctly, so in `CRM_Core_Key::validate()` the expected key doesn't match the actual key.
While debugging, it's good to note that you can `composer update` to switch between D9.1.3 and D9.2.8 to switch between unbugged and bugged behavior.
It looks like this is the cause:
https://www.drupal.org/node/30063065.43.2https://lab.civicrm.org/dev/drupal/-/issues/168Notice: Undefined variable: custom_link in civicrm_handler_field_link_contact...2022-12-01T01:13:06ZAndrew WassonNotice: Undefined variable: custom_link in civicrm_handler_field_link_contact->render_link() (line 118 of civicrm/drupal/modules/views/civicrm/civicrm_handler_field_link_contact.inc).Hi Guys,
It's been a while (years) since I've contributed in the issue queue so I'm a little rusty.
This is just an annoyance where CiviCRM tries to render the Contact Link in a view for visitors who don't have the permissions to see i...Hi Guys,
It's been a while (years) since I've contributed in the issue queue so I'm a little rusty.
This is just an annoyance where CiviCRM tries to render the Contact Link in a view for visitors who don't have the permissions to see it. The result is a PHP Warning:
```Notice: Undefined variable: custom_link in civicrm_handler_field_link_contact->render_link() (line 118 of /sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_field_link_contact.inc).```
In order to squelch the notice I've added a conditional isset($custom_link). I can't see any adverse consequences from adding it and I'll be happy to make a patch if someone can point me in the direction of some docs for doing so.
Cheers,
Andrew5.57.0https://lab.civicrm.org/dev/drupal/-/issues/167Drupal service 'site.path' is deprecated in drupal 9 and will be removed in d...2022-06-11T19:26:30ZDaveDDrupal service 'site.path' is deprecated in drupal 9 and will be removed in drupal 10In https://github.com/civicrm/civicrm-core/blob/master/setup/src/Setup/DrupalUtil.php#L23 it calls `\Drupal::service('site.path');`.
But I'm wondering why that function getDrupalSiteDir() even exists and why it's not part of CRM_Utils_S...In https://github.com/civicrm/civicrm-core/blob/master/setup/src/Setup/DrupalUtil.php#L23 it calls `\Drupal::service('site.path');`.
But I'm wondering why that function getDrupalSiteDir() even exists and why it's not part of CRM_Utils_System_X. Maybe a timing issue since civi isn't installed yet at that point?
Anyway the relevant drupal issue is https://www.drupal.org/project/drupal/issues/3074585#comment-13220446.
Because of the (bleep) `@trigger_error` usage that drupal uses though it only comes up when running unit tests in drupal's own testing environment (until drupal 10 when it will hard fail, effectively nulling the effect of outputting a deprecation for most people).5.52.0