No Code Attached Yet
avatar pioada
pioada
31 May 2023

Steps to reproduce the issue

Create custom template.
Add template thumbs to media/templates/site/{template name}/images.

Expected result

Template thumb should be visible in template manager (backend)

Actual result

"preview" text is displayed instead of the thumb.

System information (as much as possible)

Joomla 4.3.2

Additional comments

In administrator/com_templates/src/Service/HTML/Templates.php in line 55 it first checks if template is inheritable. I think this part of code should be change. It should only check if thumb file exists in media folder.

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

Add template thumbs to media/templates/site/{template name}/images.

The path media/templates/site/{template name}/images is only used by modern templates (ie supporting child templates). Legacy templates for B/C reasons still expect their thumbs in the templates/{template name}/

avatar alikon alikon - change - 1 Jun 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-06-01 10:36:16
Closed_By alikon
avatar alikon alikon - close - 1 Jun 2023
avatar alikon
alikon - comment - 1 Jun 2023

closing as expected behaviour

avatar pioada
pioada - comment - 1 Jun 2023

Exactly. I'm creating a modern template based on Cassiopeia. My template wont be inheritable.
In my templateDetail.xml file inheritable is 0 (0). Thumbs is not show.
Thumbs is displayed only if I set inheritable = 1.
This is because in file administrator/com_templates/src/Service/HTML/Templates.php in line 55 it first check if this is inheritable template and inheritable is TRUE. If not then it go to next condition which is "old" template (legacy).
In first condition it should check if thumb exists in "new" location because inheritable is not required and can be omitted in "new" templates.


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

avatar dgrammatiko
dgrammatiko - comment - 1 Jun 2023

My template wont be inheritable.

That's not how it works. By definition modern templates ARE inheritable

avatar pioada
pioada - comment - 1 Jun 2023

Ah, ok. Thanks


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

Add a Comment

Login with GitHub to post a comment