Problem/Motivation

I just updated TWO current local Open Social distributions to accommodate the latest recommended Drupal version 8.9.15 with the same result!!!!!

When the first occurred on one local site, I tried it on a second more disposable distribution with the same error appearing!

Note: Error does not appear for visitors (Not logged in)

Here is one session:

C:\...\2021-2-04-crew-list.beta-D>composer update --with-dependencies
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Package operations: 0 installs, 7 updates, 0 removals
No patches supplied.
Gathering patches for dependencies. This might take a minute.
  - Updating drupal/core-composer-scaffold (9.1.7 => 9.1.8): Loading from cache
  - Updating drupal/core (8.9.14 => 8.9.15): Downloading (100%)
  - Applying patches for drupal/core
    https://www.drupal.org/files/issues/color-optional-html-preview-2844190-2.patch (Color module html preview optional)
    https://www.drupal.org/files/issues/2018-10-26/2528214-47.patch (Restrict images to this site blocks image style derivatives)
    https://www.drupal.org/files/issues/2018-12-28/2580551-72.patch (Optimize getCommentedEntity())
    https://www.drupal.org/files/issues/drupal-994360-74-states-checkboxes-checked.patch (#states cannot check/uncheck 'radios' and 'checkboxes' elements)
    https://www.drupal.org/files/issues/2019-11-14/3007424-68.patch (Multiple usages of FieldPluginBase::getEntity do not check for NULL, leading to WSOD)
    https://www.drupal.org/files/issues/2018-05-24/2974925-default-rid-config-causes-illegal-error.patch (Default role id causes issues with validation on VBO)
    https://www.drupal.org/files/issues/2020-04-17/views-exposed-form-block-args-2821962-30-8.8-notest.patch (Ensure views exposed form in a form block keeps contextual arguments)
    https://www.drupal.org/files/issues/2019-11-19/1091852-104.patch (Display Bug when using #states (Forms API) with Ajax Request)
    https://www.drupal.org/files/issues/2020-09-08/drupal-termstorage-loadTree-lang-3123561-6-d8.patch (Can't specify the language in TermStorage::loadTree)
    https://www.drupal.org/files/issues/2020-12-18/drupal-3188258-aggregation-across-entity-reference-fail-2.patch (Issue #3188258: Aggregation queries fail across entity references)
    https://www.drupal.org/files/issues/2020-12-22/pagination-does-not-work-with-lazy-builder-3189538-2.patch (Pagination does not work correctly for comment fields that are rendered using #lazy_builder)
    https://www.drupal.org/files/issues/2020-12-29/2921093-18.patch (Providing default route value for entity forms is not possible)
  - Updating drupal/gin_toolbar (1.0.0-beta14 => 1.0.0-beta15): Downloading (100%)
  - Updating drupal/geolocation_address (3.3.0 => 3.4.0)
  - Updating drupal/geolocation_leaflet (3.3.0 => 3.4.0)
  - Updating embed/embed (v3.4.15 => v3.4.16): Downloading (100%)
  - Applying patches for embed/embed
    https://www.drupal.org/files/issues/2020-01-31/3110341-vendor-fix-vimeo-adapter.patch (Issue #3110341: Embedded Vimeo videos are sometimes blocked when hosted on cloud hosting)
  - Updating drupal/social_auth_extra dev-1.x (03b01f6 => af9434f):  Checking out af9434fb6c
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package egeloen/http-adapter is abandoned, you should avoid using it. Use php-http/httplug instead.
Writing lock file
Generating autoload files
21 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
C:\...\2021-2-04-crew-list.beta-D>cd html
C:\...\2021-2-04-crew-list.beta-D\html>drush updb -y
The following updates are pending:
node module :
  Add a published filter to the glossary View.
Do you wish to run all pending updates? (y/n): y
Post updating node                                                                                                                    [ok]
Cache rebuild complete.                                                                                                               [ok]
Finished performing updates. 

Nothing unusual that I can see. However, the sites are now unrecoverable, showing the following error which references missing Gin Settings:

The website encountered an unexpected error. Please try again later.
InvalidArgumentException: Class "Drupal\gin\GinSettings" does not exist. in Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (line 24 of core\lib\Drupal\Core\DependencyInjection\ClassResolver.php).
Drupal::classResolver('Drupal\gin\GinSettings') (Line: 57)
gin_toolbar_page_attachments_alter(Array, NULL, NULL) (Line: 539)
Drupal\Core\Extension\ModuleHandler->alter('page_attachments', Array) (Line: 304)
Drupal\Core\Render\MainContent\HtmlRenderer->invokePageAttachmentHooks(Array) (Line: 273)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
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: 50)
Drupal\ban\BanMiddleware->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)

I attempted: composer require drupal/gin_toolbar but that did not resolve the error!

Can anyone assist? I would like to recover this and determine the issue before trying the update in Production (obviously)!
Thanks!

Steps to reproduce

run composer update --with-dependencies

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

bas123 created an issue. See original summary.

bas123’s picture

Issue summary: View changes
bas123’s picture

Issue summary: View changes
taonac’s picture

I'm the getting the same issue. I'm running composer update, so then it updates from 10.0.5 to the latest and it kills the site. Upon checking logs, i can see it's the same error, missing gin settings

corn696’s picture

Gin toolbar beta 15 requires gin alpha34. Open social is locked to beta20.

So i would assume thats the issue here. Try to downgrade gin toolbar or require gin alpha34 as beta20.

ronaldtebrake’s picture

Corn696 is right, i'll open up an issue in gin toolbar for this. There is a hidden dependency there. Hidden as in composer doesn't know it needs a certain Gin version for this to work.

For now. downgrading gin_toolbar seems like the best idea.

For what its worth, we have an open PR for updating to the latest GIN version which should make it in next release as well and will lock the version of the toolbar for older versions.

ronaldtebrake’s picture

dereks’s picture

I'm running into this on a clean install of Open Social. Is there a way to get past the "The website encountered an unexpected error. Please try again later." error?

I've tried changing gin and gin_toolbar in composer, but nothing has helped thus far.

bas123’s picture

Yes, Downgrading Gin Toolbar appears to be the temporary fix

Thank you :)

  1. composer require drupal/gin_toolbar:1.0.0-beta14
  2. No Database updates required
  3. drush cr

This restored the site(s) for me and I have confirmed that the Drupal version is now 8.9.15 and Open Social remains at version 10.1.1.

So, may I ask what are the options until this is resolved?

  1. Go ahead with the composer update --with-dependencies and then downgrade the Gin Toolbar as above?
  2. If there is a line in the composer.json or composer.lock files that should be edited, what would that be?
  3. Update 'drupal/core' only (no dependencies)?
  4. Do not update and wait for this dependency issue to be resolved?
  5. or ???
dereks’s picture

Thanks bas123 - that did the trick for me!

bas123’s picture

@dereks

Just remember this is a temporary fix.

While still waiting for a confirmation, I believe it is reliable to do a full update and then downgrade the Gin Toolbar (as above), if you can wait until Open Social has a release with gin34+, that would be best!

ronaldtebrake’s picture

Status: Active » Fixed

We just released the locked version for gin_toolbar as part of the latest releases
(9.13 / 10.0.9 / 10.1.2)

Also the GIN update has been succesfully reviewed and merged for 10.2.0 which will be released soon so we can also enjoy all the added benefits of that with the latest version of gin_toolbar

working on updating the social_template for those who use that :)

Thanks for all your input!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.