? ? ? Failure

User tests: Successful: Unsuccessful:

avatar eshiol
eshiol
22 Aug 2019

Pull Request for Issue #13596.
J4 rebased PR #18052

Summary of Changes

Added two fields in the article editor featured_up (Start Featured) and featured_down (End Featured)
Cattura
An article is featured if featured is yes and (featured_up is null or is less than or is equal to now) and (featured_down is null or is greater than or is equal to now)

Testing Instructions

Create 5 articles:

  1. not featured
  2. featured, featured_up = null, featured_down = null
  3. featured, featured_up = tomorrow, featured_down = null
  4. featured, featured_up = null, featured_down = yesterday
  5. featured, featured_up = yesterday, featured_down = tomorrow
    Create an Articles » Featured Articles menu item
    Create a News Flash module and set the option Featured Articles to Only show Featured Articles.

Expected result

Only the articles 2 and 5 will be shown in the Articles » Featured Articles menu item and in the News Flash module.

Actual result

Documentation Changes Required

avatar eshiol eshiol - open - 22 Aug 2019
avatar eshiol eshiol - change - 22 Aug 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Aug 2019
Category SQL Administration com_admin Postgresql com_content Language & Strings Front End Installation Layout Libraries
avatar eshiol eshiol - change - 22 Aug 2019
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 23 Aug 2019

In joomla 4 we are trying to avoid useless descruiptions on fields so you can just delete the _DESC strings

avatar impressionestudio
impressionestudio - comment - 24 Aug 2019

I tested it. The result was successful.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Aug 2019
avatar richard67
richard67 - comment - 24 Aug 2019

@franz-wohlkoenig This PR has PHPCS errors, I've reviewed accordingly.

avatar impressionestudio
impressionestudio - comment - 24 Aug 2019

@impressionestudio please mark your test as successfully (how to: https://docs.joomla.org/Testing_Joomla!_patches#Recording_test_results)

I installed Joomla Patch Tester, applied the patch and then the page crashed with errors like:

  • Unknown column 'a.featured_up' in 'field list' Unknown column 'a.featured_up' in 'where clause'
  • Warning: Invalid argument supplied for foreach() in D:\Localhost\joomla4\components\com_content\Model\ArticlesModel.php on line 628
  • Warning: Invalid argument supplied for foreach() in D:\Localhost\joomla4\modules\mod_articles_news\Helper\ArticlesNewsHelper.php on line 121
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Aug 2019

@impressionestudio apologies, i didn't thought that j4 can't be testet by patchtester – @richard67 can you please advise @impressionestudio?

avatar richard67
richard67 - comment - 24 Aug 2019

@impressionestudio Patchtester has to be latest version 3.0.0-beta4.

After having applied the patch, you have to run the SQL statements in file administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-08-20.sql or administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-08-20.sql in PhpMyAdmin or PhpPgAdmin, depending on which database you use. You have to replace the #__ with your database prefix (including the _ at the end).

Or if you are on a testing environment where you can do that, also apply the patch, then delete all tables from your database, remove configuration.php and makle a clean new installation.

avatar Quy
Quy - comment - 24 Aug 2019

See PR #25760 to see how to convert datetime to null value.

avatar impressionestudio
impressionestudio - comment - 24 Aug 2019

@richard67 thank you for the instructions and @franz-wohlkoenig for the answers.

I have installed the latest version 3.0.0-beta4.
But the problem is that I am not keen to Github. Also all these actions are too much for me.
I thought that testing would be easier. I wanted to help but it seems I am not able to do it and I don't want to tire you more.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Aug 2019

@impressionestudio there's a plan to make patchtester ready fpr j4 – which also would help me to test :-).

"Joomla 4 has steps to compile assets (composer and npm) and the Patchtester component does not support that (yet). The idea is, that our CI system is compiling these assets and provides them via some API to the Patchtester component."

from https://volunteers.joomla.org/teams/automated-tests-working-group/reports/1080-meeting-report-2019-08-05

avatar richard67
richard67 - comment - 24 Aug 2019

I will test this PR after @Quy 's suggestions will be implemented.

avatar richard67
richard67 - comment - 25 Aug 2019

@Quy Is there something to be done with datetime null values in this PR? I see your comment above but can‘t see to what in the code it is related.

avatar richard67
richard67 - comment - 25 Aug 2019

@franz-wohlkoenig The patch tester component never did run the schema updates (these are those sql scripts with date and version in their name) because if it would do that, it would also need a kind of undo script to revert the changes. This was always the case and is same for J3 and J4, so you always have to run the SQL manually. Only difference on J4 is that when a PR changes js or (s)css, you have to run npm install after applying the patch and then again after reverting it after test.

avatar alikon
alikon - comment - 25 Aug 2019

as already reported on the original pr for j3 here #18052 (review) and here #18052 (comment)

"featured_up" and "featured_down" fields should go into the "#__content_frontpage" table and not in the #__content table....

avatar Quy
Quy - comment - 25 Aug 2019

@richard67
In the sql files, remove NOT NULL DEFAULT '0000-00-00 00:00:00' and DEFAULT '1970-01-01 00:00:00' NOT NULL.

In the queries, use isNullDatetime.

Replace getNullDate() with null.

avatar richard67
richard67 - comment - 25 Aug 2019

In the sql files, remove NOT NULL DEFAULT '0000-00-00 00:00:00' and DEFAULT '1970-01-01 00:00:00' NOT NULL.

In the queries, use isNullDatetime.

Replace getNullDate() with null.

@eshiol Could you implement those suggestions by @Quy ? And move "featured_up" and "featured_down" fields to the "#__content_frontpage" table as suggested by @alikon ?

avatar eshiol
eshiol - comment - 29 Aug 2019

I did it

avatar WoodyF4u
WoodyF4u - comment - 1 Sep 2019

Dear developers,
Is my question still in progress?
Or is it closed again?

I don't understand the status in:
Closed:
#25439
#18052

Open PR:
#25979
Or is this losed tooo?

At the moment it is not yet in Alpha 10.
I realy hope it is still on the list for Joomla! 4.0

avatar richard67
richard67 - comment - 1 Sep 2019

@WoodyF4u This is open and waits for testers. Unfortunately I have no time to test right now. Could you test?

avatar WoodyF4u
WoodyF4u - comment - 2 Sep 2019

Hi Richard,
Of course I like to test it.
But yesterday I istalled a fresh J4.0 Alpha 10, but in that release I can not find this new feature.
What can I do to find this feature?

avatar richard67
richard67 - comment - 8 Sep 2019

@WoodyF4u Since this PR here which implements this new feature is still open and waits to be tested, it can't be already part of some 4.0 Alpha or nightly build. It needs to test this PR here.

avatar WoodyF4u
WoodyF4u - comment - 11 Sep 2019

@richard67 OK I understand it can not be a part of an Alpha-release.
But I am a simple Joomla user and not a developer.
How can I test this new feature in a latest 4 Alpha?

avatar brianteeman
brianteeman - comment - 11 Sep 2019

@WoodyF4u follow the guide here https://brian.teeman.net/joomla/873-a-dummies-guide-to-joomla-bug-testing

Obviously with joomla 4 alpha not joomla 3 but otherwise the instructions are the same

avatar WoodyF4u
WoodyF4u - comment - 29 Sep 2019

Hi Brian,
I just installed e fresh Joomla! 4 Alpha 11 and after that I installed The Joomla! Patch Tester.
When I go to Componnts and select the Joomla! Patch Tester I receive this error:
Class '\PatchTester\Controller\DisplayController' not found

Are you sure this component is ready for Joomla! 4 ?

avatar alikon
alikon - comment - 30 Sep 2019
avatar WoodyF4u
WoodyF4u - comment - 30 Sep 2019

Thanks. I was using Patch Tester 2.0.0
Now with the 3.0.0 it runs great.
So I added the patch to Joomla! 4.0 Alpha 11 now.
And I tried to add a new article with scheduling the featured options.
Iadded a start date and time and I added a stop date and time.
Then I would save the article but received the error below.
I hope someone can fix it so I can do a new test.

1054 Unknown column 'featured_up' in 'field list'

avatar alikon
alikon - comment - 30 Sep 2019

you need to run manually in phpmyadmin the sql script provided here https://github.com/joomla/joomla-cms/pull/25979/files#diff-258e43a1cdbb61e7a9ba5fccd61a692e

ALTER TABLE `#__content_frontpage` ADD COLUMN `featured_up` datetime;
ALTER TABLE `#__content_frontpage` ADD COLUMN `featured_down` datetime;

remember to change #__ with you table prefix

avatar WoodyF4u
WoodyF4u - comment - 30 Sep 2019

Hi Nicola,
I addedd the columns to he database.
Now I can add an article to the Joomla 4 test site.
I can set it featured and the article will be visible at the home page.
That's the normal way of Joomla.
But as soon as I set a start date and time and a finish date and time.
The featured article at the home page is no longer visible there.
So dor as far as I can test it now, the fields "Start featured" and "Finish featured" do'n't do what it need o do.

avatar richard67
richard67 - comment - 1 Oct 2019

@WoodyF4u Maybe you have to specify times in UTC? I’ve noticed that bug at other places in past. It could be that you enter a time for featured up of which you think it comes in 5 minutes but when you are in time zone UTC+2 you might have to wait 2 hours and 5 minutes. Could you check that and report back the result here? I currently can’t test that myself.

avatar WoodyF4u
WoodyF4u - comment - 1 Oct 2019

Hi Richard,
Clever!
I changed the time setting in the Global configuration to Amsterdam.
Now it works great.
So for now I am very happy with this.

One issue:
When I set a Finish time before the Start time, it is possible to save the article.
It would be nice when there will be a message popup when this is detected.

avatar WoodyF4u
WoodyF4u - comment - 18 Oct 2019

Is there someone with developer knowledge here who can continue this request?
I realy hope this feature will be part of Joomla 4.0 soon.

avatar ot2sen ot2sen - test_item - 18 Oct 2019 - Tested unsuccessfully
avatar ot2sen
ot2sen - comment - 18 Oct 2019

I have tested this item ? unsuccessfully on 7b025d9

The timed Featured seems to work, but the articles themselves get an 'Expired' tag at all times after having added the sql

ALTER TABLE myprefix_content_frontpage ADD COLUMN featured_up datetime;
ALTER TABLE myprefix_content_frontpage ADD COLUMN featured_down datetime;

Feeling uncertain whether to mark as successful or unsuccessful, chose the latter.


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

avatar ot2sen
ot2sen - comment - 18 Oct 2019

For reference for the "unsuccessful" test:

screen shot 2019-10-18 at 20 16 25


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

avatar richard67
richard67 - comment - 18 Oct 2019

@ot2sen The reason is that this PR has not been adapted to latest changes in 4.0-dev regarding null values for datetime database columns, and it also has merge conflicts as you can see at the bottom.

avatar ot2sen
ot2sen - comment - 18 Oct 2019

@richard67 Thanks Richard, makes sense.
The scheduling part worked fine. The expired tags were extra :)

avatar ot2sen ot2sen - test_item - 18 Oct 2019 - Tested successfully
avatar ot2sen
ot2sen - comment - 18 Oct 2019

I have tested this item successfully on 7b025d9

Marking as successful as the timed featured works well


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

avatar ot2sen
ot2sen - comment - 18 Oct 2019

@WoodyF4u better mark your test successful at top.

This gives it a chance to get included :)


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

avatar richard67
richard67 - comment - 18 Oct 2019

It has merge conflicts which have to be solved by the author. If it then breaks something else, it has to be fixed. Tomorrow or Sunday I could help with the latter. But just because the desired function change works to give a good test when it is obvious that it breaks something else is not good.

avatar ot2sen
ot2sen - comment - 18 Oct 2019

Obviously, you´re right @richard67 :) Quality control matter.
Pushing to wake up @eshiol so we can get the nice work included. I know of more people who have requested this feature

avatar eshiol eshiol - change - 18 Oct 2019
Labels Added: Conflicting Files
avatar eshiol eshiol - change - 18 Oct 2019
Labels Removed: Conflicting Files
avatar opn365 opn365 - test_item - 19 Oct 2019 - Tested unsuccessfully
avatar opn365
opn365 - comment - 19 Oct 2019

I have tested this item ? unsuccessfully on 6c727cd

after applying patch and click content> articles
An error has occurred.
500 Unknown column 'fp.featured_up' in 'field list' Unknown column 'fp.featured_up' in 'field list'

Setting Value
PHP Built On Linux joomlapbf.directrouter.com 2.6.32-754.3.5.el6.x86_64 #1 SMP Tue Aug 14 20:46:41 UTC 2018 x86_64
Database Type mysql
Database Version 10.2.27-MariaDB
Database Collation utf8mb4_unicode_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 7.2.23
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 4.0.0-beta1-dev Development [ Amani ] 17-October-2019 20:21 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36


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

avatar opn365 opn365 - test_item - 19 Oct 2019 - Tested unsuccessfully
avatar opn365
opn365 - comment - 19 Oct 2019

I have tested this item ? unsuccessfully on 6c727cd

after applying patch and click content> articles ( the menu link )
An error has occurred.
500 Unknown column 'fp.featured_up' in 'field list' Unknown column 'fp.featured_up' in 'field list'

However
after applying patch and click content> then the plus icon beside articles then i can create an article

Setting Value
PHP Built On Linux joomlapbf.directrouter.com 2.6.32-754.3.5.el6.x86_64 #1 SMP Tue Aug 14 20:46:41 UTC 2018 x86_64
Database Type mysql
Database Version 10.2.27-MariaDB
Database Collation utf8mb4_unicode_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 7.2.23
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 4.0.0-beta1-dev Development [ Amani ] 17-October-2019 20:21 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36


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

avatar TobsBobs
TobsBobs - comment - 19 Oct 2019

@opn365 I think you must manually install the needed columns in your database table.

avatar richard67
richard67 - comment - 19 Oct 2019

Exactly, patchtester does not run the update sql, and the database fix button in extensions - manage - database would only run the schema changes but not the insert/update/delete statements.

avatar TobsBobs
TobsBobs - comment - 19 Oct 2019

see here:

administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-08-20.sql
ALTER TABLE #__content_frontpage ADD COLUMN featured_up datetime;
ALTER TABLE #__content_frontpage ADD COLUMN featured_down datetime;

avatar alikon alikon - test_item - 19 Oct 2019 - Tested successfully
avatar alikon
alikon - comment - 19 Oct 2019

I have tested this item successfully on 04dd1ea

#pbf19 #jd19it


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

avatar TobsBobs TobsBobs - test_item - 19 Oct 2019 - Tested successfully
avatar TobsBobs
TobsBobs - comment - 19 Oct 2019

I have tested this item successfully on 04dd1ea


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

avatar TobsBobs
TobsBobs - comment - 19 Oct 2019

This is a nice feature! :)

avatar Quy Quy - change - 19 Oct 2019
Status Pending Ready to Commit
avatar Quy
Quy - comment - 19 Oct 2019

RTC


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

avatar neotrendch neotrendch - test_item - 19 Oct 2019 - Tested successfully
avatar neotrendch
neotrendch - comment - 19 Oct 2019

I have tested this item successfully on 04dd1ea


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

avatar ot2sen ot2sen - test_item - 19 Oct 2019 - Tested successfully
avatar ot2sen
ot2sen - comment - 19 Oct 2019

I have tested this item successfully on 04dd1ea

Retested with the corrections and now the expired gone too. Works well :)


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

avatar rmittl rmittl - test_item - 19 Oct 2019 - Tested unsuccessfully
avatar rmittl
rmittl - comment - 19 Oct 2019

I have tested this item ? unsuccessfully on 04dd1ea

After applying test patch tester following error appeared in articles view


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25979.
avatar rmittl
rmittl - comment - 19 Oct 2019

Screenshot 2019-10-19 at 16 15 45

avatar richard67
richard67 - comment - 19 Oct 2019

@rmittl The reason is that this Pull Request contains SQL changes, and the Patchtester does not run those changes. You have to apply the SQL from the update sql script manually e.g. in PypMyAdmin.

See the following comments above:

#25979 (comment)
#25979 (comment)
#25979 (comment)

So please either set your test result back to "I have not tested this item" in the issue tracker, or test again in the right way, e.g. including manual execution of the SQL changes, and set then the appropriate test result in the tracker.

avatar rmittl rmittl - test_item - 19 Oct 2019 - Tested successfully
avatar rmittl
rmittl - comment - 19 Oct 2019

I have tested this item successfully on 04dd1ea

After apply the database changes, test runs successful.


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

avatar wilsonge
wilsonge - comment - 25 Oct 2019

Thanks for your patience on this over the last 2 years!

avatar wilsonge wilsonge - change - 25 Oct 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-10-25 22:43:33
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 25 Oct 2019
avatar wilsonge wilsonge - merge - 25 Oct 2019
avatar WoodyF4u
WoodyF4u - comment - 26 Oct 2019

Thanks to everybody who helped to create this feature.
The only thing I have to wait for is the 4.0-Stable.
Then I can use this feature.

avatar richard67
richard67 - comment - 26 Oct 2019

@wilsonge It seems there is an issue, #26829 , related to this PR. When checking the changed files here, I see stuff for handling featureed up and down times to the content table class, but during development of this PR, the 2 new columns have been moved to the #__content_frontpage. I can see there is something for reading from this table added to the core content table class, routine load(), but I see nothing for writing these columns back to #__content_frontpage. Instead of it I see the handling of the new columns in the check routine as if they would belong to the #__content table. Am I blind or do I understand something wrong? Please check and advise.

avatar WoodyF4u
WoodyF4u - comment - 14 Jul 2020

Today, I installed Joomla 4.0 beta 2.
There is stuill no option to use the scheduled featured articles.
Is it still nessesary to install that manually or should this be a part of this Beta 2 already?

avatar SharkyKZ
SharkyKZ - comment - 14 Jul 2020

@WoodyF4u The feature is already present. But it might be difficult to find. It's in Publishing tab. Maybe we should move these fields right under Featured field.

avatar brianteeman
brianteeman - comment - 14 Jul 2020

@SharkyKZ by that logic the start publishing dates should be moved as well

avatar WoodyF4u
WoodyF4u - comment - 14 Jul 2020

@SharkyKZ Thanks for pointing me to the Publishing tab.
I have tested it, but when I add a date and time for Start Featured and Finish Featured and click Save, both fields are empty.
So there is nothing saved and the article will not change in the featured state.
Is it possible that someone else can test it?

avatar WoodyF4u
WoodyF4u - comment - 14 Jul 2020

@brianteeman Yes, I think it is fine when the fields are in the Publishing tab.
But it must work and now it doesn't.

avatar brianteeman
brianteeman - comment - 14 Jul 2020

@WoodyF4u and I forgot that I discovered that the other day and raised an issue #29942

avatar richard67
richard67 - comment - 14 Jul 2020

@WoodyF4u You first have to change the featured state to "Featured". Then you can set the start and end times (featured up and featured down). Then the times are respected when showing it on a featured page. Published up and down should work in the same way, by the way.

avatar WoodyF4u
WoodyF4u - comment - 14 Jul 2020

@riochard67 Thanks. That works!
In case you have to set Featured to ON first, it would be better when the options for Start Featured and Finish Featured will be vbelow the Featured switch.
Cause there is not any warning that tells the user to switch the Featured state first.

avatar richard67
richard67 - comment - 14 Jul 2020

Yes, it's not very intuitive how it works. Could be really improved.

avatar WoodyF4u
WoodyF4u - comment - 8 Aug 2020

Please look at the first screenshpot of this PR. There you see the Featured ON-OFF switch.
When Featured is ON, the two extra fields for scheduling will be visible.
I think that will be the best place for the scheduling option of the Featured articles.

I am not a developer, but I hope someone can fix this for he next beta so we can test it again and maybe approve it for Joomla! 4.

Add a Comment

Login with GitHub to post a comment