User tests: Successful: Unsuccessful:
This PR fixes the issue #4778 reported by @apurvaduduskar. Basically, when you are on Joomla group edit screen, if you press "Save as Copy" button to create a new group without changing title, the system will throws an error message and doesn't create a copy group as expected.
I also fixed two ridiculous blocks of code at https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_users/models/group.php#L163 and https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_users/models/group.php#L201
Testing this PR is simple. You just need to login to administrator area of your site, then go to Users -> Groups, click on a group to edit (don't change group title), then press "Save as Copy" button in the toolbar:
Before patch: The system doesn't create the new group and throw an error message
After patch: The new group is created without error message. The title of the new group is created based on title of the original group and append an increment number: Group (2), Group (3)...
Labels |
Added:
?
|
Category | ⇒ | Administration |
Title |
|
||||||
Rel_Number | ⇒ | 4778 | |||||
Relation Type | ⇒ | Related to |
test was successful after installing patch
using php 5.4.19, mysql 5.5.32 j3.3.6
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4798.
Hi,
Great, is ok now ! Thanks
De : Tuan Pham Ngoc [mailto:notifications@github.com]
Envoyé : vendredi 17 octobre 2014 19:13
À : joomla/joomla-cms
Cc : 1apweb
Objet : Re: [joomla-cms] Fix "Save as copy" button of User Group (#4798)
Thanks @1apweb https://github.com/1apweb for testing. I updated the PR to solve that notice error. Please help testing it again :).
—
Reply to this email directly or view it on GitHub #4798 (comment) .Image supprimée par l'expéditeur.
Thanks for both of you for your help :).
Setting to RTC - thanks
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4798.
Status | Pending | ⇒ | Ready to Commit |
I get a 400 bad request error when applying this patch.
Browser message:
Bad Request
Your browser sent a request that this server could not understand.
Browser : Chrome
Joomla version:3.3.6
Labels |
Added:
?
|
Labels |
Added:
?
|
@wingchunneil: That might be something related to patch tester component.
@All : Thanks for help testing
@Committer : Travis Failed, however it is not related to this PR, so this one can be merged.
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-10-18 03:33:58 |
Notice when I click on a group :
Strict standards: Declaration of UsersModelGroup::generateNewTitle() should be compatible with JModelAdmin::generateNewTitle($category_id, $alias, $title) in C:\UwAmp\www\pizzabug\administrator\components\com_users\models\group.php on line 18
Call Stack
Time Memory Function Location
1 0.0000 142976 {main}( ) ..\index.php:0
2 0.0600 2128984 JApplicationCms->execute( ) ..\index.php:42
3 0.0600 2129072 JApplicationAdministrator->doExecute( ) ..\cms.php:251
4 0.1200 3407752 JApplicationAdministrator->dispatch( ) ..\administrator.php:152
5 0.1200 3447592 JComponentHelper::renderComponent( ) ..\administrator.php:98
6 0.1300 3504304 JComponentHelper::executeComponent( ) ..\helper.php:332
7 0.1300 3526152 require_once( 'C:\UwAmp\www\pizzabug\administrator\components\com_users\users.php' ) ..\helper.php:352
8 0.1500 4120008 JControllerLegacy->execute( ) ..\users.php:21
9 0.1500 4120064 UsersController->display( ) ..\legacy.php:730
10 0.1600 4203816 JControllerLegacy->display( ) ..\controller.php:109
11 0.1600 4315328 JControllerLegacy->getModel( ) ..\legacy.php:650
12 0.1600 4315512 JControllerLegacy->createModel( ) ..\legacy.php:756
13 0.1600 4315656 JModelLegacy::getInstance( ) ..\legacy.php:570
14 0.1600 4352192 require_once( 'C:\UwAmp\www\pizzabug\administrator\components\com_users\models\group.php' ) ..\legacy.php:186
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4798.