Tested on Drupal 9.18, maybe this module is not compatible with 9?

Using composer update, update to version 3.6.0
Run drush cr
See the following error message on the console and site is not accessible with the same error message as the console:

Missing required key ("base theme") in modules/contrib/upgrade_status/tests/themes/upgrade_status_te
st_theme/upgrade_status_test_theme.theme/upgrade_status_test_theme.theme, see https://www.drupal.org
/node/3066038

Downgrade to 3.5.0 and error disappears, cache clears as usual, site is up again.

In 3.6.0 there is no base theme noted in the
"/contrib/upgrade_status/tests/themes/upgrade_status_test_theme/upgrade_status_test_theme.theme/upgrade_status_test_theme.info"

In 3.50 base theme is set to
base theme: false on line 5

Comments

namscott created an issue. See original summary.

namscott’s picture

Issue summary: View changes
jklmnop’s picture

StatusFileSize
new618 bytes

I got this error too, during `$ drush updatedb` on a Drupal 9.2 site.

I rolled a patch, in case anyone needs it. It works with versions 8.x-3.6 and 8.x-3.x-dev

Should note that I could only get it to apply the patch by running `$ composer require drupal/upgrade_status --prefer-source`.

gábor hojtsy’s picture

Status: Active » Needs review

Duh. Its missing on purpose, so we can test that. Sending your "fix" for a test run to show that it would fail. Can we have the key missing in some other way, ie. hide the theme?

Status: Needs review » Needs work

The last submitted patch, 3: 3066038-readd-base-theme-prop-in-info.patch, failed testing. View results

jklmnop’s picture

I understand that it’s probably meant to be that way, but if it causes updatedb (or other things) to fail, it’s broken.

I needed it to work on a site, that’s all the “fix” does; get it to work. I don’t need to test a contrib module, I need my site to work.

It’s merely a stop gap until it’s fixed for those in similar situations to myself.

gábor hojtsy’s picture

Status: Needs work » Needs review
StatusFileSize
new621 bytes

That makes sense. For me as a maintainer, I am looking for a patch I can commit and ideally hotfix for release. What about altering the info file data at runtime instead? (Which does not affect Upgrade Status' checking given that we read the raw info files).

gábor hojtsy’s picture

@namscott, @jklmnop: can you try my patch instead? AFAIS that should help us keep the test and keep the site working at the same time. I checked core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php to see how they get around to this problem, but they construct the whole theme on a virtual file system which would not be compatible with the other checks we do in upgrade status.

jklmnop’s picture

Thank you for working on this!

The patch applies just fine, but the site still doesn't work. When I go to `admin/reports/updates` or run`drush cr` I get the same exception. Here is the stack trace, if that helps.

The website encountered an unexpected error. Please try again later.

Drupal\Core\Extension\InfoParserException: Missing required key ("base theme") in modules/contrib/upgrade_status/tests/themes/upgrade_status_test_theme/upgrade_status_test_theme.theme/upgrade_status_test_theme.theme, see https://www.drupal.org/node/3066038 in Drupal\Core\Extension\ThemeExtensionList->createExtensionInfo() (line 269 of core/lib/Drupal/Core/Extension/ThemeExtensionList.php).
Drupal\Core\Extension\ExtensionList->doList() (Line: 113)
Drupal\Core\Extension\ThemeExtensionList->doList() (Line: 282)
Drupal\Core\Extension\ExtensionList->getList() (Line: 72)
Drupal\Core\Extension\ThemeHandler->listInfo() (Line: 649)
Drupal\markdown\PluginManager\InstallablePluginManager->setCacheBackend(Object, 'markdown_parser_info') (Line: 37)
Drupal\markdown\PluginManager\ParserManager->__construct(Object, Object, Object, Object, Object) (Line: 262)
Drupal\Component\DependencyInjection\Container->createService(Array, 'plugin.manager.markdown.parser') (Line: 176)
Drupal\Component\DependencyInjection\Container->get('plugin.manager.markdown.parser', 1) (Line: 437)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 240)
Drupal\Component\DependencyInjection\Container->createService(Array, 'paramconverter.markdown') (Line: 176)
Drupal\Component\DependencyInjection\Container->get('paramconverter.markdown', 1) (Line: 437)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 276)
Drupal\Component\DependencyInjection\Container->createService(Array, 'paramconverter_manager') (Line: 176)
Drupal\Component\DependencyInjection\Container->get('paramconverter_manager', 1) (Line: 437)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 240)
Drupal\Component\DependencyInjection\Container->createService(Array, 'access_manager') (Line: 176)
Drupal\Component\DependencyInjection\Container->get('access_manager', 1) (Line: 437)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 240)
Drupal\Component\DependencyInjection\Container->createService(Array, 'redirect.checker') (Line: 176)
Drupal\Component\DependencyInjection\Container->get('redirect.checker', 1) (Line: 437)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 240)
Drupal\Component\DependencyInjection\Container->createService(Array, 'redirect.request_subscriber') (Line: 176)
Drupal\Component\DependencyInjection\Container->get('redirect.request_subscriber') (Line: 136)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.request') (Line: 134)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
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: 716)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
gábor hojtsy’s picture

StatusFileSize
new2.6 KB

Ok, that is unfortunate. Thanks for testing! Let's undo the testing part for now then.

gábor hojtsy’s picture

Title: Missing required key ("base theme") error message after update to 3.6 » Remove testing of "base theme" info file key due to core fail

  • baa165c committed on 8.x-3.x
    Issue #3219968 by Gábor Hojtsy, jklmnop, namscott: Remove testing of "...
gábor hojtsy’s picture

Status: Needs review » Fixed

Committed this, will make a release today. Thanks again!

jklmnop’s picture

Thanks again for addressing this, @gábor-hojtsy! Sorry it meant removing the test for the time being.

For anyone trying to apply patch #10 to 8.x-3.6, you'll probably have to run $ composer require drupal/upgrade_status --prefer-source since the patch includes a change to upgrade_status_test_theme.info.yml. The patch will not successfully apply to the dist since the file gets versioned via the packager which adds lines to the file. You might also notice that the module shows "Invalid version: Unknown" on the admin/reports/update page too. Not a big deal, just FYI.

gábor hojtsy’s picture

Priority: Normal » Critical

I released https://www.drupal.org/project/upgrade_status/releases/8.x-3.7 immediately with the fix, so that should be good to update to. People newly updating should avoid 3.6 entirely :)

jklmnop’s picture

excellent! :D

just updated to 8.x-3.7, works perfectly!

namscott’s picture

tested 3.7 and looks good, thanks!

Status: Fixed » Closed (fixed)

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