- Issue created by @spalmstrom
- Merge request !9787Resolve issue 3479427 - bootstrap barrio issue under Windows β (Open) created by spalmstrom
- π³πΏNew Zealand quietone
@spalmstrom, thanks for creating the MR. Unfortunately, it is still very large and not ready for review.
- π¬π§United Kingdom spalmstrom
This issue related to the attempted creation of files in Windows with illegal names. Hence, it might well apply in a WAMP environment, too, i.e. running Apache, not just IIS.
- Status changed to Needs work
4 months ago 3:36am 9 December 2024 - πΊπΈUnited States danchadwick Boston
This is broader than the original report. I use apache (WAMP server) on windows and Radix version 6, which also has colons in template names.
I think the sensitization could be done regardless of platform for simplicity.
- πΊπΈUnited States danchadwick Boston
I edited the issue to broaden it to its true scope: You can't use Single Directory Components and Windows together. The generated twig php files contains a colon.
Bumping priority to Major since if you're hosting on windows, you can't use any theme that uses SDC.
- πΊπΈUnited States danchadwick Boston
Here's a simple solution. When generating cache keys for twig templates, there is already code which makes exceptions to avoid illegal characters and other code while avoids windows file name limitations. Simply replace colons with underscores when generating the cache key.
I'm providing a patch on D10.3, but I suspect it will apply to 11.x.
- πΊπΈUnited States hockey2112
I am experiencing this issue on my local Windows machine, running XAMPP. My website is on Drupal 10.4.0. How can I fix this issue? Will that patch be applied to D10 core?
- πΊπΈUnited States danchadwick Boston
@hockey2112:
- Google "drupal apply patch with composer" for many references on how to do this.
- Yes. Open the patch file and look at the top few lines to see what is being patched. - π¨π¦Canada Charlie ChX Negyesi πCanada
The basic code in the added function was generated by Copilot.
then it has no place in core.
- πΊπΈUnited States smustgrave
Fix should be in an MR. The current MR is showing 1000s of changes which doesn't appear to be correct.
- πΊπΈUnited States danchadwick Boston
@ghost of drupal past: Unpersuaded. The very next line truncates the name to 25 bytes, surely a much larger source of concern for collisions. The caller will need to take care to pass names that fit within that limit without collision just as I propose they must with the colon. Beyond that, I'm unaware of any use of a colon in cache names other the SDC. Rather than patch a numerous places in SDC, why not protect the name from known illegal characters which result from an unfortunate design decision when SDC was committed?
Either way, SDC is broken for all windows developers right now.
- First commit to issue fork.
- πΈπ°Slovakia poker10
poker10 β changed the visibility of the branch 3479427-drupal-sdc-windows to hidden.
- Merge request !11456Issue #3479427: Single Directory Components incompatible with Windows β (Open) created by poker10
- πΈπ°Slovakia poker10
poker10 β changed the visibility of the branch 3479427-drupal-sdc-windows to active.
- πΈπ°Slovakia poker10
poker10 β changed the visibility of the branch 3479427-bootstrap-barrio-theme to hidden.
- πΈπ°Slovakia poker10
poker10 β changed the visibility of the branch 11.x to hidden.
- πΈπ°Slovakia poker10
I confirm this issue on windows.
Converted the drupal_sdc-windows-3479427-8.patch to MR 11456