No Code Attached Yet
avatar BrainforgeUK
BrainforgeUK
27 May 2023

Steps to reproduce the issue

Install a child template without any media files.
Why? In real world unlikely, but when developing/testing!

Goto template admin page
.../administrator/index.php?option=com_templates&view=templates/...

Expected result

Normal behaviour.

Actual result

Get unexpected error message.
The template folder is not writable. Some features may not work.

System information (as much as possible)

PHP 8.2

Additional comments

Discovered when testing pull request:

#40665

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar BrainforgeUK BrainforgeUK - open - 27 May 2023
avatar BrainforgeUK BrainforgeUK - change - 27 May 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 27 May 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 May 2023
avatar BrainforgeUK
BrainforgeUK - comment - 27 May 2023

Easy to fix, but if the media folder does not exist should it automatically create it?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40666.

avatar dgrammatiko
dgrammatiko - comment - 27 May 2023

Why? In real world unlikely, but when developing/testing!

Because the file manager for the templates WILL NOT allow users to create the media root folder for a template, it expects the folder to exist upon installation! The limitation comes from the outdated file manager. Also the only way Joomla exposes the creation of a child template is through the toolbar button, and there the media folder is created by default. So, the point is if you try to create child templates your way, better check the existing code in the templateModel and follow the same steps

avatar brianteeman
brianteeman - comment - 27 May 2023

The error message is completely correct. Without the media folder things will not work as expected

avatar BrainforgeUK
BrainforgeUK - comment - 27 May 2023

Agree - see 'real world' comment above.

avatar brianteeman
brianteeman - comment - 27 May 2023

so why open an issue?

avatar BrainforgeUK
BrainforgeUK - comment - 27 May 2023

A unexpected annoyance during testing / development.
See related pull request. #40665

avatar brianteeman
brianteeman - comment - 27 May 2023

as I wrote there it is rediculous to think it is a good idea that if you write bad code that will not work that you are never told that it is bad code that will not work, Take a break, enjoy the sunshine and think about it.

avatar alikon alikon - change - 27 May 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-05-27 14:35:46
Closed_By alikon
avatar alikon alikon - close - 27 May 2023

Add a Comment

Login with GitHub to post a comment