Problem/Motivation

When trying to create a subtheme from admin area a php error doesn't allow to complete the operation. The error is: NOTICE: PHP message: Uncaught PHP Exception Drupal\Core\File\Exception\FileNotExistsException: "File 'themes/contrib/bootstrap5/style-guide/bootstrap.rtl.min.css' could not be copied because it does not exist." at /application/web/core/lib/Drupal/Core/File/FileSystem.php line 459

Steps to reproduce

Enable theme.
Head to /admin/appearance/settings/bootstrap5.
Scroll down to Subtheme section.
Name your subtheme and click Create.

Proposed resolution

change the line that copy the fiile from themes/contrib/bootstrap5/style-guide/bootstrap.rtl.min.css and replace with themes/contrib/bootstrap5/style-guide/index-rtl_files/bootstrap.rtl.min.css

Remaining tasks

n/a

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Comments

gmateos created an issue. See original summary.

kroh’s picture

This is caused by the subtheme file copy operations not accommodating the index-rtl_files directory, which I suspect is included inadvertently.

Delete ./style-guide/index-rtl_files/ prior to creating the subtheme, and it executes successfully.

phileas75’s picture

#2 Work for me.

vladimiraus’s picture

Status: Active » Closed (duplicate)
Related issues: +#3219767: create subtheme: permission problems
Christopher Riley’s picture

#2 worked for me also but aren't the deleted files needed?

nigelwhite’s picture

There is no index-rtl_files/ in web/themes/contrib/bootstrap5/style-guide so I can't delete it. But I'm getting the same Error 'Subtheme cannot be created. Check permissions.'

2flower’s picture

Is there solution for version 1.1.1? There is no style-guide folder.