Problem/Motivation

This warning occurs if the extension info has no recommended version data:

Warning: Undefined array key "recommended" in Drupal\vitals\Plugin\VitalsCheck\Updates->getUpdates() (line 52 of modules/contrib/vitals/src/Plugin/VitalsCheck/Updates.php).

Steps to reproduce

Install&Configure a module as usual -> visit the vitals endpoint /vitals/{token}

Just saw this for such extensions as: admin_toolbar, drupal (core itself), better_exposed_filters, config_ignore, etc.

Proposed resolution

Show a message that no recommended version was found.

Issue fork vitals-3549503

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

quadrexdev created an issue. See original summary.

quadrexdev’s picture

Status: Active » Needs review

Please review

karavkars’s picture

Hello @quadrexdev,
I review your issue. I could not able to reproduce this issue with drupal 10 & 11 both.
I installed all mentioned modules dev versions and tested. and found that the non recommended module is ignored by listing of extension method.

Could you please share specific module with clean site.

E.g. https://www.drupal.org/project/better_exposed_filters/releases/7.0.x-dev

Regards,
Sagar K

daceej’s picture

Status: Needs review » Active

@quadrexdev - I'm also having trouble replicating this issue. Would you be able to provide more details as to how to replicate? Was this an existing install or fresh? Were there any patches in play for core or vitals?

opi’s picture

Got this again in my watchdog, but can't reproduce..

Looking at update_calculate_project_update_status() function, this recommended key is not always set if no available release exists.

If you do think that handling this rare case in the Vitals Update check is the good path to follow, I can provide the corresponding merge request.

daceej’s picture

I have finally caught this issue in the wild!

While working on updated to get ready for D12, I started seeing the error in the pipelines. - https://git.drupalcode.org/project/vitals/-/jobs/10837975

It looks like this is happening in cases where there is no recommended version for a specific module based on your site's current core version.

A fix for this will be coming out with the next release. The timeline for that release is TBD, but it will be pretty soon (likely in next couple of weeks).

daceej’s picture

Assigned: Unassigned » daceej
Priority: Normal » Critical
daceej’s picture

Priority: Critical » Major

  • daceej committed c22ccf96 on 2.x authored by quadrexdev
    #3549503 Fixed warning when extension recommended verison is not...
daceej’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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