User tests: Successful: Unsuccessful:
If a template has an admin and a site version and both are named the same, both the admin and the site template will appear twice in the list (so essentially the template will appear 4 times in the list).
Adding the client_id in the left join for the extensions table ensures that templates with the same name but with different client_ids will not be displayed multiple times.
I have two such templates but I am not sure if I am allowed to share these. Also, because the templates are part of a component we custom built for a client, installing these templates would probably cause some issues since they are not intended for general use and don't have styles for com_content content for instance. I could ofcourse create two dummy templates if requested. That is something anyone could do though but I wouldn't mind doing that. To make such a dummy template yourself, just grab an admin template and change the name in the xml to something else, then take a frontend template and change the name in the xml to the same name as the admin template, package them and install them.
If you can create such a dummy template, that would be very helpful. Then this PR could be tested easy and merged soon.
Surely the simple answer is not to give both templates the same name
On 8 June 2015 at 13:17, Alex notifications@github.com wrote:
I have two such templates but I am not sure if I am allowed to share
these. Also, because the templates are part of a component we custom built
for a client, installing these templates would probably cause some issues
since they are not intended for general use and don't have styles for
com_content content for instance. I could ofcourse create two dummy
templates if requested. That is something anyone could do though but I
wouldn't mind doing that. To make such a dummy template yourself, just grab
an admin template and change the name in the xml to something else, then
take a frontend template and change the name in the xml to the same name as
the admin template, package them and install them.—
Reply to this email directly or view it on GitHub
#7139 (comment).
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
Simple answer is that, yes. At a system level, we'd have to enforce unique extension names system wide and not just based on the client (so you couldn't have a mod_feed for site and admin, they'd have to have different identifiers).
From a system perspective I would say, adding the extra SQL query conditions is the easiest answer. Otherwise you would need to enforce uniqueness of the extension name, since it is currently possible to have two extensions with the same name for different "clients". And it is just a matter of cleaning up the interface and not really about fixing a serious bug, isn't it? Anyway, I will see if I can create two dummy templates for testers to test against.
Hmmm... couldn't be enough that, while testing, we verify that nothing is broken with our templates and trust @alexvanniel that the solution works in his case? After all it seems to be a quite straightforward and logical fix...
Labels |
Added:
?
|
Category | ⇒ | Administration |
Status | New | ⇒ | Pending |
Tested by creating a new site and admin template with the same name.
Result is that the styles are duplicate in the style manager (note the duplicated ID)
Applied patch and you no longer get the duplicates
Category | Administration | ⇒ | Administration Templates (admin) Templates (site) |
My apologies for not getting back on this, I have been swamped here at work and even as simple as creating dummy templates to make testing possible was just not possible. I see that Brian did just that though. Thanks!
It is VERY easy to test and you dont need to build any fancy templates.
###Site template###
Copy protostar folder to a new folder called "duplicate" AND edit the templateDetails.xml so that line 4 now says
<name>duplicate</name>
###Admin template###
Copy isis folder to a new folder called "duplicate" AND edit the templateDetails.xml so that line 4 now says
<name>duplicate</name>
Go to Extensions Manager->Discover
Select Discover
Now install the two templates
@test I followed the test instructions from @brianteeman and can confirm that the patch resolves the problem.
Following the single steps I noticed that in the protostar-duplicate there is a problem with some labels being not translated.
It has nothing do to with this patch.
No that is expected behaviour and not related.
On 27 Jun 2015 10:35, "waader" notifications@github.com wrote:
@test https://github.com/test I followed the test instructions from
@brianteeman https://github.com/brianteeman and can confirm that the
patch resolves the problem.Following the single steps I noticed that in the protostar-duplicate there
is a problem with some labels being not translated.[image: template1_270615]
https://cloud.githubusercontent.com/assets/9270310/8391342/28cb52fa-1cc0-11e5-9b32-eda238aadbe1.png[image: template2_270615]
https://cloud.githubusercontent.com/assets/9270310/8391343/2f352f6c-1cc0-11e5-8ab7-1eae3c0e6415.pngIt has nothing do to with this patch.
—
Reply to this email directly or view it on GitHub
#7139 (comment).
Yeah, Brian was right: easy to test!!
#test OK!
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-07-11 14:53:28 |
Closed_By | ⇒ | mbabker |
Labels |
Removed:
?
|
Agree with the change based on review.
To test this. Do you maybe have such two templates which testers could install and verify?