? Success

User tests: Successful: Unsuccessful:

avatar alexvanniel
alexvanniel
8 Jun 2015

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.

avatar alexvanniel alexvanniel - open - 8 Jun 2015
avatar Bakual
Bakual - comment - 8 Jun 2015

Agree with the change based on review.
To test this. Do you maybe have such two templates which testers could install and verify?

avatar alexvanniel
alexvanniel - comment - 8 Jun 2015

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.

avatar Bakual
Bakual - comment - 8 Jun 2015

If you can create such a dummy template, that would be very helpful. Then this PR could be tested easy and merged soon.

avatar brianteeman
brianteeman - comment - 8 Jun 2015

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/

avatar mbabker
mbabker - comment - 8 Jun 2015

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).

avatar alexvanniel
alexvanniel - comment - 8 Jun 2015

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.

avatar smz
smz - comment - 8 Jun 2015

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...

avatar zero-24 zero-24 - change - 8 Jun 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 9 Jun 2015
Category Administration
avatar zero-24 zero-24 - change - 9 Jun 2015
Status New Pending
avatar brianteeman
brianteeman - comment - 21 Jun 2015

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)

screen shot 2015-06-21 at 05 03 27

Applied patch and you no longer get the duplicates

screen shot 2015-06-21 at 05 04 35


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

avatar brianteeman brianteeman - test_item - 21 Jun 2015 - Tested successfully
avatar brianteeman brianteeman - change - 21 Jun 2015
Category Administration Administration Templates (admin) Templates (site)
avatar alexvanniel
alexvanniel - comment - 24 Jun 2015

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!

avatar brianteeman
brianteeman - comment - 27 Jun 2015

It is VERY easy to test and you dont need to build any fancy templates.

1. Create the 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>

2. Install the templates

Go to Extensions Manager->Discover
Select Discover
Now install the two templates


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

avatar waader
waader - comment - 27 Jun 2015

@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.

template1_270615

template2_270615

It has nothing do to with this patch.

avatar waader waader - test_item - 27 Jun 2015 - Tested successfully
avatar brianteeman
brianteeman - comment - 27 Jun 2015

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.png

It has nothing do to with this patch.


Reply to this email directly or view it on GitHub
#7139 (comment).

avatar smz smz - test_item - 27 Jun 2015 - Tested successfully
avatar smz
smz - comment - 27 Jun 2015

Yeah, Brian was right: easy to test!!

#test OK!

avatar zero-24 zero-24 - change - 27 Jun 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 27 Jun 2015

RTC


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

avatar zero-24 zero-24 - change - 27 Jun 2015
Labels Added: ?
avatar zero-24 zero-24 - close - 11 Jul 2015
avatar mbabker mbabker - change - 11 Jul 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-07-11 14:53:28
Closed_By mbabker
avatar mbabker mbabker - close - 11 Jul 2015
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment