Feature PR-5.0-dev PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar YatharthVyas
YatharthVyas
19 Aug 2021

Project Repo PR: joomla-projects/gsoc21_core-enhancements#11
Plan Document: https://docs.google.com/document/d/1Pl8JGa2hkYkmJzQOn9_mS8a4imDmqc2a/edit#heading=h.t5tri5tytv7q


  • Drop-down selector in Articles view
  • Merge Model
  • Merge tmpl files
  • Merge View
  • Merge Controller
  • Update all links pointing to view=featured
  • Update Link of Featured Articles Menu Item
  • Remove Featured files

Summary of Changes

[A] New Selector Dropdown

A searchtools selector is added that can be used to toggle between:

Option Value
All ""
Unfeatured 0
Featured 1

dropdown


[B] Model Merged

  • A new method to return the featured selector filter parameter using the getUserState from request
$featured = $this->getUserStateFromRequest($this->context . '.featured', 'featured', '');
  • The advantage of the above is that we can also pass the value as a GET param to the URL which helps us to make redirect URLs that can initialize the value of this dropdown
  • $featured variable is used as a condition to manipulate the query to adjust to Featured

[C] Templates Merged

  • We use state->get('featured') to conditonally render the template code as per featured or not.

[D] Views Merged

  • We use state->get('featured') to conditonally render the toolbar options

[E] Controller Merged

  • Merged the delete function from FeaturedController

Testing Instructions

  • Visit the Articles View and ensure that everything works as it did before.
  • Test workflows and filters too
  • Ensure that the tmpl and view (and all other MVC files) are common for both featured and articles

Expected result AFTER applying this Pull Request

Everything works normally


Mentors

@chmst @nibra @bembelimen
(and thanks @richard67)

avatar YatharthVyas YatharthVyas - open - 19 Aug 2021
avatar YatharthVyas YatharthVyas - change - 19 Aug 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Aug 2021
Category SQL Administration com_admin Postgresql com_content com_menus Installation Front End Plugins
avatar PhilETaylor
PhilETaylor - comment - 19 Aug 2021

Does this fix #29942 ?

avatar YatharthVyas
YatharthVyas - comment - 19 Aug 2021

Does this fix #29942 ?

Sadly, No.
I haven't made any change that affects this.

avatar YatharthVyas YatharthVyas - change - 19 Aug 2021
The description was changed
avatar YatharthVyas YatharthVyas - edited - 19 Aug 2021
avatar YatharthVyas YatharthVyas - change - 20 Aug 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 20 Aug 2021
Category SQL Administration com_admin Postgresql com_content com_menus Installation Front End Plugins SQL Administration com_admin Postgresql com_content com_menus Language & Strings Installation Front End Plugins
avatar YatharthVyas YatharthVyas - change - 20 Aug 2021
Labels Added: Language Change
avatar Bakual
Bakual - comment - 20 Aug 2021

If you only moved the "Featured" filter to set it using GET, that works as well with: /administrator/index.php?option=com_content&view=articles&filter[featured]=1.

avatar YatharthVyas YatharthVyas - change - 20 Aug 2021
Labels Added: ?
Removed: ?
avatar Quy
Quy - comment - 20 Aug 2021

Sorting by Featured does not update the icon-sort to caret up/caret down.

avatar chmst chmst - change - 17 Oct 2021
The description was changed
avatar chmst chmst - edited - 17 Oct 2021
avatar chmst chmst - change - 17 Oct 2021
The description was changed
avatar chmst chmst - edited - 17 Oct 2021
avatar YatharthVyas YatharthVyas - change - 30 Oct 2021
Labels Added: ?
Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 30 Oct 2021
Category SQL Administration com_admin Postgresql com_content com_menus Installation Front End Plugins Language & Strings SQL Administration com_admin Postgresql com_content com_menus Installation Front End Plugins
avatar YatharthVyas YatharthVyas - change - 30 Oct 2021
The description was changed
avatar YatharthVyas YatharthVyas - edited - 30 Oct 2021
avatar YatharthVyas YatharthVyas - change - 30 Oct 2021
Labels Removed: Language Change
avatar YatharthVyas
YatharthVyas - comment - 30 Oct 2021

Updates:

  1. This has been fixed:

Sorting by Featured does not update the icon-sort to caret up/caret down.

  1. All old files related to featured articles have been deleted
avatar YatharthVyas YatharthVyas - change - 30 Oct 2021
The description was changed
avatar YatharthVyas YatharthVyas - edited - 30 Oct 2021
avatar Quy
Quy - comment - 21 Nov 2021

Will Featured Articles in the sidebar be removed?

avatar YatharthVyas
YatharthVyas - comment - 21 Nov 2021

Will Featured Articles in the sidebar be removed?

No, it will stay but it's navigation url will be different. This new url will point to the articles (instead of featured) view and it will pass the filter of featured=1 that will be applied in the search tools to only show featured articles

avatar Quy
Quy - comment - 21 Nov 2021

Two menu items are highlighted. Also, see #28003 for request to remove it.

featured-articles

avatar brianteeman
brianteeman - comment - 21 Nov 2021

The double highlighting is because of an unrelated bug in menu highlighting

avatar chmst
chmst - comment - 22 Jan 2022

#19886 could be obsolete for 4.x with this PR


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35228.
avatar YatharthVyas YatharthVyas - change - 23 Mar 2022
Labels Added: ?
Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 23 Mar 2022
Category SQL Administration com_admin Postgresql com_content com_menus Installation Front End Plugins Unit Tests Administration com_admin SQL Postgresql com_content com_menus Language & Strings Installation Front End Plugins
avatar YatharthVyas
YatharthVyas - comment - 23 Mar 2022

Apologies for the review request, I rebased my branch to fix the merge conflicts and it automatically requested for review when I pushed it

avatar richard67
richard67 - comment - 23 Mar 2022

Review request can be removed by using the cog icon beside the reviewers list on the top left right corner, and then choosing the reviewer which has a check mark in the drop down.

avatar YatharthVyas
YatharthVyas - comment - 23 Mar 2022

Thank you!

avatar YatharthVyas YatharthVyas - change - 23 Mar 2022
Labels Added: ? Language Change
avatar joomla-cms-bot joomla-cms-bot - change - 23 Mar 2022
Category SQL Administration com_admin Postgresql com_content com_menus Installation Front End Plugins Unit Tests Language & Strings Unit Tests Administration com_admin SQL Postgresql com_content com_menus Installation Front End Plugins
avatar YatharthVyas YatharthVyas - change - 23 Mar 2022
Labels Removed: Language Change
avatar chmst
chmst - comment - 23 Mar 2022

Thinking loud, because there was a question in a forum aboout a template override for the featured layout. Can this remain unchanged?

avatar roland-d roland-d - change - 27 Mar 2022
Title
[4.1] [GSoC 21] Core Enhancement 3 - Merge Featured into Articles
[4.2] [GSoC 21] Core Enhancement 3 - Merge Featured into Articles
avatar roland-d roland-d - edited - 27 Mar 2022
avatar roland-d
roland-d - comment - 27 Mar 2022

@YatharthVyas We have a conflict ? Can you check it please?

avatar YatharthVyas
YatharthVyas - comment - 27 Mar 2022

@YatharthVyas We have a conflict ? Can you check it please?

Thanks, I have rebased it now

Thinking loud, because there was a question in a forum aboout a template override for the featured layout. Can this remain unchanged?

Sorry, I am unware about this.I would like to read more information about the forum question

avatar chmst
chmst - comment - 27 Mar 2022

Now I am sorry, I cannot find the post.

The user had an own template override for the featured articles (tmpl/featured/default.php). This remembered me that
featured articles can have a very different layout than other articles or blog layouts.

a5d723d 27 Mar 2022 avatar YatharthVyas phpcs
e732f6c 27 Mar 2022 avatar YatharthVyas phpcs
avatar Quy
Quy - comment - 27 Mar 2022

Install Blog Sample Data.
Go to the front page.
Error: The requested page can't be found.

avatar brianteeman
brianteeman - comment - 27 Mar 2022

Install Blog Sample Data.

obviously as the plugin is not updated in this pr

avatar Quy
Quy - comment - 27 Mar 2022

Enable Workflows.
Go to Actions dropdown.
Missing Run Transitions and Unfeature should not be listed.

actions

avatar Quy
Quy - comment - 27 Mar 2022

obviously as the plugin is not updated in this pr

The issue is that the update sql should update the backend only and not the frontend too.

avatar richard67
richard67 - comment - 27 Mar 2022

obviously as the plugin is not updated in this pr

The issue is that the update sql should update the backend only and not the frontend too.

@Quy Yes, the update SQL statement is missing a condition for client_id = 1 in the WHERE clause.

@YatharthVyas Could you change that, and change the name of the update SQL scripts from "4.1.0-2021-08-09.sql" to the right version 4.2.0 and a more current date, e.g. "4.2.0-2022-03-27.sql"? If you can, remember to do the file rename and the file content change with separate commits so GitHub history shows the file has been renamed and changed and not shows a deleted and a created file.

avatar joomla-cms-bot joomla-cms-bot - change - 27 Mar 2022
Category SQL Administration com_admin Postgresql com_content com_menus Installation Front End Plugins Unit Tests Unit Tests SQL Administration com_admin Postgresql com_content com_menus
avatar brianteeman
brianteeman - comment - 4 Sep 2022

@obuisard this wasn't accepted for 4.2 - no idea why - will it be accepted for 4.3 (if updated). If not then the creator should be informed and this closed. (which will be a shame) but there is no point in leaving it open otherwise

avatar obuisard
obuisard - comment - 4 Sep 2022

Thank you @brianteeman for pointing this out. We are going to contact student and mentor about this enhancement as it was a GSoC project. We will also double-check with the UX team on this one.

avatar obuisard obuisard - change - 26 Oct 2022
Title
[4.2] [GSoC 21] Core Enhancement 3 - Merge Featured into Articles
[4.3] [GSoC 21] Core Enhancement 3 - Merge Featured into Articles
avatar obuisard obuisard - edited - 26 Oct 2022
avatar HLeithner
HLeithner - comment - 8 May 2023

This pull request has been automatically rebased to 5.0-dev. No new features will be merged into Joomla! 4.3 series. Joomla! 4.4 series is a bridge release to make migration from Joomla! 4 to 5 as smooth as possible.

avatar HLeithner
HLeithner - comment - 30 Sep 2023

This pull request has been automatically rebased to 5.1-dev.

avatar HLeithner
HLeithner - comment - 24 Apr 2024

This pull request has been automatically rebased to 5.2-dev.

avatar HLeithner HLeithner - change - 24 Apr 2024
Title
[4.3] [GSoC 21] Core Enhancement 3 - Merge Featured into Articles
[5.2] [GSoC 21] Core Enhancement 3 - Merge Featured into Articles
avatar HLeithner HLeithner - edited - 24 Apr 2024
avatar ChrisHoefliger ChrisHoefliger - test_item - 15 Jul 2024 - Tested unsuccessfully
avatar ChrisHoefliger
ChrisHoefliger - comment - 15 Jul 2024

I have tested this item ? unsuccessfully on 293c6b9

On applying this I get the following error as soon as I open the list of articles:

500 Layout default_batch_footer not found.


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

avatar richard67
richard67 - comment - 15 Jul 2024

On applying this I get the following error as soon as I open the list of articles:

500 Layout default_batch_footer not found.

@ChrisHoefliger Please check each pull request (PR) on GitHub before testing. If the PR shows conflicting files at the bottom on GitHub, it doesn't make much sense to test it. Please change back your test result to "Not tested". Thanks in advance.

avatar crimle crimle - test_item - 15 Jul 2024 - Tested unsuccessfully
avatar crimle
crimle - comment - 15 Jul 2024

I have tested this item ? unsuccessfully on 293c6b9

Before applying teh patch, astonishingly the feature was already there.
After applying the patch, I am getting this error:
An error has occurred.
500 Layout default_batch_footer not found.


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

avatar ChrisHoefliger ChrisHoefliger - test_item - 15 Jul 2024 - Not tested
avatar ChrisHoefliger
ChrisHoefliger - comment - 15 Jul 2024

I have not tested this item.


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

avatar brianteeman
brianteeman - comment - 15 Jul 2024

I have tested this item ? unsuccessfully on 293c6b9Before applying teh patch, astonishingly the feature was already there. After applying the patch, I am getting this error: An error has occurred. 500 Layout default_batch_footer not found.

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

You must have misunderstood as it is not already present

avatar brianteeman
brianteeman - comment - 25 Jul 2024

Thank you @brianteeman for pointing this out. We are going to contact student and mentor about this enhancement as it was a GSoC project. We will also double-check with the UX team on this one.

??

avatar obuisard obuisard - change - 27 Jul 2024
Labels Added: Feature Unit/System Tests PR-5.0-dev PR-5.2-dev
Removed: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jul 2024
Category SQL Administration com_admin Postgresql com_content com_menus Unit Tests SQL Administration com_admin Postgresql com_content com_menus
avatar cybersalt cybersalt - test_item - 20 Aug 2024 - Tested unsuccessfully
avatar cybersalt
cybersalt - comment - 20 Aug 2024

I have tested this item ? unsuccessfully on 293c6b9

I tested this and got a 500 error. Here is the error stack:

An error has occurred.
500 Layout default_batch_footer not found.
Call Stack

Function Location

1 () JROOT/libraries/src/MVC/View/HtmlView.php:425
2 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/administrator/components/com_content/tmpl/articles/default.php:416
3 include() JROOT/libraries/src/MVC/View/HtmlView.php:416
4 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:204
5 Joomla\CMS\MVC\View\HtmlView->display() JROOT/administrator/components/com_content/src/View/Articles/HtmlView.php:151
6 Joomla\Component\Content\Administrator\View\Articles\HtmlView->display() JROOT/libraries/src/MVC/Controller/BaseController.php:697
7 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_content/src/Controller/DisplayController.php:65
8 Joomla\Component\Content\Administrator\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:730
9 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
10 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
11 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:150
12 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:195
13 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:306
14 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:58
15 require_once() JROOT/administrator/index.php:32


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

avatar richard67
richard67 - comment - 20 Aug 2024

I have tested this item ? unsuccessfully on 293c6b9I tested this and got a 500 error. Here is the error stack:

@cybersalt I would say that's expected. If you go to this PR here on GitHub #35228 and scroll to the bottom you will see that this PR has lots of conflicting files. As long as this is the case, it doesn't make sense to test this PR.

See also my previous comment here #35228 (comment) .

avatar chmst
chmst - comment - 20 Aug 2024

This PR is so good and should go into 6.0 due to b/c breaks it cannot go into 5.x.
Meanwhile there were so many changes also in code styles, that a new PR is open. #43907.
The new one is based completely on this one - all descriptions and instructions are still valid.

Closing this one for now to avoid confusion.

avatar chmst chmst - close - 20 Aug 2024
avatar chmst chmst - change - 20 Aug 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-08-20 11:01:01
Closed_By chmst
Labels Removed: Unit/System Tests

Add a Comment

Login with GitHub to post a comment