Radix templates cannot be used on windows due to colon in name

Created on 9 December 2024, about 1 month ago

Problem/Motivation

Attempting to upgrade from radix 5 to radix version 6 causes a large number of errors with rename and mkdir in the creation of twig cache files. This has been previous reported with IIS and the Barrio theme, but the problem is more general. I am using Windows WAMP server (Apache) and am having the same problem.

Example:
Warning: mkdir(): Not a directory in Drupal\Component\PhpStorage\FileStorage->createDirectory() (line 112 of core\lib\Drupal\Component\PhpStorage\FileStorage.php).

User warning: mkdir(): Permission Denied in Drupal\Component\PhpStorage\FileStorage->createDirectory() (line 123 of core\lib\Drupal\Component\PhpStorage\FileStorage.php).

Warning: rename(sites/drivingevals.com/files/php/twig/.IGl7-aydaHhhnbOnPaf85rTOAjY,sites/drivingevals.com/files/php/twig/675653a40ba6f_radix:alert_xp7YIn66tuR5KdnGZD4tCMHQq/TYR-NNK0rZq39H8qEJMhzgMfYS2FpRhTgQblWSmuf44.php): The system cannot find the path specified (code: 3) in Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage->save() (line 88 of core\lib\Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage.php).

Steps to reproduce

1. On a windows server, install and enable radix version 6.
2. Display any page and observe dozens of warning

Proposed resolution

The related issue seeks to sanitize the directory and file names in core by replacing colons with underscores.

An alternative would be for radix to avoid the use of colons by renaming the template from radix:COMPONTENT to radix_COMPONENT or maybe radix__COMPONENT (double underscore)

Remaining tasks

This would affect users who have already created sub-themes for radix v6. They would have to rename their templates and any references, such as twig includes.

I hesitantly rate this issue as critical because it prevent use with windows. While I suspect windows is rare for a production server, I think it's not uncommon for development (such as I do).

πŸ› Bug report
Status

Active

Version

6.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States danchadwick Boston

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024