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

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

jonsimonsen created an issue. See original summary.

doxigo’s picture

Thank you Jon for this, could you please provide the MR?

jonsimonsen’s picture

TODO: The same changes should be made in the .theme file in the starterkit folder

jonsimonsen’s picture

So 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.

doxigo’s picture

Status: Active » Fixed

Great work Jon, thanks, merged.

Status: Fixed » Closed (fixed)

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