Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Patch in #2530904: Unknown package version in Drupal 7 made _provision_drupal_find_themes()
function read version
key from discovered themes:
$files[$name]->version = $files[$name]->info['version'];
This code, however, assumes that this key is always present in *.info
file of a theme. But this is not true for custom themes or themes installed by clonning Git repositories.
This is a minor problem but it will still appear in the logs which is not good.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2849593-3__7.x-4.x.patch | 889 bytes | 20th |
#2 | 2849593-1__7.x-3.x.patch | 928 bytes | 20th |
Comments
Comment #2
20th CreditAttribution: 20th commentedBefore accessing
version
element of theinfo
array, the code should check that this element exists.If it does not exist, theme
version
should be set toNULL
, this way the version will be correctly displayed asUnknown
in the list of platform packages in the UI.Comment #3
20th CreditAttribution: 20th commentedThe patch from #2 applies only to branch
7.x-3.x
.The
7.x-4.x
branch is not affected by this error because it does not have the same line of code. It looks like the patch from #2530904: Unknown package version in Drupal 7 was committed only to one of the branches.Uploading different patch for
7.x-4.x
branch because it would probably be better to add this functionality there as well.Comment #5
helmo CreditAttribution: helmo at Initfour websolutions commentedThanks, committed.
Don't worry about the 4.x branch ... It's way behind 3.x and currently more a placeholder for issue management.