User tests: Successful: Unsuccessful:
When you edit the template (not the template style!) in the template manager, you may see a warning "Extension record not found in database.". This doesn't occur for core templates. It only happens for templates where the name specified in the XML file doesn't match the (sanitised) folder that will be created.
You can use my template from http://www.bakual.net/download/less-allrounder/less-allrounder-2-1-0.html to verify that. The template name is "{LESS} Allrounder" which will be sanitised to "lessallrounder". (I know the template is crap, don't judge me on that g)
In the #__extension table, we store both a name
and an element
for the template. The name is stored as is defined in the XML manifest file, and the element is the sanitised name which will be used for the folder and to reference the template in the #__template_styles table (and probably many more places).
Now we look at the TemplatesModelTemplate->getPreview()
method and see that the query there looks for the name of the template, when it instead should look for the element.
This is why the query will fail and produce this warning.
Labels |
Added:
?
|
fix works as described.
able to reproduce then #6450 works as described with no warning nor notices.
Thanks
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-03-16 15:03:36 |
Milestone |
Added: |
@test works as described, thanks!