User tests: Successful: Unsuccessful:
Pull Request for Issue #11176 .
Test instructions:
Before the Patch:
Actual result: You get an warning message "Only one of the login redirect fields should have a value." the new selection is not saved. -> This is no good UX and might confuse a lot of users
After the patch:
The Internal URL redirect will be cleared, if you select an Menu Item Type and save.
The Menu Item Type will be cleared, if you select Internal URL and save.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_users |
We can't have both the redirect_url and redirect_menuitem filled as these params are one or the other.
If one does that, then a Warning is displayed:
Only one of the login redirect fields should have a value.
and the form is not saved.
Not a bug imho.
Yes, sure :)
Actual result: You get an warning message "Only one of the login redirect fields should have a value." the new selection is not saved.
Expected behaviour:
The login and logout first check for the chosen redirect method and take the saved parameter behind that (Thats what i wanted to achieve with my codechange in this PR)
Another possibility: Clear the second field when changing the redirect type
Thank you!
Another possibility: Clear the second field when changing the redirect type
AND a value is entered in the first field... Otherwise it would clear the second field whenever someone switch redirects just to check what it does...
@infograf768 yes indeed, thank you - but maybe first option is easier, i just don´t understand why my chosen field skips always to Internal URL in this PR
I guess you first have to delete the content of the url field. Here it works fine.
That´s the UX issue i mention, i don´t want to force the user to delete the input field, because the user made the decision to chose another method. It´s not a nice workflow...
then it is certainly not by the code you propose that this will be solved.
We DO have to set false if both are filled.
This is a little over my head in terms of a fix, maybe a stronger programmer than myself can help us out here.
As mentioned in the original issue, the problem seems to be stemming from the numeric check located at component/com_users/controllers/users.php line 165, or one of the other conditionals.
I'm thinking we need another check which only checks for the actively selected option, or a way to only use the actively selected option in the menu item. I believe the error comes from not having a distinction between the actively selected item and the non-selected item, either menu item or internal URL.
Like I said, this is a little bit over my head and there's a lot going on there, but it seems like a solution would be relatively simple to implement. All ideas and suggestions are appreciated.
Theoretically it should be fine to have values stored in both fields as only one of the values will actually be used. When there are values assigned to both fields it causes the error. We just need a way to get around that.
@coolcat-creations coolcat-creations#6 that should be enough
Labels |
Added:
?
|
Category | Front End com_users | ⇒ | Administration com_menus Front End com_users |
I am going to test this right now, in mono and multilingual.
Don´t test yet, does´t work for now
Indeed
@coolcat-creations one more try: coolcat-creations#7
Thank you!
I merged it but still the same issue that it switches back to Menu Item ;(
it switches back to Menu Item
The login or the logout?
yeah the login works, the logout jumps back to Internal URL all the time
Thank you @dgt41 works now! PR can be tested now i update the test instructions immediately @infograf768 @laoneo would be great if you can test
will test later on. tomorrow likely
@coolcat-creations
My test show that when saving a login form, we have 2 cases:
A. If both the Internal URL field and Menu Item fields have values.
In this case the redirection is set depending on the button highlighted for the Choose Login redirect Type and the other value is deleted.
B. When we have only one value set, for example for the Menu Item field and the highlighted button is set to Internal URL, the Menu Item field value is deleted and then there is no specific redirection.
Is it what you expect?
A shouldn´t happen with this PR, if you select and save another redirection type the other field is cleared so the system has no issue regarding the "inputs behind". So no two fields should be possible to be filled at once....
If just the error message was clearer and gave a hint to the solution, I'd consider that a fix already. No extensive programming or testing needed ... (but of course, I do appreaciate real fixes, too)
I have tested this item
I have tested both Login and Logout successfully.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-09-01 12:10:21 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
As the issue became too big to figure out what the problem is. Can you describe here how we can reproduce the issue, that we can help you with the code.