Problem/Motivation
Rector reports an issue in the .theme file of the theme.
Steps to reproduce
Set up a site with Radix as theme (or a subtheme of Radix) and Rector (can supply details on how to add Rector if necessary). Observe that rector proposes a changes to the .theme file in Radix and/or its subtheme.
Proposed resolution
Apply the rector fix
// Include all files from the includes directory.
- $includes_path = dirname(__FILE__) . '/includes/*.theme';
+ $includes_path = __DIR__ . '/includes/*.theme';
foreach (glob($includes_path) as $file) {
- require_once dirname(__FILE__) . '/includes/' . basename($file);
+ require_once __DIR__ . '/includes/' . basename($file);Remaining tasks
Apply the fix
User interface changes
API changes
Data model changes
Issue fork radix-3507353
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
Comment #2
doxigo commentedThank you Jon for this, could you please provide the MR?
Comment #4
jonsimonsen commentedTODO: The same changes should be made in the .theme file in the starterkit folder
Comment #5
jonsimonsen commentedSo I tested this on a site that uses a subtheme of Radix, and changed the theme file in both Radix itself and the subtheme. I've not noticed any visual changes, console log error, dblog errors or status messages afterwards.
Comment #7
doxigo commentedGreat work Jon, thanks, merged.