🇬🇧United Kingdom @ice70

Account created on 26 March 2009, about 16 years ago
#

Recent comments

🇬🇧United Kingdom ice70

I am in the same position where a site was upgraded from D10.3.1 to D11.0.4. Then later on to D11.1.1.
I have just had a request for some updates and trying to create a new field generates this error.

How did you resolve this?

🇬🇧United Kingdom ice70

With caching disabled, the theme suggestion is:
fieldset--edit-field-tag-target-id--2.html.twig

When enabled, it is:
fieldset--edit-field-tag-target-id.html.twig

So to get the templates working both in development and on production, I need two templates

fieldset--edit-field-tag-target-id.html.twig
fieldset--edit-field-tag-target-id--2.html.twig

🇬🇧United Kingdom ice70

the automated patch has not updated the yml core version requirements to use 11. This patch should fix that.

🇬🇧United Kingdom ice70

Hi,

I am trying to install the MR 36 as a patch (https://git.drupalcode.org/project/video_embed_field/-/merge_requests/36...)

composer require 'drupal/video_embed_field:^2.5'

the composer.json also has the following

in the require definitions:
"cweagans/composer-patches": "^1.7"

and in the patches section:

"drupal/video_embed_field":{
				"https://www.drupal.org/project/video_embed_field/issues/3465381 Drupal 11 compatibility for Video Embed Field" :"https://git.drupalcode.org/project/video_embed_field/-/merge_requests/36.patch"
            },

$ composer require 'drupal/video_embed_field:^2.5' -v

But the patch fails to apply - I have edited the output down to make it a little easier to read through, it is essentailly a list of all the patched files "can't find file to patch at input line..":

Found 1 patches for drupal/video_embed_field.

> post-package-install: cweagans\Composer\Patches_composer_tmp1->postInstall
  - Applying patches for drupal/video_embed_field
    https://git.drupalcode.org/project/video_embed_field/-/merge_requests/36.patch (https://www.drupal.org/project/video_embed_field/issues/3465381 Drupal 11 compatibility for Video Embed Field)
patch "-p1" --no-backup-if-mismatch -d "web/modules/contrib/video_embed_field" < "C:\Users\ice70\AppData\Local\Temp/66fd2fd4c4f7d.patch"
patching file modules/video_embed_media/modules/vem_migrate_oembed/vem_migrate_oembed.info.yml
...
can't find file to patch at input line 767
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/modules/video_embed_media/modules/vem_migrate_oembed/tests/src/Functional/OEmbedUpdateTest.php b/modules/video_embed_media/modules/vem_migrate_oembed/tests/src/Functional/OEmbedUpdateTest.php
|index 1aad766..e90a8c2 100644
|--- a/modules/video_embed_media/modules/vem_migrate_oembed/tests/src/Functional/OEmbedUpdateTest.php
|+++ b/modules/video_embed_media/modules/vem_migrate_oembed/tests/src/Functional/OEmbedUpdateTest.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored

How do I get the MR 36 patch to apply?

🇬🇧United Kingdom ice70

thank you for the reply - but the problem is I am getting log entries for a missing styles.css.map - "style" with an s at the end. My scss / css / library is "style" with no "s" at the end.

I have searched both in code and file names for for "styles." and have not come up with anything. I have no idea what this missing map is for, so I cannot recompile the scss to recreate the .map. 

🇬🇧United Kingdom ice70

ok, have a working patch. Is it a bit of a multi-patch setup, but it does clear the upgrade status warnings. The url to this patch will need to change to the correct link once the file has uploaded ("URL-TO-THIS-PATH/d11-3429553-9.patch"):

"drupal/context":{
" https://www.drupal.org/project/context/issues/3357524 🐛 Calls to function kpr should not exist. Active Calls to KPR" :"https://git.drupalcode.org/project/context/-/merge_requests/35.patch",
" https://www.drupal.org/project/context/issues/3429553 📌 Automated Drupal 11 compatibility fixes for context Needs work D11" : " https://www.drupal.org/files/issues/2024-04-04/context.5.x-dev.rector.patch ",
" https://www.drupal.org/project/context/issues/3429553 📌 Automated Drupal 11 compatibility fixes for context Needs work D11 #9" : "URL-TO-THIS-PATH/d11-3429553-9.patch"
}

🇬🇧United Kingdom ice70

fixed it by using the --prefer-source option:
composer require drupal/custom_body_class --prefer-source

🇬🇧United Kingdom ice70

Hi,
update status reports the following errors:
modules/contrib/multiple_selects/tests/src/Functional/MultipleSelectsWidgetUiTest.php
LINE 21
Usage of deprecated trait Drupal\Tests\field\Traits\EntityReferenceTestTrait in class Drupal\Tests\multiple_selects\Functional\MultipleSelectsWidgetUiTest. Deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait instead.

modules/contrib/multiple_selects/multiple_selects.info.yml
LINE 6
Value of core_version_requirement: ^8 || ^9 || ^10 is not compatible with the next major version of Drupal core. See https://drupal.org/node/3070687.

modules/contrib/multiple_selects/composer.json
LINE 1
The drupal/core requirement is not compatible with the next major version of Drupal. Either remove it or update it to be compatible. See https://www.drupal.org/docs/develop/using-composer/add-a-composerjson-fi... .

🇬🇧United Kingdom ice70

This patch will apply using git, just not via composer / cweagans

🇬🇧United Kingdom ice70

Anyone any ideas why this patch will not apply?

composer install -vv
Removing drupal/custom_body_class (2.0.1)
Loading drupal/custom_body_class (2.0.1) from cache

- Applying patches for drupal/custom_body_class
https://www.drupal.org/files/issues/2024-03-17/custom_body_class.2.0.1.r... ( https://www.drupal.org/project/custom_body_class/issues/3429707 📌 Automated Drupal 11 compatibility fixes for custom_body_class Needs review Drupal 11 compatibility)
patch "-p0" --no-backup-if-mismatch -d "web/modules/contrib/custom_body_class" < "C:\Users\ice70\AppData\Local\Temp/66e434e6c5063.patch"
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/composer.json b/composer.json
|index 14a2b64..4012c07 100644
|--- a/composer.json
|+++ b/composer.json
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 17
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/custom_body_class.info.yml b/custom_body_class.info.yml
|index a07f520..fbf37ec 100644
|--- a/custom_body_class.info.yml
|+++ b/custom_body_class.info.yml
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored

Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2024-03-17/custom_body_class.2.0.1.r...

🇬🇧United Kingdom ice70

Tried both patches just in case there was a difference:
https://www.drupal.org/project/classy/issues/3461089#comment-15720455 🐛 Drupal 11 compatibility Active
https://www.drupal.org/project/classy/issues/3461089#comment-15743743 🐛 Drupal 11 compatibility Active

but both gave the same result in upgrade_status 4.3.5: classy: 1263 warnings found.
They are all depreciation notices, nearly all of the first one in the list:

  1. vendor\symfony\deprecation-contracts\function.php 25 Since twig/twig 3.12: Getting node "filter" on a "Twig\Node\Expression\FilterExpression" class is deprecated
  2. dropbutton-wrapper.html.twig 13 Since twig/twig 3.12: Twig Filter "spaceless" is deprecated. See https://drupal.org/node/3071078.
  3. link-formatter-link-separate.html.twig 15 Since twig/twig 3.12: Twig Filter "spaceless" is deprecated. See https://drupal.org/node/3071078.

  4. select.html.twig 13 Since twig/twig 3.12: Twig Filter "spaceless" is deprecated. See https://drupal.org/node/3071078.
  5. toolbar.html.twig 30 Since twig/twig 3.12: Twig Filter "spaceless" is deprecated. See https://drupal.org/node/3071078.

On php 8.3.11 & drupal 10.3.5

🇬🇧United Kingdom ice70

There is a merge request to fix the " Calls to function kpr should not exist"

https://www.drupal.org/project/context/issues/3357524 🐛 Calls to function kpr should not exist. Active

I applied this via composer / patches:

		"patches": {
			"drupal/context": {
			    "D11":"https://www.drupal.org/files/issues/2024-04-04/context.5.x-dev.rector.patch",
			    "Calls to KPR" :"https://git.drupalcode.org/project/context/-/merge_requests/35.patch"
			}
		},

Using upgrade status 4.3.5, I did not get the remaining errors in https://www.drupal.org/project/context/issues/3429553#comment-15707676 📌 Automated Drupal 11 compatibility fixes for context Needs work instead I got notices that

context/context.info.yml
context/modules/context_ui/context_ui.info.yml

did not have the latest version supported - to fix, I just updated both yml files:

core_version_requirement: ^9.3 || ^10
to
core_version_requirement: ^9.3 || ^10 || ^11

I tried to make a patch for this simple change, but my patch would not apply via composer. It applied fine by git against 5.x :(

🇬🇧United Kingdom ice70

thank you for such a quick response - installed 2.0.1 and /admin/config/people/session-limit now loads up the config form :)

🇬🇧United Kingdom ice70

My apologies, an inherited site with a custom patch applied via composer.

🇬🇧United Kingdom ice70

Hi,
yes, I have just got this locally on Drupal 10.2.3 / php 8.1.26

Went to edit a page: /node/NID/edit
The content type has a single link field and these notices were repeated for a total of 4 times.

But, this did seem to happen after enabling workspaces. When I uninstalled workspaces the errors did not show. BUT, I have used workspaces on other 10.2.3 sites which have not generated these error notices.

Deprecated function: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in Drupal\Core\Url::fromUri() (line 281 of core\lib\Drupal\Core\Url.php).
Drupal\Core\Url::fromUri(NULL, Array) (Line: 175)
Drupal\link\Plugin\Field\FieldType\LinkItem->getUrl() (Line: 27)
Drupal\link\Plugin\Validation\Constraint\LinkTypeConstraintValidator->validate(Object, Object) (Line: 202)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateConstraints(Object, '00000000000006d10000000000000000', Array) (Line: 154)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object) (Line: 164)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object) (Line: 164)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object, Array, 1) (Line: 106)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate(Object, NULL, NULL) (Line: 93)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate(Object) (Line: 132)
Drupal\Core\TypedData\TypedData->validate() (Line: 518)
Drupal\Core\Entity\ContentEntityBase->validate() (Line: 279)
Drupal\workspaces\EntityOperations->entityFormAlter(Array, Object, 'node_publications_edit_form') (Line: 64)
workspaces_form_alter(Array, Object, 'node_publications_edit_form') (Line: 545)
Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'node_publications_edit_form') (Line: 841)
Drupal\Core\Form\FormBuilder->prepareForm('node_publications_edit_form', Array, Object) (Line: 284)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
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: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->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: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)


Deprecated function: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in Drupal\Core\Url::fromUri() (line 284 of core\lib\Drupal\Core\Url.php).
Drupal\Core\Url::fromUri(NULL, Array) (Line: 175)
Drupal\link\Plugin\Field\FieldType\LinkItem->getUrl() (Line: 27)
Drupal\link\Plugin\Validation\Constraint\LinkTypeConstraintValidator->validate(Object, Object) (Line: 202)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateConstraints(Object, '00000000000006d10000000000000000', Array) (Line: 154)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object) (Line: 164)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object) (Line: 164)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object, Array, 1) (Line: 106)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate(Object, NULL, NULL) (Line: 93)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate(Object) (Line: 132)
Drupal\Core\TypedData\TypedData->validate() (Line: 518)
Drupal\Core\Entity\ContentEntityBase->validate() (Line: 279)
Drupal\workspaces\EntityOperations->entityFormAlter(Array, Object, 'node_publications_edit_form') (Line: 64)
workspaces_form_alter(Array, Object, 'node_publications_edit_form') (Line: 545)
Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'node_publications_edit_form') (Line: 841)
Drupal\Core\Form\FormBuilder->prepareForm('node_publications_edit_form', Array, Object) (Line: 284)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
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: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->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: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Deprecated function: str_starts_with(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\Core\Url::fromUri() (line 289 of core\lib\Drupal\Core\Url.php).
Drupal\Core\Url::fromUri(NULL, Array) (Line: 175)
Drupal\link\Plugin\Field\FieldType\LinkItem->getUrl() (Line: 27)
Drupal\link\Plugin\Validation\Constraint\LinkTypeConstraintValidator->validate(Object, Object) (Line: 202)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateConstraints(Object, '00000000000006d10000000000000000', Array) (Line: 154)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object) (Line: 164)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object) (Line: 164)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object, Array, 1) (Line: 106)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate(Object, NULL, NULL) (Line: 93)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate(Object) (Line: 132)
Drupal\Core\TypedData\TypedData->validate() (Line: 518)
Drupal\Core\Entity\ContentEntityBase->validate() (Line: 279)
Drupal\workspaces\EntityOperations->entityFormAlter(Array, Object, 'node_publications_edit_form') (Line: 64)
workspaces_form_alter(Array, Object, 'node_publications_edit_form') (Line: 545)
Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'node_publications_edit_form') (Line: 841)
Drupal\Core\Form\FormBuilder->prepareForm('node_publications_edit_form', Array, Object) (Line: 284)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
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: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->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: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
🇬🇧United Kingdom ice70

@leeksoup, I don't have Forum installed, but I do have Flexible permissions & Group and I can see in flexible_permissions.info.yml

dependencies:
  - 'variationcache:variationcache'

which may be the source of the problem as per the comment below.

🇬🇧United Kingdom ice70

TypeError: Drupal\dynamic_page_cache\EventSubscriber\DynamicPageCacheSubscriber::__construct(): Argument #3 ($cache) must be of type Drupal\Core\Cache\VariationCacheInterface, Drupal\variationcache\Cache\VariationCache given, called in _site\web\core\lib\Drupal\Component\DependencyInjection\Container.php on line 259 in Drupal\dynamic_page_cache\EventSubscriber\DynamicPageCacheSubscriber->__construct() (line 115 of core\modules\dynamic_page_cache\src\EventSubscriber\DynamicPageCacheSubscriber.php).

Drupal\Component\DependencyInjection\Container->createService(Array, 'dynamic_page_cache_subscriber') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('dynamic_page_cache_subscriber') (Line: 105)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.request') (Line: 157)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->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: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

I thought remove_http_headers may have been a problem, but uninstalling it did not bring the site back up. I also have groups installed, but removing that also made no difference.

I have update several other sites to 10.2.2 without this error, so I am thinking it may be down to a module, but without uninstalling everything any ideas on how to track the error source down? 

🇬🇧United Kingdom ice70

Hi @shweta__sharma

[with-select.png] shows the default layout with the taxonomy select that has some really long text.
A gap appears on the left side of the main edit column and the total page width becomes larger than the browser window creating horizontal scrolling. The right side of the page will not be visible from about 1024px, unless the user scrolls to the right shown in [hidden-right-side.png]

[without-select.png] shows the result of deleting the select object via chrome inspection. Once the select has gone, the two columns flow to the browser width and the page remains in the visible area.

When the layout collapses to a single column structure, the select changes to variable width and stays within the visible area [mobile.png] - I had a look around to see how this was working but could not see it to replicate on the higher browser widths.

Thank you for your help.

🇬🇧United Kingdom ice70

ice70 created an issue.

🇬🇧United Kingdom ice70

Hi @andileco

/admin/config/content/charts
- default charting library as Google
- enabling "Use Material Design"
and saved.

Still get the same error [in incognito / hard reload /drupal cache cleared]: Cannot read properties of undefined (reading 'google')

I have a local patch which does the following:

      //const globalOptions = drupalSettings.charts.google.global_options;
      let useMaterialDesign = false;
      let chartType = 'line';

And with this I can get the charts rendering. As the chart settings are defined in the view and they seem to be respected [my testing view has a barm not line chart], I think I should be ok to leave this in place? At least for now?

Thank you for your help :)

🇬🇧United Kingdom ice70

Hi @andileco,
thank you for your reply :)

> 1 - make sure that update.php has been run
Made the update via composer followed by drush updatedb
I think ALL the views with charts went through the update process.
I tried 5.0.x-dev, which also ran through the update process.
There are no more updates available at update.php

> 2 - re-save the charts configuration
on /admin/config/content/charts I tried the following:
- changing the charting library from google to highcharts and save, then back to google and save.
- in google settings, enable material design and save, then disable material design and save - this also generated a warning the missing key outlined in https://www.drupal.org/project/charts/issues/3390787 🐛 Google charts not drawing anything - Undefined array key "use_material_design" Fixed hence the 5.0.x-dev tryout.
Undefined array key "use_material_design" in Drupal\charts_google\Plugin\chart\Library\Google->buildConfigurationForm() (line 113 of \web\modules\contrib\charts\modules\charts_google\src\Plugin\chart\Library\Google.php)

> 3 - re-save charts format settings and their respective views that aren't working
I have little experience with how charts / views work together, so I'll try and keep it as simple as possible hopefully without missing important information.

View is made up of two displays:

Display 1: Attachment to the view block [Display 2]:
Format:
- chart - Google / Bar with Taxonomy term: short description label. Stacking enabled.
- Show: fields, with Provide default field wrapper elements enabled.

Fields:
- content: combination of a
-- content field,
-- taxonomy term [duplicated, one with default and the other with short description]
-- COUNT: content: id
All fields have aggregation. Content and taxonomy set to 'groups results together' and count set to aggregation: count.

Relationships:
- taxonomy term [but not required]

Display 2: View block [and is added to a node via the block layout]:
- Format: table
- The fields / filter / sort / relationship settings look like they are the same as the charts content - it looks like this is a table version of the chart data and this does display on the node is it attached to.

I think the view is ok and when I comment out const globalOptions = drupalSettings.charts.google.global_options and so on as outlined in the first post, the chart displays where & how it is expected.

Are the drupalSettings.charts.google.global_options defined in web/modules/contrib/charts/modules/charts_google/src/Plugin/chart/Library/Google.php ?

    // Setting global options.
    $element['#attached']['drupalSettings']['charts']['google']['global_options'] = [
      'useMaterialDesign' => !empty($this->configuration['use_material_design']) ? 'true' : 'false',
      'chartType' => $element['#chart_type'],
    ];

I am sure this attach is working as is should as a few lines above this we have:
$element['#attached']['library'][] = 'charts_google/google';
Which adds web/modules/contrib/charts/modules/charts_google/js/charts_google.js to the page and I can comment out the drupalSettings.charts.google.global_options that prevents the chart from rendering.

Just the drupalSettings option is not getting through? Should there be something 'global_options' in the DB? I did a DB search for "global_options" and the only value returned was in table key-value:
Collection: post_update
Name: existing_updates
Value: string was part of: charts_highcharts_post_update_set_default_global_options
I did not see a google related one, should there be something similar or have is gone off on a random tangent? :)

Would going back to an earlier 5 version be any use? For example, roll back to the DB with v3.5 installed and then install the first v5 release and update through each release to 5.0.8 from there? Or are all the updates from the first 5 release in the 5.0.8 installation?

Thank you for your help

🇬🇧United Kingdom ice70

This may be related: https://www.drupal.org/project/drupal/issues/3301573 📌 Remove the aggregate stale file threshold and state entry Fixed

Production build 0.71.5 2024