Skip to content

[4.0] Use votelist field type for "Voting" option fields#32945

Merged
wilsonge merged 5 commits intojoomla:4.0-devfrom
richard67:4.0-dev-use-votelist-fields
Apr 1, 2021
Merged

[4.0] Use votelist field type for "Voting" option fields#32945
wilsonge merged 5 commits intojoomla:4.0-devfrom
richard67:4.0-dev-use-votelist-fields

Conversation

@richard67
Copy link
Member

@richard67 richard67 commented Mar 31, 2021

Pull Request for Issue # .

Summary of Changes

Continue the work of PR #31381 for other places where we have "Voting" option fields, i.e. use the "vote list" field type for these fields so they are not shown when the vote plugin is disabled, and fix a few code style issues in the XML files touched.

Thanks @infograf768 for the initial work for this PR.

Testing Instructions

  1. Without the patch of this PR applied, make sure that the "Content - Vote" plugin is disabled.

  2. In Global Configuration, tab "Site", set "Frontend Editing" to "Modules & Menus".

  3. In backend, create a new or edit an existing item of the following types, and check in tab "Options" of the form in section "Options" if there is a field "Voting" shown:

  • Article
  • Menu item of type "Single Article"
  • Menu item of type "Category Blog"
  • Menu item of type "Category List"
  • Menu item of type "Featured Articles"
  • Menu item of type "List All Categories ..."

Result: See section "Actual result BEFORE applying this Pull Request", the "Voting" field is shown.

  1. Login to frontend and repeat the previous step in frontend editing for the menu items.

Result: See section "Actual result BEFORE applying this Pull Request", the "Voting" field is shown.

  1. Apply the patch of this PR.

  2. Repeat steps 3 and 4.

Result: See section "Expected result AFTER applying this Pull Request", the "Voting" field is not shown.

  1. Enable the "Content - Vote" plugin.

  2. Repeat again steps 3 and 4.

Result: The "Voting" field is shown.

Actual result BEFORE applying this Pull Request

The "Voting" field is shown regardless if the "Content - Vote" plugin is enabled or not in the following forms in tab "Options", section "Options":

  • Article edit in backend
  • Menu item edit for menu item types "Single Article", "Category Blog", "Category List", "Featured Articles" and "List All Categories ..." (backend and frontend).

Expected result AFTER applying this Pull Request

The "Voting" field in the forms mentioned above in section "Actual result BEFORE applying this Pull Request" is only shown if the "Content - Vote" plugin is enabled.

Documentation Changes Required

Possibly docs need to be updated to mention that the "Voting" fields handled by this PR are not shown when the "Content - Vote" plugin is disabled.

@richard67 richard67 changed the title [4.0] [WiP] Use votelist field type for "Show Vote" fields [4.0] Use votelist field type for "Show Vote" fields Mar 31, 2021
@richard67 richard67 marked this pull request as ready for review March 31, 2021 20:22
@richard67 richard67 changed the title [4.0] Use votelist field type for "Show Vote" fields [4.0] Use votelist field type for "Voting" option fields Mar 31, 2021
@infograf768
Copy link
Member

I have tested this item ✅ successfully on c76b376


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

@infograf768 infograf768 added this to the Joomla 4.0 milestone Apr 1, 2021
@ceford
Copy link
Contributor

ceford commented Apr 1, 2021

I have tested this item ✅ successfully on c76b376

I tested and it mostly works but I have some observations and questions:

In the backend some forms have Voting immediately before Hits - easy to spot. In others Read More Link and Title with Read More come between - not so easy to spot. Could the order be looked at?

What happens when a form is saved without the plugin enabled: Enable plugin, in Edit form set Voting to Show and save; disable plugin, reload Edit form and save; enable plugin, reload - Voting has gone back to default Use Global (Hide). So we need some comment in the documentation.

In the front end I do not have an Oprions tab (my fault?) and the Menu item edit links open the Administrator interface.


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

@richard67
Copy link
Member Author

In the backend some forms have Voting immediately before Hits - easy to spot. In others Read More Link and Title with Read More come between - not so easy to spot. Could the order be looked at?

Sure, but that's not related to this PR, I think. I don't know right now if we have already an issue for that or not. If not, feel free to open one.

What happens when a form is saved without the plugin enabled: Enable plugin, in Edit form set Voting to Show and save; disable plugin, reload Edit form and save; enable plugin, reload - Voting has gone back to default Use Global (Hide). So we need some comment in the documentation.

That's how I expect it to work.

In the front end I do not have an Oprions tab (my fault?)

No, not your fault. That's why my test for frontend doesn't check the edit article form.

and the Menu item edit links open the Administrator interface.

Right. But I wanted to be sure it still works.

@joomla-cms-bot joomla-cms-bot removed this from the Joomla 4.0 milestone Apr 1, 2021
@richard67
Copy link
Member Author

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 1, 2021
@wilsonge wilsonge merged commit 8495245 into joomla:4.0-dev Apr 1, 2021
@wilsonge
Copy link
Contributor

wilsonge commented Apr 1, 2021

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 1, 2021
@wilsonge wilsonge added this to the Joomla 4.0 milestone Apr 1, 2021
@richard67 richard67 deleted the 4.0-dev-use-votelist-fields branch April 1, 2021 12:58
@richard67
Copy link
Member Author

Thanks for tests and merge.

dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants