Problem/Motivation

This was fixed November 2020 for Drupal 8 and 9 in #3132426: Notice: Undefined index: title in Drupal\update\ProjectSecurityRequirement, but has resurfaced in 2023 in Drupal 10.1.

I suddenly got this weird error out of nowhere in Drupal 10.1. Something's getting mixed up with the Update module I guess. I have been working with this site for a while now and haven't seen this error before (note: This is a clone of a 2020 issue, so the lines may have changed since then).

Notice: Undefined index: title in Drupal\update\ProjectSecurityRequirement::createFromProjectDataAndSecurityCoverageInfo() (line 103 of core/modules/update/src/ProjectSecurityRequirement.php).
Drupal\update\ProjectSecurityRequirement::createFromProjectDataAndSecurityCoverageInfo(Array, Array) (Line: 43)
update_requirements('runtime') (Line: 186)
update_page_top(Array) (Line: 336)
Drupal\Core\Render\MainContent\HtmlRenderer->buildPageTopAndBottom(Array) (Line: 135)
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: 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: 694)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Proposed resolution

When fetching update data always clear the update_project_data from state as it has another cache of the available updates that needs refreshing with the new data.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

Comments

ressa created an issue. See original summary.

ressa’s picture

Issue summary: View changes
arunkumark’s picture

@ressa

Am unable to reproduce the issue in the Drupal 11.x version. Below are the steps I followed during my testing. Kindly check if the issue persists or share the steps to reproduce.

Also found the patch exists in the latest version of 11.x
patch

[On July 23]
1. Installed fresh core Drupal 11.x.
2. Installed core module Update Manager(update)
3. Configured for Daily Check for updates.
4. Created a new vocabulary called Sports and added a few fields.
5. The field was created successfully. Also, run the cron to check the Update manager
6. I tried to create a new field for the same vocabulary.
7. Able to create both fields and added some terms into it.
[On July 24]
8. Next day perform the same steps 5-7 able to create fields and terms.
9. I ran the cron and tested steps 5-7 (not received and errors)
10. Checked manually for the updates.
11. Performed testing steps 5-7 (not received and errors).

Configuration

ressa’s picture

Status: Active » Closed (cannot reproduce)

Thanks for following up on this @arunkumark, and checking. I haven't seen this error since I reported it, and it seems like no-one else has experienced it... so let's close this issue.