? ? ? Success

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
5 May 2016

For a reason that I ignore (history I guess), the Login menu item contains a Redirect field in text format.
For multilanguage (as well as monolanguage), it is better to have a "menuitem" type field, which will prevent any error as the redirect should be internal. In that case it is an Itemid which is saved in the database (as already exists for the Logout menu item).
The issue here was to remain B/C while letting people use the alternative "menuitem" field.

To accomplish this, I added a new field of type "menuitem" (for the login and logout parts of the Login menu item), created 2 new rules, and added showon to let display only one field at a time and throw an alert preventing saving a value both in the ancient "Login Redirect" and the new "Menu Item Login Redirect" and as well for "Logout Redirect" and the new "Menu Item Logout Redirect".

When the menuitem field is used, the patch also checks if Multilang is on and, if it is, adds the necessary lang tag to the redirect.

Once this is merge, we will be able to merge a pending PR #9724 allowing multilanguage users to choose any redirection in the login module too, including associations when automatic change is on.

New interface (it is B/C as default is "Login Redirect" text field)

screen shot 2016-05-05 at 09 48 12

If choosing "Menu Item"

screen shot 2016-05-05 at 09 49 26

To test, enter internal values in the "Login redirect" and "Logout redirect" fields, save.
Then patch and test in monolanguage and multilanguage.

For example, if both fields are used for login (or/and logout), validation will prevent saving the menu item and we will get a Warning.

screen shot 2016-05-05 at 09 53 43

or

screen shot 2016-05-05 at 09 56 03

avatar infograf768 infograf768 - open - 5 May 2016
avatar infograf768 infograf768 - change - 5 May 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 May 2016
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 5 May 2016
Labels Added: ? ?
avatar infograf768
infograf768 - comment - 5 May 2016
avatar brianteeman brianteeman - change - 5 May 2016
Labels
avatar infograf768 infograf768 - change - 5 May 2016
Labels
avatar brianteeman brianteeman - change - 5 May 2016
Category Administration Language & Strings Multilanguage
avatar brianteeman brianteeman - test_item - 5 May 2016 - Tested successfully
avatar brianteeman
brianteeman - comment - 5 May 2016

I have tested this item :white_check_mark: successfully on 6fa9124

Great stuff


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

avatar brianteeman
brianteeman - comment - 5 May 2016

Is it possible to make the default be the new menu item option and the custom url only displayed on load if it is set
that should still be b/c


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

avatar infograf768
infograf768 - comment - 5 May 2016

@brianteeman
If we set the "Choose Login Redirect Type" field default to Menu Item (i.e. value="1", it will indeed not kill what was entered before in the present "Login Redirect" field, thus being B/C indeed. It may just confuse the user who already used that field.
It is an easy change. Let's see what other testers think.

87fd40d 5 May 2016 avatar infograf768 cs
avatar joomla-cms-bot
joomla-cms-bot - comment - 5 May 2016

This PR has received new commits.

CC: @brianteeman


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

avatar brianteeman
brianteeman - comment - 5 May 2016

But can it be set so that IF custom url not blank then it is displayed.
That should remove any confusion if possible

On 5 May 2016 at 09:21, infograf768 notifications@github.com wrote:

@brianteeman https://github.com/brianteeman
If we set the "Choose Login Redirect Type" field default to Menu Item
(i.e. value="1", it will indeed not kill what was entered before in the
present "Login Redirect" field, thus being B/C indeed. It may just confuse
the user who already used that field.
It is an easy change. Let's see what other testers think.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#10249 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar infograf768
infograf768 - comment - 5 May 2016

let me see

avatar infograf768
infograf768 - comment - 5 May 2016

nope, can'f find how to.
needs more tests and feedback

avatar mannybiker
mannybiker - comment - 6 May 2016

Item tested and working. Very useful addition since it was very time consuming and reason for mistakes to find all the correct article id, catid, itemid to compose manually the URL.

I agree with brianteeman on the default behaviour of having the menu item as default option if the custom URL filed is empty, but I understand that if this is technically difficult to achieve it is probably best to keep the Custom URL as the first option so that it is clear that either there is no configured URL or the old data is still there.

avatar joomla-cms-bot
joomla-cms-bot - comment - 6 May 2016

This PR has received new commits.

CC: @brianteeman


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

avatar infograf768
infograf768 - comment - 6 May 2016

Found the solution. Easier in the morning ????
The custom URL redirect fields will now display when the fields have a value. I obtained this result by adding a special case in the getItem() method in ROOT/administrator/components/com_menus/models/item.php
Menu Item is now default (test creating a new login menu item).
(Also took off a useless variable in the new rules files)

@mannybiker
@andrepereiradasilva
@brianteeman

Thanks for testing

avatar brianteeman
brianteeman - comment - 6 May 2016

Awesome - knew you wouldnt give up until you worked out how to do it

On 6 May 2016 at 07:53, infograf768 notifications@github.com wrote:

Found the solution. Easier in the morning ????
The custom URL redirect fields will now display when the fields have a
value. I obtained this result by adding a special case in the getItem()
method in ROOT/administrator/components/com_menus/models/item.php
Menu Item is now default (test creating a new login menu item).
(Also took off a useless variable in the new rules files)

@mannybiker https://github.com/mannybiker
@andrepereiradasilva https://github.com/andrepereiradasilva
@brianteeman https://github.com/brianteeman

Thanks for testing


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#10249 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar infograf768
infograf768 - comment - 6 May 2016

Can you folks set this RTC in issues (after testing ???? )

avatar brianteeman
brianteeman - comment - 6 May 2016

Dont worry - I'm on a train to the sprint right now but will make sure it
gets merged over the weekend

On 6 May 2016 at 08:07, infograf768 notifications@github.com wrote:

Can you folks set this RTC in issues (after testing ???? )


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#10249 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar brianteeman
brianteeman - comment - 6 May 2016

Made a small suggestion for one of the language strings


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

avatar joomla-cms-bot
joomla-cms-bot - comment - 6 May 2016

This PR has received new commits.

CC: @brianteeman


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

avatar infograf768
infograf768 - comment - 6 May 2016

Done. Thanks Brian.

avatar brianteeman
brianteeman - comment - 6 May 2016

Thanks

avatar joomla-cms-bot
joomla-cms-bot - comment - 6 May 2016

This PR has received new commits.

CC: @brianteeman


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 6 May 2016

Didn't do a full test, but discovered this issue.
Used sample data. Created a login menu item with this values.

image

Custom URL in login didn't work, the custom URL in logout worked.

avatar andrepereiradasilva
andrepereiradasilva - comment - 6 May 2016

Ok i see we have to add internal URI (index.php?....)... hum, this should be in the tooltip.

avatar MATsxm MATsxm - test_item - 6 May 2016 - Tested successfully
avatar MATsxm
MATsxm - comment - 6 May 2016

I have tested this item :white_check_mark: successfully on 5265043

Thanks


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

avatar infograf768
infograf768 - comment - 6 May 2016

@andrepereiradasilva
the tip for the redirect url field is in main en-GB.ini. JFIELD_LOGIN_ etc. I did not touch it. It is unrelated to this PR

avatar andrepereiradasilva
andrepereiradasilva - comment - 6 May 2016

the tip for the redirect url field is in main en-GB.ini. JFIELD_LOGIN_ etc. I did not touch it. It is unrelated to this PR

i know, just pointing out that.

Tests in en-GB ok. Still have to test in a multilanguage env.

avatar infograf768
infograf768 - comment - 6 May 2016

@andrepereiradasilva
I agree the tips for both redirect url are no good as they only say to enter an internal url without specifying the kind of format expected. (Which has created issues when we changed the code in 3.4.8 as the redirect should now be a JURI one.)
My proposal would be to let alone the constant and value in the main ini file and maybe change here all constants to new ones of type COM_USERS_ with better tip, and, as you said in our private chat, add in both fields a placeholder.
OR we could just add the placeholder.
What do you think?

avatar andrepereiradasilva
andrepereiradasilva - comment - 6 May 2016

i would add the new tooltip indicating that AND add placeholders (in all login/logout forms). But in another PR.

avatar infograf768
infograf768 - comment - 6 May 2016

OK, let's do that in another PR and get this one in first.

avatar andrepereiradasilva andrepereiradasilva - test_item - 6 May 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 6 May 2016

I have tested this item :white_check_mark: successfully on 5265043


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

avatar brianteeman brianteeman - change - 6 May 2016
Status Pending Ready to Commit
Labels
avatar brianteeman
brianteeman - comment - 6 May 2016

Rtc


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

avatar joomla-cms-bot joomla-cms-bot - change - 6 May 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 6 May 2016
Milestone Added:
avatar infograf768 infograf768 - reference | 34f5bbf - 7 May 16
avatar roland-d roland-d - reference | caadf91 - 7 May 16
avatar roland-d roland-d - merge - 7 May 2016
avatar roland-d roland-d - close - 7 May 2016
avatar roland-d roland-d - change - 7 May 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-05-07 10:54:39
Closed_By roland-d
avatar roland-d
roland-d - comment - 7 May 2016

Merged, thanks everybody for participating.

avatar joomla-cms-bot joomla-cms-bot - change - 7 May 2016
Labels Removed: ?
avatar infograf768
infograf768 - comment - 7 May 2016

thanks @roland-d

avatar roland-d roland-d - reference | 9955e4c - 8 May 16
avatar brianteeman brianteeman - change - 8 May 2016
Labels Added: ?
avatar infograf768
infograf768 - comment - 8 May 2016

Strings modified here: #10336
please test

Add a Comment

Login with GitHub to post a comment