? ? Pending

User tests: Successful: Unsuccessful:

avatar nikosdion
nikosdion
7 Jun 2020

Pull Request for Issue #29338 and #29337

cc @PhilETaylor @Quy

Summary of Changes

Changed the way the Joomla Token user profile field renders its information in the User Profile view page.

Testing Instructions

Set up a token and view – NOT edit! – your user profile in the public frontend of the site.

Expected result

Under Joomla API Token you get reasonable information e.g. what's your token and whether it's enabled.

Actual result

You get all sorts of misleading information. The token field displays the seed, not the token you need to use. The Active field displays 1 / 0 which great if you are a ?. And of course there's the Reset field which makes no sense in the context.

This PR fixes this by displaying only the real token you need to use and whether it's enabled. Example:
image

Documentation Changes Required

None.

avatar nikosdion nikosdion - open - 7 Jun 2020
avatar nikosdion nikosdion - change - 7 Jun 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Jun 2020
Category Front End Plugins
avatar SharkyKZ
SharkyKZ - comment - 7 Jun 2020

The form is also altered when editing.

avatar nikosdion nikosdion - change - 7 Jun 2020
Labels Added: ?
avatar nikosdion
nikosdion - comment - 7 Jun 2020

@SharkyKZ Thanks. I think I now understand what happened when I pressed backspace and my browser stayed on the same page. My keyboard was focused on the wrong window...

avatar SharkyKZ
SharkyKZ - comment - 7 Jun 2020

No problem. But this does not fix the issue mentioned above. The form uses com_users.profile name both when editing and displaying so this won't work.

avatar nikosdion
nikosdion - comment - 7 Jun 2020

That's annoying so let's do it the same way I've been doing it in my own software: checking the layout in the request. Architecturally wrong but necessary as it seems ?

avatar richard67 richard67 - change - 7 Jun 2020
Title
Improve user token plugin display in the profile page
[4.0] Improve user token plugin display in the profile page
avatar richard67 richard67 - edited - 7 Jun 2020
avatar richard67 richard67 - test_item - 7 Jun 2020 - Tested successfully
avatar richard67
richard67 - comment - 7 Jun 2020

I have tested this item successfully on 20b973b


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

avatar Quy
Quy - comment - 7 Jun 2020

Reset option is missing in edit mode.

avatar richard67
richard67 - comment - 7 Jun 2020

Oh, seems I've missed that.

avatar richard67 richard67 - test_item - 7 Jun 2020 - Not tested
avatar richard67
richard67 - comment - 7 Jun 2020

I have not tested this item.


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

avatar nikosdion
nikosdion - comment - 8 Jun 2020

OK, this is ready for testing now.

I also fixed a bug I discovered about the token after I originally contributed this feature. If you saved the user object without passing user profile fields (or at least without passing the token profile fields) the token would be automatically reset. I had already fixed it in the FOF Token plugin which is where this core feature was forked from but forgot to file a PR to Joomla. Since I'm here fixing this feature I backported this bugfix from FOF as well.

avatar Quy Quy - test_item - 8 Jun 2020 - Tested successfully
avatar Quy
Quy - comment - 8 Jun 2020

I have tested this item successfully on 8d76b1c


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

avatar richard67 richard67 - test_item - 12 Jun 2020 - Tested successfully
avatar richard67
richard67 - comment - 12 Jun 2020

I have tested this item successfully on 8d76b1c


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

avatar richard67 richard67 - change - 12 Jun 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 12 Jun 2020

RTC


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

avatar wilsonge wilsonge - change - 12 Jun 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-06-12 22:57:01
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 12 Jun 2020
avatar wilsonge wilsonge - merge - 12 Jun 2020
avatar wilsonge
wilsonge - comment - 12 Jun 2020

Thanks Nic!

Add a Comment

Login with GitHub to post a comment