? ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
11 Nov 2020

Summary of Changes

Vote and ratings fields are list and not switchers. Switchers there are not only displayed wrong but they do not allow to select Use Global settings.

EDIT: This PR also prevents the fields from being displayed when the vote plugin is disabled.

Testing Instructions

Create an articles category list menu item.
Display List Layouts tab.

Look at the Vote and Ratings fields

EDIT: Switch the vote plugin ON and OFF

Actual result BEFORE applying this Pull Request

Screen Shot 2020-11-11 at 07 21 25

Expected result AFTER applying this Pull Request

Screen Shot 2020-11-11 at 07 17 26

EDIT: See also #31381 (comment)

Documentation Changes Required

avatar infograf768 infograf768 - open - 11 Nov 2020
avatar infograf768 infograf768 - change - 11 Nov 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Nov 2020
Category Front End com_content
avatar ceford
ceford - comment - 11 Nov 2020

Did I do something wrong? My Show Votes in List and Show Ratings in List lists only have Use Global available. No Show or Hide!


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

avatar infograf768
infograf768 - comment - 11 Nov 2020

Maybe you have to clear all caches?

avatar ceford
ceford - comment - 11 Nov 2020

This is what I see for a Category List menu item, after new login and clearing cache:

image

avatar infograf768
infograf768 - comment - 11 Nov 2020

Have you enabled the vote plugin?

avatar ceford
ceford - comment - 11 Nov 2020

I have enabled the Vote plugin and I now see the drop-down lists. But, Use Global does not have (Show) or (Hide). It seems to me that these two fields should be absent if the plugin is not enabled. Also, it was not obvious to me what the difference was between Show Votes in List and Show Ratings in List. Would it helpful to have the label read Show Number of Votes in List - that does become more obvious when you see the list.


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

avatar sandewt sandewt - test_item - 11 Nov 2020 - Tested successfully
avatar sandewt
sandewt - comment - 11 Nov 2020

I have tested this item successfully on 3502c81

Joomla! 4.0.0-beta6-dev Development [ Mañana ] 27-October-2020 19:54 GMT

See comment


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31381.
avatar sandewt
sandewt - comment - 11 Nov 2020
avatar infograf768
infograf768 - comment - 11 Nov 2020

But, Use Global does not have (Show) or (Hide). It seems to me that these two fields should be absent if the plugin is not enabled.

I guess one has to save Articles Global Options at least once.

avatar ceford
ceford - comment - 11 Nov 2020

Having saved Articles Global Configuration I now see three items in each drop-down list. But if I go back and disable the Vote plugin I see this, with only this one item in the drop-down list:

image

Is that expected? I am just thinking about how to document this behaviour.

avatar brianteeman
brianteeman - comment - 11 Nov 2020

If the plugin is disabled then ideally the option should not be displayed at all. Or at least it should be a readonly field with a value of hide. This complex configuration problem has been raised before :(

avatar sandewt
sandewt - comment - 11 Nov 2020

This complex configuration problem has been raised before :(

#18354 ?

avatar infograf768
infograf768 - comment - 12 Nov 2020

@ceford
As the underlying issue is totally independent from this patch, please test it OK so that we set it RTC and merge.

The issue may be treated in another PR if someone works on it.

avatar infograf768
infograf768 - comment - 12 Nov 2020

In fact, I have a solution for that issue.
If the vote plugin is NOT enabled, the fields would just not display, same as for config.xml

listitems

I am now modifying this PR to include the solution.

avatar infograf768 infograf768 - change - 12 Nov 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 12 Nov 2020
Category Front End com_content Administration com_content Front End
avatar infograf768
infograf768 - comment - 12 Nov 2020

Added a new field VotelistField.php and used it for the vote/ratings fields for List Layout
Modifying test instructions
Please test again.

avatar ceford ceford - test_item - 12 Nov 2020 - Tested successfully
avatar ceford
ceford - comment - 12 Nov 2020

I have tested this item successfully on 3502c81

All OK if the Vote plugin is enables. I now see that, with the plugin disabled, Use Global (0) or Use Global (1) is the state of the global show flag.


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

avatar infograf768 infograf768 - change - 12 Nov 2020
The description was changed
avatar infograf768 infograf768 - edited - 12 Nov 2020
avatar ceford
ceford - comment - 12 Nov 2020

And I can confirm the latest pr does not show the fields if the plugin is disabled.


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

avatar infograf768
infograf768 - comment - 12 Nov 2020

Use Global (0) or Use Global (1) is the state of the global show flag.

This will not show anymore when plugin is disabled, whatever the settings in Global when it was enabled or not.

avatar infograf768 infograf768 - alter_testresult - 12 Nov 2020 - ceford: Tested successfully
avatar ceford
ceford - comment - 12 Nov 2020

Help screen updated - that will take time to filter through the translation system.


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

avatar infograf768
infograf768 - comment - 12 Nov 2020

@sandewt Please test.

avatar Quy
Quy - comment - 12 Nov 2020

Can you also please hide the Voting switch under Articles tab in Global Configuration?

avatar infograf768
infograf768 - comment - 12 Nov 2020

Can you also please hide the Voting switch under Articles tab in Global Configuration?

Done in ab8b009

avatar sandewt
sandewt - comment - 13 Nov 2020

This does not look good with the disabled vote plugin.

31381-3

See line 288, delete the following code !?

<field
	name="spacer1"
	type="spacer"
	hr="true"
/>

avatar infograf768
infograf768 - comment - 13 Nov 2020

@sandewt

See line 288, delete the following code !?

That is not the purpose of this PR.
As we have other instances of spacers in code, I suggest to change all these in another PR if desired.

Example:

Screen Shot 2020-11-13 at 08 47 40

Therefore, if this PR works as intended, please mark it such so that we can merge it.

avatar sandewt
sandewt - comment - 13 Nov 2020

That is not the purpose of this PR.
As we have other instances of spacers in code, I suggest to change all these in another PR if desired.

Rightly noted.

avatar sandewt sandewt - test_item - 13 Nov 2020 - Tested successfully
avatar sandewt
sandewt - comment - 13 Nov 2020

I have tested this item successfully on ab8b009

Joomla! 4.0.0-beta6-dev Development [ Mañana ] 27-October-2020 19:54 GMT


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

avatar infograf768 infograf768 - alter_testresult - 13 Nov 2020 - ceford: Tested successfully
avatar infograf768 infograf768 - change - 13 Nov 2020
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 13 Nov 2020

RTC thanks for testing.


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

avatar richard67 richard67 - change - 14 Nov 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-11-14 14:17:17
Closed_By richard67
Labels Added: ?
avatar richard67 richard67 - close - 14 Nov 2020
avatar richard67 richard67 - merge - 14 Nov 2020
avatar richard67
richard67 - comment - 14 Nov 2020

Thanks!

Add a Comment

Login with GitHub to post a comment