Problem/Motivation

There appears to be a regression and a bit of a WTF with the theme system currently. The theme system itself allows you to enable themes with a numeric value in the theme name but then the breakpoint system then throws an exception.

Drupal\breakpoint\InvalidBreakpointSourceException: Invalid value 'choice5k' for breakpoint source property. Breakpoint source property can only contain lowercase letters and underscores. in Drupal\breakpoint\Entity\Breakpoint->isValid() (line 170 of /.../core/modules/breakpoint/lib/Drupal/breakpoint/Entity/Breakpoint.php).

Steps to reproduce:
1) Copy stark into new theme with a numeric value in name. Rename info.yml and config files.
2) Enable theme.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Tharna’s picture

Status: Active » Needs review
FileSize
1.19 KB

Here is a patch to add numbers as allowed values for the brekpoint source check.

Status: Needs review » Needs work

The last submitted patch, 2084401-numbers-in-theme-name-1.patch, failed testing.

Tharna’s picture

Status: Needs work » Needs review
FileSize
1.15 KB

Resubmitting with correct paths this time.

neclimdul’s picture

Status: Needs review » Reviewed & tested by the community

I love when an issue I forgot about suddenly have green patches. Seems reasonable enough to just fix the broken module. ;)

alexpott’s picture

Component: theme system » breakpoint.module
Status: Reviewed & tested by the community » Fixed

Committed 63d0273 and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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