If you use the Module Manager to duplicate an existing module then the system creates the new module item just fine and sets the name of the new module item to "module_name (index_number)". So far so good :) However, if you duplicate the original module item one more time then the next duplicated module item will have the same name as the previous duplicated module item. This is probably confusing so here is the more clear explanation:
This is kind of confusing for the end users. It is logical for the third module to have the following name - "testmodule (3)". Actually, this is exactly what happens if we duplicate "testmodule (2)" but most people will use only the original module to create duplicates.
CentOS 6
PHP 5.5
MySQL 5.5
More info will be provided if it is needed.
Confirmed
OK. I made the PR which fixed the issue reported by @dkanchev when duplicate the module. Please help testing it.
@infograf768: What's the expected behavior when "save and copy" ? At the moment, by reading the code, I see that the system wanted to work as follow (but there is bug in the code prevents it from working as expected)
1. If users change title of the module before pressing the button, the new module will be created with new title and it is published by default
Maybe you can let me know the expected behavior and I will make a new PR for copy & save function ?
Tuan
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Rel_Number | ⇒ | 4721 | |
Relation Type | ⇒ | Related to |
Set to "closed" on behalf of @brianteeman by The JTracker Application at issues.joomla.org/joomla-cms/4702
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-10-17 06:15:52 |
@brianteeman The PR fixes the original issue reported by @dkanchev. However, we have another issue which is reported by @infograf768. I want to hear your feedback of both of you about how it should work so that I can fix it as well (maybe on a new PR). Please refer to my messages earlier:
@infograf768: What's the expected behavior when "save and copy" ? At the moment, by reading the code, I see that the system wanted to work as follow (but there is bug in the code prevents it from working as expected)
1. If users change title of the module before pressing the button, the new module will be created with new title and it is published by default
If users don't change the title, the system "wants" to use original module title + " Copy" as the title of new module and the module will be unpublished. Right now, the title is not changed because there is bug in the code. So title of the copied module is always the same with original module
Maybe you can let me know the expected behavior and I will make a new PR for copy & save function ?
So I think we should re-open this issue again ?
@joomdonation I also tested the "Save as copy" functionality and I think that a new PR should be opened and the issue addressed as the new module was created with the same name as the original one and is directly enabled, which I don't think is a good idea:
Thanks @dimitargsg. I still waiting for feedback from @brianteeman and @infograf768 to see how we should generate the title of the copied module:
Use Title of the original module + ' Copy' . That's how the original code wanted to do but it has bug.
Or use the format as we do in duplicate Title (2), Title (3)....
Once I heard from them, I will open new PR with the fix.
OK. Thanks @infograf768
Labels |
Added:
?
|
Here is a screenshot.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4702.