Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected message on template admin. #40666

Closed
BrainforgeUK opened this issue May 27, 2023 · 7 comments
Closed

Unexpected message on template admin. #40666

BrainforgeUK opened this issue May 27, 2023 · 7 comments

Comments

@BrainforgeUK
Copy link
Contributor

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

@BrainforgeUK
Copy link
Contributor Author

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.

@dgrammatiko
Copy link
Contributor

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

@brianteeman
Copy link
Contributor

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

@BrainforgeUK
Copy link
Contributor Author

Agree - see 'real world' comment above.

@brianteeman
Copy link
Contributor

so why open an issue?

@BrainforgeUK
Copy link
Contributor Author

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

@brianteeman
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants