Problem/Motivation

my D11 site is composer installed/managed,

drush status | grep -i version
	Drupal version   : 11.1.0
	PHP version      : 8.4.2
	Drush version    : 13.3.3.0

served up on a linux instance of nginx/1.27.3.

it's got a few added modules installed, and some dummy content populating it.
so, a real-world use case, but not a _large_ install by any stretch.

as advised here

https://www.drupal.org/docs/develop/core-modules-and-themes/core-modules...

"If you installed Drupal with Composer, you will need to update with Composer (https://www.drupal.org/docs/develop/using-composer/manage-dependencies)"

all good, that's the goal; `update_manager` module is DISabled.

but, a site status check reports:

"Update notifications are not enabled. It is highly recommended that you install the Update Manager module from the module administration page in order to stay up-to-date on new releases. For more information, Update status handbook page."

the site _seems_ to be behaving without it through install and inital use.
until _after_ i enable update_manager.

enabling is fine; but subsequently any site access sees this FATAL error:

The website encountered an unexpected error. Try again later.

TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\update\ProjectCoreCompatibility->getPossibleCoreUpdateVersions() (line 83 of core/modules/update/src/ProjectCoreCompatibility.php).

Drupal\update\ProjectCoreCompatibility->__construct(Array, Array, Array) (Line: 106)
update_calculate_project_data(Array) (Line: 40)
update_requirements('runtime')
call_user_func_array('\update_requirements', Array) (Line: 355)
Drupal\Core\Extension\ModuleHandler->{closure:Drupal\Core\Extension\ModuleHandler::invokeAll():354}('\update_requirements', 'update') (Line: 307)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('requirements', Object) (Line: 354)
Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array) (Line: 109)
Drupal\system\SystemManager->listRequirements() (Line: 93)
Drupal\system\SystemManager->checkRequirements() (Line: 122)
Drupal\system\Controller\SystemController->overview('system.admin_config')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext():121}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::onController():96}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
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: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->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: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

simply DISabling (drush pm:uninstall udpate) fixes the issue, and the site's immediately accessible & functional as before.

i suspect (?), but don't yet know, this is due to php version 8.4.2, which i understand Drupal is NOT compatible with.
yet.
but IS on the roadmap.
there's not specific indication of a php problem -- that i've found so far.

not sure if this

Hide and restrict package_manager (and update_manager) behind a dev/prod toggle so that they can be alpha stability in tagged releases
https://www.drupal.org/project/drupal/issues/3483481

includes an option to disable the complaint (?).

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3495587

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pgndrupal created an issue. See original summary.

cilefen’s picture

pgndrupal’s picture

re: 3135663, i'm not on a dev release of core (that was the only option I had in the dropdown). rather i'm on 11.1.0 *release*.

i _do_ keep bumping into these TypeError issues -- so far, somewhat randomly & intermittently (e.g., https://www.drupal.org/project/drupal/issues/3467538#comment-15901089).

atm, in my current state, _this_ is fully repeatable/reproducible, here.

dunno what specific info's helpful; can grab if asked.

pgndrupal’s picture

@cliefen

> 3495587 ... doesn't have a stack trace

the OP here is with
```
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
$config['system.logging']['error_level'] = 'verbose';
```
what specifically are you looking for beyond that? an `strace`? other?

cilefen’s picture

I am seeking to understand if this issue duplicates the previously-reported #3467538: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\update\ProjectCoreCompatibility->getPossibleCoreUpdateVersions. That is all. I wrongly referred back to this very issue in comment 4. Sorry for that confusing comment.

This issue has a stack trace. The other does not. Both issues describe the bug reproduction environment, which I am beginning to think does not influence the bug occurring. Neither has steps to reproduce. There must be some steps to reproduce, even insomuch as an element of the environment may be the reproduction.

The stack trace indicates that $this->existingCoreVersion is an object when it should be a string. How this is happening is a bit of a mystery.

pgndrupal’s picture

> This issue has a stack trace. The other does not.

+1

> Neither has steps to reproduce.

the `drush pm:install update` step is all that's needed to reproduce the behavior, _here_. leaving it UNINSTALLED (i.e., disabled) cures it here ...

i understand you're looking for something that can be reproduced _elsewhere_; i don't have that atm.

i notice that `TranslatableMarkup` seems to be common, at least in some. no idea yet if that's a red-herring or not.

cilefen’s picture

Title: fatal error on `update` module enable on composer-managed D11.1.0 instance » TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\update\ProjectCoreCompatibility->getPossibleCoreUpdateVersions when enabling this module

Are there contributed or custom modules present in the Drupal installation that produces this bug?

pgndrupal’s picture

yes, there are.
no, i've not been able to bisect.
fwiw, in this specific instance here:

  Core                              Announcements (announcements_feed)                                                  Enabled    11.1.0
  Core                              BigPipe (big_pipe)                                                                  Enabled    11.1.0
  Core                              Block (block)                                                                       Enabled    11.1.0
  Core                              Block Content (block_content)                                                       Enabled    11.1.0
  Core                              Breakpoint (breakpoint)                                                             Enabled    11.1.0
  Core                              CKEditor 5 (ckeditor5)                                                              Enabled    11.1.0
  Core                              Comment (comment)                                                                   Enabled    11.1.0
  Core                              Configuration Manager (config)                                                      Enabled    11.1.0
  Core                              Contact (contact)                                                                   Enabled    11.1.0
  Core                              Contextual Links (contextual)                                                       Enabled    11.1.0
  Field types                       Datetime (datetime)                                                                 Enabled    11.1.0
  Core                              Database Logging (dblog)                                                            Enabled    11.1.0
  Core                              Internal Dynamic Page Cache (dynamic_page_cache)                                    Enabled    11.1.0
  Core                              Text Editor (editor)                                                                Enabled    11.1.0
  Core                              Field (field)                                                                       Enabled    11.1.0
  Core                              Field UI (field_ui)                                                                 Enabled    11.1.0
  Field types                       File (file)                                                                         Enabled    11.1.0
  Core                              Filter (filter)                                                                     Enabled    11.1.0
  Core                              Help (help)                                                                         Enabled    11.1.0
  Core                              History (history)                                                                   Enabled    11.1.0
  Field types                       Image (image)                                                                       Enabled    11.1.0
  Field types                       Link (link)                                                                         Enabled    11.1.0
  Core                              Custom Menu Links (menu_link_content)                                               Enabled    11.1.0
  Core                              Menu UI (menu_ui)                                                                   Enabled    11.1.0
  Core                              MySQL (mysql)                                                                       Enabled    11.1.0
  Core                              Node (node)                                                                         Enabled    11.1.0
  Field types                       Options (options)                                                                   Enabled    11.1.0
  Core                              Internal Page Cache (page_cache)                                                    Enabled    11.1.0
  Core                              Path (path)                                                                         Enabled    11.1.0
  Core                              Path alias (path_alias)                                                             Enabled    11.1.0
  Core                              Search (search)                                                                     Enabled    11.1.0
  Core                              Shortcut (shortcut)                                                                 Enabled    11.1.0
  Core                              System (system)                                                                     Enabled    11.1.0
  Core                              Taxonomy (taxonomy)                                                                 Enabled    11.1.0
  Field types                       Text (text)                                                                         Enabled    11.1.0
  Core                              Toolbar (toolbar)                                                                   Enabled    11.1.0
  Core                              Update Manager (update)                                                             Disabled   11.1.0
  Core                              User (user)                                                                         Enabled    11.1.0
  Core                              Views (views)                                                                       Enabled    11.1.0
  Core                              Views UI (views_ui)                                                                 Enabled    11.1.0
  Administration                    Admin Toolbar (admin_toolbar)                                                       Enabled    3.5.1
  Administration                    Admin Toolbar Search (admin_toolbar_search)                                         Enabled    3.5.1
  Administration                    Admin Toolbar Extra Tools (admin_toolbar_tools)                                     Enabled    3.5.1
  Other                             Composer Deploy (composer_deploy)                                                   Enabled    8.x-1.10
  Development                       Devel (devel)                                                                       Enabled    5.3.1
  Encryption                        Encrypt (encrypt)                                                                   Enabled    8.x-3.2
  Spam control                      Honeypot (honeypot)                                                                 Enabled    2.2.0
  Security                          Key (key)                                                                           Enabled    8.x-1.19
  Mail                              Mail System (mailsystem)                                                            Enabled    8.x-4.5
  Other                             Pathauto (pathauto)                                                                 Enabled    8.x-1.13
  Other                             Redirect (redirect)                                                                 Enabled    8.x-1.10
  Performance                       Redis (redis)                                                                       Enabled    8.x-1.8+3-dev
  Security                          Security Review (security_review)                                                   Enabled    3.1.1
  Mail                              SMTP Authentication Support (smtp)                                                  Enabled    8.x-1.4
  Security                          Sodium (sodium)                                                                     Enabled    3.0.0
  Security                          Two-factor Authentication (TFA) (tfa)                                               Enabled    8.x-1.9
  Other                             Token (token)                                                                       Enabled    8.x-1.15
  Webform                           Webform Devel (webform_devel)                                                       Enabled    6.3.0-alpha3+7-dev
  Webform                           Webform UI (webform_ui)                                                             Enabled    6.3.0-alpha3+7-dev
  Webform                           Webform (webform)                                                                   Enabled    6.3.0-alpha3+7-dev
  Core                              Claro (claro)                                                                       Enabled    11.1.0
  Core                              Olivero (olivero)                                                                   Enabled    11.1.0

with _that_ simply enabling `udpate` causes the error.
the only logs i've seen, i've shared.

cilefen’s picture

At a glance it may be composer_deploy, because it modifies update information. I would try uninstalling it first.

pgndrupal’s picture

it was already happening prior to `composer_deploy` installation; i'd installed that while attempting to deal with this.

that said, specifically,

drush pm:uninstall composer_deploy
drush pm:install update

and, immediately, at nav to `https://example.com/admin/config`

The website encountered an unexpected error. Try again later.

TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\update\ProjectCoreCompatibility->getPossibleCoreUpdateVersions() (line 83 of core/modules/update/src/ProjectCoreCompatibility.php). 
...
cilefen’s picture

Is it still the case when the module code is not present? Update manager looks at all present extensions.

cilefen’s picture

For what it's worth that site doesn't have any particularly rare modules. I am trying to remember whether (and where) update data is cached...

pgndrupal’s picture

as above

drush pm:install update
drush pm:uninstall composer_deploy

*AND*

composer remove composer_deploy
drush cr

composer show | grep -iE "deploy|update"
	(empty)
drush pm:list  | grep -iE "deploy|update"
	Core         Update Manager (update)            Enabled    11.1.0

now, NO WSOD error at /admin/*; poking around the site, can't atm get it to replicate.

if not a fluke, `drush pm:uninstall composer_deploy` does not seem sufficient?

also, now, checking status report @ https://example.com/admin/reports/status#warning ,

1 warning

Drupal core update status
	No update data available
	No update information available. Run cron or check manually.

Cron maintenance tasks
	Last run 3 seconds ago
	(more information)

re-exec'ing cron doesn't cure.

i can't find it in my scribbled notes atm, but iirc, composer_deploy was supposed to solve for the missing update info in a composer-installed Drupal instance

godotislate’s picture

The TypeError exception is being thrown at this line:
if (!isset($core_releases[$this->existingCoreVersion])) {

$this->existingCoreVersion is set in the class constructor like so: $this->existingCoreVersion = $core_data['existing_version'];.

AFAICT, the only time in core that the 'existing_version' property can be set to TranslatableMarkup is in core/modules/update/update.compare.inc:

if (isset($info['version'])) {
  <snip ...>
}
else {
  // No version info available at all.
  $install_type = 'unknown';
  $info['version'] = t('Unknown');
  $info['major'] = -1;
}

// Finally, save the results we care about into the $projects array.
$projects[$key]['existing_version'] = $info['version'];

I'm not sure how to get in a state where version info for Drupal core itself would be missing, but it's possible that the composer_deploy module touches some of that metadata, so there might be something in there that causes the version to get unset.

Nevertheless, the code in ProjectCoreCompatibility can be hardened to detect whether the existing version is not a string, using logic similar to what Package Manager does:

if ($existing_version instanceof TranslatableMarkup && $existing_version->getUntranslatedString() === 'Unknown') {

So in ProjectCoreCompatibility, it could look something like:

  public function __construct(array $core_data, array $core_releases, array $supported_branches) {
    if (isset($core_data['existing_version'])) {
      $this->existingCoreVersion = $core_data['existing_version'] instanceof TranslatableMarkup ? $core_data['existing_version']->getUntranslatedString() ? $core_data['existing_version'];
      $this->possibleCoreUpdateVersions = $this->getPossibleCoreUpdateVersions($core_releases, $supported_branches);
    }
  }

Alternatively, probably should consider enforcing version to be a string (making it translatable doesn't make much sense IMHO), so
changing $info['version'] = t('Unknown'); to $info['version'] = 'Unknown'; might be a good place to start. That code dates back a long way (at least to 2007?), though, so not sure if there'd be any side effects from doing that.

godotislate’s picture

Version: 11.1.x-dev » 11.x-dev

godotislate’s picture

For a workaround until someone identifies the bug in Composer Deploy or there's consensus on a fix otherwise, I put up MR 10669 with the ProjectCoreCompatibility constructor change mentioned in #15. The diff can be downloaded and applied locally as a patch.

pgndrupal’s picture

fwiw, confirming

drush core-status | grep -i version
	Drupal version   : 11.1.0 <--- release, not dev branch
	PHP version      : 8.4.2
	Drush version    : 13.3.3.0

pushd web
curl -s https://git.drupalcode.org/project/drupal/-/merge_requests/10669.diff |  patch -p1
	patching file core/modules/update/src/ProjectCoreCompatibility.php

popd

composer require drupal/composer_deploy
drush pm:install composer_deploy

drush pm:list | grep -iE "deploy|update"
  Core                              Update Manager (update)                     Enabled    11.1.0
  Other                             Composer Deploy (composer_deploy)           Enabled    8.x-1.10

no more FATAL error, so far. the two mods can coexist.

@ status report, i DO see now/still,

Warnings found
	Drupal core update status
	No update data available
	No update information available. Run cron or check manually.
cilefen’s picture

Issue tags: -Possible duplicate

"No update information available" is a separate matter. There is a large volume of posts online about that dating back many years. The causes can vary, but include issues such as an inability of the initiating process to access the updates domain via HTTP, occasional minor outages of the updates feed, and other reasons. It should be investigated with those resources instead of here.

Is it now established that the cause is composer_deploy? The existing_version string being translatable doesn't actually make sense so if "yes" we should probably move this issue to that project's queue.

pgndrupal’s picture

> separate matter

+1

> move this issue

i'm fairly sure -- not 100% -- i've seen these TypeErrors crop up elsewhere, before i composer installed composer_deploy.

but i've been only been able to reproduce it reliably in this case.

the 'hardening fix' in #15 appears to work in this case -- but appears more general.

if the fix _is_ sane, shouldn't it be applied in core, not 'just' in composer_deploy?

cilefen’s picture

Sure but I have to ask: What is the use-case for a version string being translatable markup? It seems like a mistake.

Take, for example, this code from the package_manager module:

if (!is_string($existing_version)) {
        return NULL;
}
pgndrupal’s picture

> what is the use-case

ok, i'm the wrong person to comment -- too new to speak to Drupal-at-large.

best i can confirm is that the MR workaround works, in this case, to solve the coexistence of update and composer_deploy.
whether that's the _right_ fix, got me atm; @godotislate would be a more reliable source. and, whether or not this moves to module queue ...

if the same/similar _error_ surfaces here under difference circumstances, i'll add/open as needed.

EDIT

fwiw, i've gotten two reports from others -- a bit stale now -- of TypeErrors with use of `dotenv` module.
i'll see if i can dig up more re: the specifics; i use `vlucas/phpdotenv` instead, so can't say yay/nay for my local install.

pgndrupal’s picture

on a new iteration of D11 install, with fewer overall added modules,

	Core                  Announcements (announcements_feed)                 Enabled    11.1.0
	Core                  Automated Cron (automated_cron)                    Enabled    11.1.0
	Core                  BigPipe (big_pipe)                                 Enabled    11.1.0
	Core                  Block (block)                                      Enabled    11.1.0
	Core                  Block Content (block_content)                      Enabled    11.1.0
	Core                  Breakpoint (breakpoint)                            Enabled    11.1.0
	Core                  CKEditor 5 (ckeditor5)                             Enabled    11.1.0
	Core                  Comment (comment)                                  Enabled    11.1.0
	Core                  Configuration Manager (config)                     Enabled    11.1.0
	Core                  Contact (contact)                                  Enabled    11.1.0
	Core                  Contextual Links (contextual)                      Enabled    11.1.0
	Field types           Datetime (datetime)                                Enabled    11.1.0
	Core                  Database Logging (dblog)                           Enabled    11.1.0
	Core                  Internal Dynamic Page Cache (dynamic_page_cache)   Enabled    11.1.0
	Core                  Text Editor (editor)                               Enabled    11.1.0
	Core                  Field (field)                                      Enabled    11.1.0
	Core                  Field UI (field_ui)                                Enabled    11.1.0
	Field types           File (file)                                        Enabled    11.1.0
	Core                  Filter (filter)                                    Enabled    11.1.0
	Core                  Help (help)                                        Enabled    11.1.0
	Core                  History (history)                                  Enabled    11.1.0
	Field types           Image (image)                                      Enabled    11.1.0
	Field types           Link (link)                                        Enabled    11.1.0
	Core                  Custom Menu Links (menu_link_content)              Enabled    11.1.0
	Core                  Menu UI (menu_ui)                                  Enabled    11.1.0
	Core                  MySQL (mysql)                                      Enabled    11.1.0
	Core                  Node (node)                                        Enabled    11.1.0
	Field types           Options (options)                                  Enabled    11.1.0
	Core                  Internal Page Cache (page_cache)                   Enabled    11.1.0
	Core                  Path (path)                                        Enabled    11.1.0
	Core                  Path alias (path_alias)                            Enabled    11.1.0
	Core                  Search (search)                                    Enabled    11.1.0
	Core                  Shortcut (shortcut)                                Enabled    11.1.0
	Core                  System (system)                                    Enabled    11.1.0
	Core                  Taxonomy (taxonomy)                                Enabled    11.1.0
	Field types           Text (text)                                        Enabled    11.1.0
	Core                  Toolbar (toolbar)                                  Enabled    11.1.0
	Core                  Update Manager (update)                            Enabled    11.1.0
	Core                  User (user)                                        Enabled    11.1.0
	Core                  Views (views)                                      Enabled    11.1.0
	Core                  Views UI (views_ui)                                Enabled    11.1.0
	Other                 Composer Deploy (composer_deploy)                  Enabled    8.x-1.10
	Core                  Claro (claro)                                      Enabled    11.1.0
	Core                  Olivero (olivero)                                  Enabled    11.1.0

in particular

drush pm:list | grep -i deploy
	Other                 Composer Deploy (composer_deploy)                  Enabled    8.x-1.10
composer show | grep -i deploy
	drupal/composer_deploy                   1.10.0  Provide version number from composers lockfile.

@ nav to:

https://example.com/admin/config

now get another TypeError, tho different,

	The website encountered an unexpected error. Try again later.

	TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\update\ProjectSecurityData->getCoverageInfo() (line 126 of core/modules/update/src/ProjectSecurityData.php).

	update_requirements('runtime')
	call_user_func_array('\update_requirements', Array) (Line: 355)
	Drupal\Core\Extension\ModuleHandler->{closure:Drupal\Core\Extension\ModuleHandler::invokeAll():354}('\update_requirements', 'update') (Line: 307)
	Drupal\Core\Extension\ModuleHandler->invokeAllWith('requirements', Object) (Line: 354)
	Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array) (Line: 109)
	Drupal\system\SystemManager->listRequirements() (Line: 93)
	Drupal\system\SystemManager->checkRequirements() (Line: 122)
	Drupal\system\Controller\SystemController->overview('system.admin_config')
	call_user_func_array(Array, Array) (Line: 123)
	Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext():121}() (Line: 593)
	Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
	Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
	Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::onController():96}() (Line: 183)
	Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
	Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
	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: 116)
	Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 90)
	Drupal\page_cache\StackMiddleware\PageCache->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: 51)
	Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
	Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

repeating

drush pm:uninstall composer_deploy
composer remove drupal/composer_deploy
drush cr
systemctl restart php-fpm nginx

cures it locally, again.
nav to:

https://example.com/admin/config

works fine.

cilefen’s picture

Project: Drupal core » Composer Deploy
Version: 11.x-dev » 8.x-1.x-dev
Component: update.module » Code
Status: Postponed (maintainer needs more info) » Active
pgndrupal’s picture

@cliefen

i note your reassignment.

fyi, now on another install, with NO attempt to install composer_deploy at all

The website encountered an unexpected error. Try again later.

TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\update\ProjectCoreCompatibility->getPossibleCoreUpdateVersions() (line 83 of core/modules/update/src/ProjectCoreCompatibility.php).

Drupal\update\ProjectCoreCompatibility->__construct(Array, Array, Array) (Line: 106)
update_calculate_project_data(Array) (Line: 40)
update_requirements('runtime')
call_user_func_array('\update_requirements', Array) (Line: 355)
Drupal\Core\Extension\ModuleHandler->{closure:Drupal\Core\Extension\ModuleHandler::invokeAll():354}('\update_requirements', 'update') (Line: 307)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('requirements', Object) (Line: 354)
Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array) (Line: 109)
Drupal\system\SystemManager->listRequirements() (Line: 93)
Drupal\system\SystemManager->checkRequirements() (Line: 122)
...

it's again on an early stage install. don't yet know WHY it's occurring, but can say -- on this instance -- there's NO composer_deploy.

i simply don't know what the cause is. `composer_deploy` is reproducibly involved with the issue.
but does NOT seem to be the sole module in play here ....

pgndrupal’s picture

fyi, yet another instance, different module,

https://www.drupal.org/project/redis/issues/3496126

cilefen’s picture

Project: Composer Deploy » Drupal core
Version: 8.x-1.x-dev » 11.1.x-dev
Component: Code » ajax system
Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs steps to reproduce
cilefen’s picture

Component: ajax system » base system
cilefen’s picture

Component: base system » update.module

This happens with or without contributed modules but the reproduction steps remain a bit unclear. We need technically-detailed evidence of the root cause. If that cause is definitively the composer_deploy module based on evidence, ideally including debugging function parameter data, please move this issue back there.

pgndrupal’s picture

atm, still with php 8.4, the following reproduces a "TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty ..." error -- here.

and, yes, i understand that this may _still_ not be 'vanilla' enough :-/
just reporting atm; test with php 8.3 in on my ToDo list ...

composer --version
  Composer version 2.8.4 2024-12-11 11:57:47
  PHP version 8.4.2 (/usr/bin/php)

composer create-project -vvv \
 --remove-vcs \
 --stability stable \
 --no-interaction \
 --no-install \
drupal/recommended-project my.app

(verbose output, as requested)

	Running 2.8.4 (2024-12-11 11:57:47) with PHP 8.4.2 on Linux / 6.12.6-200.fc41.x86_64
	Reading ./composer.json (/srv/my.app/drupal/composer.json)
	Loading config file /var/lib/wwwrun/.config/composer/config.json
	Loading config file /var/lib/wwwrun/.config/composer/auth.json
	Loading config file ./composer.json (/srv/my.app/drupal/composer.json)
	Checked CA file /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem: valid
	Executing command (/srv/my.app/drupal): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
	Executing command (/srv/my.app/drupal): 'git' 'describe' '--exact-match' '--tags'
	Executing command (CWD): 'git' '--version'
	Executing command (/srv/my.app/drupal): 'git' 'log' '--pretty=%H' '-n1' 'HEAD' '--no-show-signature'
	Executing command (/srv/my.app/drupal): 'hg' 'branch'
	Executing command (/srv/my.app/drupal): 'fossil' 'branch' 'list'
	Executing command (/srv/my.app/drupal): 'fossil' 'tag' 'list'
	Executing command (/srv/my.app/drupal): 'svn' 'info' '--xml'
	Reading /var/lib/wwwrun/.config/composer/composer.json
	Loading config file /var/lib/wwwrun/.config/composer/config.json
	Loading config file /var/lib/wwwrun/.config/composer/auth.json
	Loading config file /var/lib/wwwrun/.config/composer/composer.json (/var/lib/wwwrun/.config/composer/composer.json)
	Loading config file /var/lib/wwwrun/.config/composer/auth.json
	Reading /var/lib/wwwrun/.config/composer/auth.json
	Reading ./composer.lock (/srv/my.app/drupal/composer.lock)
	Reading /srv/my.app/drupal/vendor/composer/installed.json
	Reading /var/lib/wwwrun/.config/composer/vendor/composer/installed.json
	Loading plugin PHPCSStandards\Composer\Plugin\Installers\PHPCodeSniffer\Plugin (from dealerdirect/phpcodesniffer-composer-installer, installed globally)
	Loading plugin Symfony\Thanks\Thanks (from enumag/no-thanks, installed globally)
	Creating a "drupal/recommended-project" project at "./my.app"
	Loading config file /var/lib/wwwrun/.config/composer/config.json
	Loading config file /var/lib/wwwrun/.config/composer/auth.json
	Executing command (/srv/my.app/drupal): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
	Executing command (/srv/my.app/drupal): 'git' 'describe' '--exact-match' '--tags'
	Executing command (/srv/my.app/drupal): 'git' 'log' '--pretty=%H' '-n1' 'HEAD' '--no-show-signature'
	Executing command (/srv/my.app/drupal): 'hg' 'branch'
	Executing command (/srv/my.app/drupal): 'fossil' 'branch' 'list'
	Executing command (/srv/my.app/drupal): 'fossil' 'tag' 'list'
	Executing command (/srv/my.app/drupal): 'svn' 'info' '--xml'
	Reading /var/lib/wwwrun/.config/composer/composer.json
	Loading config file /var/lib/wwwrun/.config/composer/config.json
	Loading config file /var/lib/wwwrun/.config/composer/auth.json
	Loading config file /var/lib/wwwrun/.config/composer/composer.json (/var/lib/wwwrun/.config/composer/composer.json)
	Loading config file /var/lib/wwwrun/.config/composer/auth.json
	Reading /var/lib/wwwrun/.config/composer/auth.json
	Reading /var/lib/wwwrun/.config/composer/vendor/composer/installed.json
	Loading plugin PHPCSStandards\Composer\Plugin\Installers\PHPCodeSniffer\Plugin_composer_tmp0 (from dealerdirect/phpcodesniffer-composer-installer, installed globally)
	Loading plugin Symfony\Thanks\Thanks_composer_tmp1 (from enumag/no-thanks, installed globally)
	Reading /var/lib/wwwrun/.cache/composer/repo/https---repo.packagist.org/packages.json from cache
	Downloading https://repo.packagist.org/packages.json if modified
	[200] https://repo.packagist.org/packages.json
	Writing /var/lib/wwwrun/.cache/composer/repo/https---repo.packagist.org/packages.json into cache
	Reading /var/lib/wwwrun/.cache/composer/repo/https---repo.packagist.org/provider-drupal~recommended-project.json from cache
	Downloading https://repo.packagist.org/p2/drupal/recommended-project.json if modified
	[304] https://repo.packagist.org/p2/drupal/recommended-project.json
	Installing drupal/recommended-project (11.1.0)
	Reading /var/lib/wwwrun/.cache/composer/files/drupal/recommended-project/2f839695071013c63418691310a8fcebf73fb5a8.zip from cache
	  - Loading drupal/recommended-project (11.1.0) from cache
	  - Installing drupal/recommended-project (11.1.0): Extracting archive
	Executing async command (CWD): '/usr/bin/unzip' '-qq' '/srv/my.app/drupal/my.app/vendor/composer/tmp-98e2be5d68de2a710c413920df0e7f21.zip' '-d' '/srv/my.app/drupal/my.app/vendor/composer/28beb40a'
	Executing async command (CWD): 'rm' '-rf' '/srv/my.app/drupal/my.app/vendor/composer/28beb40a'
	Downloading https://packagist.org/downloads/
	[201] https://packagist.org/downloads/
	Created project in /srv/my.app/drupal/my.app
	Reading ./composer.json (/srv/my.app/drupal/my.app/composer.json)
	Loading config file /var/lib/wwwrun/.config/composer/config.json
	Loading config file /var/lib/wwwrun/.config/composer/auth.json
	Loading config file ./composer.json (/srv/my.app/drupal/my.app/composer.json)
	Reading /var/lib/wwwrun/.config/composer/composer.json
	Loading config file /var/lib/wwwrun/.config/composer/config.json
	Loading config file /var/lib/wwwrun/.config/composer/auth.json
	Loading config file /var/lib/wwwrun/.config/composer/composer.json (/var/lib/wwwrun/.config/composer/composer.json)
	Loading config file /var/lib/wwwrun/.config/composer/auth.json
	Reading /var/lib/wwwrun/.config/composer/auth.json
	Reading /var/lib/wwwrun/.config/composer/vendor/composer/installed.json
	Loading plugin PHPCSStandards\Composer\Plugin\Installers\PHPCodeSniffer\Plugin_composer_tmp2 (from dealerdirect/phpcodesniffer-composer-installer, installed globally)

webd
composer require drush/drush

drush site-install standard -y \
 --db-url="${_THIS_DB_URL}" \
 --db-prefix="pfx_" \
 --locale=en \
 --account-mail="${_ADMIN_EMAIL}" \
 --account-name=${_ADMIN_USR} \
 --account-pass=$(_ADMIN_PASS) \
 --site-name="${_SITE_NAME}" \
 --site-mail="${_SITE_EMAIL}" \
 --sites-subdir="${_SITE_DIR}" \
install_configure_form.enable_update_status_emails=NULL

composer update

composer require vlucas/phpdotenv --ignore-platform-req=ext-ctype -W
composer dump-autoload

cat << EOF > .env
APP_ENV=prod
EOF

cat << EOF > .env.local
APP_ENV=dev
EOF

cat << EOF > .env.dev.local
TEST_ENV_VAR='blah'
EOF

(switch to manual DB settings, as `drush` DB socket support is broken)
EDIT web/sites/default/settings.php

	<?php

	\$dotenv = Dotenv\Dotenv::createImmutable(
	  __DIR__ . '/../../../',
	  [
	    '.env',
	    '.env.local',
	    '.env.dev.local',
	    '.env.prod.local',
	  ],
	  false
	);
	$dotenv->safeLoad();

	error_reporting(E_ALL);
	ini_set('display_errors', TRUE);
	ini_set('display_startup_errors', TRUE);
	$config['system.logging']['error_level'] = 'verbose';

	...
	( ... project, site & DB settings and configs ...)


drush pm:uninstall dblog
drush pm:install syslog
composer require symfony/var-dumper

composer require drupal/redis:dev-1.x
drush pm:install redis

@ login/nav to --> https://example.com/admin/config/

FAILs, with similar error as reported

dww’s picture

Issue tags: +Bug Smash Initiative

Disclaimer: it's a bug in update.module* that the error case for an unknown version string ends up as a fatal error. We should probably fix that, regardless of why your site has no version info for core.

Meanwhile, the most useful things for me to understand this would be:

  1. The entire contents of core/modules/node/node.info.yml on the site where this is happening
  2. The VERSION const from core/lib/Drupal.php

Looking at the output posted above, I notice:

composer require drupal/redis:dev-1.x

Which means you're asking for a "dev tarball". For that case, I'd also love to see:

  • The entire contents of modules/contrib/redis/redis.info.yml
  • If modules/contrib/redis/.git exists. Is it a git checkout?

To add another variable to the mix, if you're using a Git checkout of any part of Drupal (core or contrib), you need to use git_deploy for update.module to work. I'm less familiar with composer_deploy.

cilefen’s picture

I don't understand the unknown string angle. It's a type error where the type is Drupal\Core\StringTranslation\TranslatableMarkup, and objects can't be array indexes (aka "offsets").

dww’s picture

See comment #15. It’s being set to the translatable string “Unknown” but then being treated like an actual version string, which we fail to parse.

  1. It’s a problem that this user’s site has no version info.
  2. It’s a bug that in this case, update.module now does fatal errors, instead of gracefully handling the problem.
cilefen’s picture

Understood. Thank you for that clarification.

pgndrupal’s picture

@dww

in reply to #32

> ... bug in update.module* that ... should probably fix that ...

need a separate bug for that? any specific info that helps?

> The entire contents of core/modules/node/node.info.yml on the site where this is happening

cat web/core/modules/node/node.info.yml
	name: Node
	type: module
	description: 'Manages the creation, configuration, and display of the main site content.'
	package: Core
	version: VERSION
	configure: entity.node_type.collection
	dependencies:
	  - drupal:text

> The VERSION const from core/lib/Drupal.php

grep " VERSION" web/core/lib/Drupal.php
  const VERSION = '11.1.0';

> Looking at the output posted above, I notice:

just to remind, i don't see these TypeError messages only with redis.

> composer require drupal/redis:dev-1.x

yes. specifically

composer require drupal/redis:dev-1.x
composer show | grep drupal/redis
	drupal/redis          dev-1.x c538120   Integration of Drupal with the Redis key-value store. 

where

https://git.drupalcode.org/project/redis/-/commit/c53812040dd4ccec95d75b...

solves

https://www.drupal.org/project/redis/issues/3494308

> The entire contents of modules/contrib/redis/redis.info.yml

cat web/modules/contrib/redis/redis.info.yml
	name: Redis
	description: Provide a module placeholder, for using as dependency for module that needs Redis.
	package: Performance
	type: module
	core_version_requirement: ^9.3 || ^10 || ^11
	configure: redis.report
	php: 7.1.0

> If modules/contrib/redis/.git exists.

it does,

	ls -ald web/modules/contrib/redis/.git
		drwxrwx---+ 8 wwwrun www 4.0K Dec 27 22:15 web/modules/contrib/redis/.git/

> Is it a git checkout?

i did not check it out; simply installed with

composer require drupal/redis:dev-1.x

> if you're using a Git checkout of any part of Drupal (core or contrib)

i do not. the project was composer-created, with '--remove-vcs' opt, all modules are composer/drush managed, and i have not yet init'd git for my own vcs at this stage.

> you need to use git_deploy for update.module to work. I'm less familiar with composer_deploy.

my initial understanding was that composer_deploy was to be used in a composer-managed install.
i tried it initially, only to bump into the TypeError again with that module.

pgndrupal’s picture

this is about as simple a reproducer as i'll manage here.

i can generate a similar FAIL reliably, below.

*NO* additional modules are required.
simply disabling `automated_cron`, so as to use external cron, is sufficient.

mariadb -e "DROP DATABASE IF EXISTS ${_DB_NAME};"

_PROFILE="drupal/recommended-project"
_STABILITY="stable"

composer create-project  \
 --remove-vcs \
 --stability ${_STABILITY} \
 --no-interaction \
 --no-install \
${_PROFILE} my.app

cd my.app
composer update

composer require drush/drush

_THIS_DB_URL="mysql://${_DB_USR}:${_DB_USR_PWD}@localhost/${_DB_NAME}?unix_socket=${_DB_UNIX_SOCK}&serverVersion=${_DB_VER}&charset=utf8mb4"

mariadb -e "DROP DATABASE IF EXISTS ${_DB_NAME};"

drush site-install standard -y \
 --db-url="${_THIS_DB_URL}" \
 --db-prefix="pfx_" \
 --locale=en \
 --account-mail="${_ADMIN_EMAIL}" \
 --account-name=${_ADMIN_USR} \
 --account-pass=${_ADMIN_PWD} \
 --site-name="${_SITE_NAME}" \
 --site-mail="${_SITE_EMAIL}" \
 --sites-subdir="${_SITE_DIR}" \
install_configure_form.enable_update_status_emails=NULL

cat << EOF > web/sites/default/settings.php
<?php

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
\$config['system.logging']['error_level'] = 'verbose';
\$config['automated_cron.settings']['interval'] = 0;

\$databases = [];
\$databases['default']['default'] = [
  'database' => '${_DB_NAME}',
  'username' => '${_DB_USR}',
  'password' => '${_DB_USR_PWD}',
  'prefix' => '${_DB_PREFIX}',
  'host' => 'localhost',
  'port' => '',
  'unix_socket' => '${_DB_UNIX_SOCK}',
  'isolation_level' => 'READ COMMITTED',
  'driver' => 'mysql',
  'namespace' => 'Drupal\\mysql\\Driver\\Database\\mysql',
  'autoload' => 'core/modules/mysql/src/Driver/Database/mysql/',
];

\$settings = [
  'hash_salt' => '${_HASH_SALT}',
];
EOF

drush cr

nav to:

https://example.com/admin/config/

GOOD

simply DISABLE (uninstall) `automated_cron`

drush pm:uninstall automated_cron
drush cr

nav to:

https://example.com/admin/config/

FAIL, with

The website encountered an unexpected error. Try again later.

TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\update\ProjectCoreCompatibility->getPossibleCoreUpdateVersions() (line 83 of core/modules/update/src/ProjectCoreCompatibility.php).
...
pgndrupal’s picture

repeating same procedure from scratch, but with php 8.4 -> 8.3,

php -v
PHP 8.3.15 (cli) (built: Dec 17 2024 18:18:02) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.3.15, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.15, Copyright (c), by Zend Technologies
    with Xdebug v3.4.0, Copyright (c) 2002-2024, by Derick Rethans

still FAILs, as above,

The website encountered an unexpected error. Try again later.

TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\update\ProjectCoreCompatibility->getPossibleCoreUpdateVersions() (line 83 of core/modules/update/src/ProjectCoreCompatibility.php). 
...
pgndrupal’s picture

nav to .../admin/config

on one of many similar ERROR

	The website encountered an unexpected error. Try again later.

	TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\update\ProjectCoreCompatibility->getPossibleCoreUpdateVersions() (line 83 of core/modules/update/src/ProjectCoreCompatibility.php).

	Drupal\update\ProjectCoreCompatibility->__construct(Array, Array, Array) (Line: 106)
	update_calculate_project_data(Array) (Line: 40)
	update_requirements('runtime') (Line: 93)

@

cat core/modules/update/src/ProjectCoreCompatibility.php

	  protected function getPossibleCoreUpdateVersions(array $core_releases, array $supported_branches) {
83	    if (!isset($core_releases[$this->existingCoreVersion])) {
	      // If we can't determine the existing version of core then we can't
	      // calculate the core compatibility of a given release based on core
	      // versions after the existing version.
	      return [];
	    }

EDIT core/modules/update/src/ProjectCoreCompatibility.php

64	  public function __construct(array $core_data, array $core_releases, array $supported_branches) {
	    if (isset($core_data['existing_version'])) {
	      $this->existingCoreVersion = $core_data['existing_version'];
-	      $this->possibleCoreUpdateVersions = $this->getPossibleCoreUpdateVersions($core_releases, $supported_branch
+	      //$this->possibleCoreUpdateVersions = $this->getPossibleCoreUpdateVersions($core_releases, $supported_branch
	    }
	  }

re-nav to .../admin/config

ERROR

	The website encountered an unexpected error. Try again later.

	TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\update\ProjectSecurityData->getCoverageInfo() (line 126 of core/modules/update/src/ProjectSecurityData.php). 

@

cat core/modules/update/src/ProjectSecurityData.php

	  public function getCoverageInfo() {
126	    if (empty($this->releases[$this->existingVersion])) {
	      // If the existing version does not have a release, we cannot get the
	      // security coverage information.
	      return [];
	    }

in both cases, an issue with an `existing` version check

back to EDIT core/modules/update/src/ProjectCoreCompatibility.php

64	  public function __construct(array $core_data, array $core_releases, array $supported_branches) {
+	var_dump($core_releases);
+	var_dump($supported_branches);

	    if (isset($core_data['existing_version'])) {
	      $this->existingCoreVersion = $core_data['existing_version'];
+	      $this->possibleCoreUpdateVersions = $this->getPossibleCoreUpdateVersions($core_releases, $supported_branch
-	      //$this->possibleCoreUpdateVersions = $this->getPossibleCoreUpdateVersions($core_releases, $supported_branch
	    }
	  }

at nav to,

object(Drupal\Core\StringTranslation\TranslatableMarkup)#3202 (5) { ["string":protected]=> string(7) "Unknown" ["arguments":protected]=> array(0) { } ["translatedMarkup":protected]=> string(7) "Unknown" ["options":protected]=> array(0) { } ["stringTranslation":protected]=> object(Drupal\Core\StringTranslation\TranslationManager)#1730 (3) { ["translators":protected]=> array(1) { [30]=> array(1) { [0]=> object(Drupal\Core\StringTranslation\Translator\CustomStrings)#1719 (4) { ["translations":protected]=> array(1) { ["en"]=> array(0) { } } ["settings":protected]=> object(Drupal\Core\Site\Settings)#12 (1) { ["storage":"Drupal\Core\Site\Settings":private]=> array(2) { ["hash_salt"]=> string(74) "d...0" ["config_sync_directory"]=> string(17) "../../config_sync" } } ["_serviceIds":protected]=> array(0) { } ["_entityStorages":protected]=> array(0) { } } } } ["sortedTranslators":protected]=> array(1) { [0]=> object(Drupal\Core\StringTranslation\Translator\CustomStrings)#1719 (4) { ["translations":protected]=> array(1) { ["en"]=> array(0) { } } ["settings":protected]=> object(Drupal\Core\Site\Settings)#12 (1) { ["storage":"Drupal\Core\Site\Settings":private]=> array(2) { ["hash_salt"]=> string(74) "d...0" ["config_sync_directory"]=> string(17) "../../config_sync" } } ["_serviceIds":protected]=> array(0) { } ["_entityStorages":protected]=> array(0) { } } } ["defaultLangcode":protected]=> string(2) "en" } } array(5) { [0]=> string(5) "10.3." [1]=> string(5) "10.4." [2]=> string(5) "10.5." [3]=> string(5) "11.0." [4]=> string(5) "11.1." } The website encountered an unexpected error. Try again later.

TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\update\ProjectCoreCompatibility->getPossibleCoreUpdateVersions() (line 85 of core/modules/update/src/ProjectCoreCompatibility.php). 
...
smustgrave’s picture

Version: 11.1.x-dev » 11.x-dev
Status: Postponed (maintainer needs more info) » Needs work

Seems like this probably needs to be re-opened.

quietone’s picture

Issue summary: View changes
Issue tags: +Needs issue summary update

After reading the issue summary I learned that this occurs on "Drupal version : 11.1.0" and 'PHP 8.4'. The PHP requirements page shows that Drupal 11.1.0 is not compatible with PHP 8.4.

I tested with 11.x today and PHP 8.3 and did not get any errors. But that was using a git clone of core.

Tagging for an issue summary update to help reviewers.

pgndrupal’s picture

@quietone

>> The PHP requirements page shows that Drupal 11.1.0 is not compatible with PHP 8.4.

no,

@

"PHP requirements"
https://www.drupal.org/docs/getting-started/system-requirements/php-requ...

specifically states PHP v8.4 *is* supported with Drupal 11.1,

--> https://i.imgur.com/K0WNrW2.png

and that

" ...
Drupal will work on all supported PHP versions.
..."

szato’s picture

We got the same error.
We are using custom PHP images (8.3) with apcu. We were using apc.serializer=igbinary, if we changed to apc.serializer=php the errors went away.

eduardo morales alberti’s picture

Related error on smart_trim 2.3.1 https://www.drupal.org/project/smart_trim/issues/3566575#comment-16414753 due to plugin definition

/**
 * Plugin implementation of the 'smart_trim' formatter.
 *
 * @FieldFormatter(
 *   id = "smart_trim",
 *   label = @Translation("Smart trimmed"),
 *   field_types = {
 *     "text",
 *     "text_long",
 *     "text_with_summary",
 *     "string",
 *     "string_long"
 *   }
 * )
 */

The solution, all plugin properties should be translatable or at least, the label on \Drupal\Core\Entity\EntityFieldManager::getFieldLabels

But there are more fields that are affected, like the category on some modules https://git.drupalcode.org/project/butils/-/commit/b9a19526f68975f389c11...

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.