User tests: Successful: Unsuccessful:
Pull Request for Issue #13596.
J4 rebased PR #18052
Added two fields in the article editor featured_up (Start Featured) and featured_down (End Featured)
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)
Create 5 articles:
Only the articles 2 and 5 will be shown in the Articles » Featured Articles menu item and in the News Flash module.
Status | New | ⇒ | Pending |
Category | ⇒ | SQL Administration com_admin Postgresql com_content Language & Strings Front End Installation Layout Libraries |
Labels |
Added:
?
?
|
I tested it. The result was successful.
@impressionestudio please mark your test as successfully (how to: https://docs.joomla.org/Testing_Joomla!_patches#Recording_test_results)
@franz-wohlkoenig This PR has PHPCS errors, I've reviewed accordingly.
@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:
@impressionestudio apologies, i didn't thought that j4 can't be testet by patchtester – @richard67 can you please advise @impressionestudio?
@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.
@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.
@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."
@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.
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....
@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
.
In the sql files, remove
NOT NULL DEFAULT '0000-00-00 00:00:00'
andDEFAULT '1970-01-01 00:00:00' NOT NULL
.In the queries, use
isNullDatetime
.Replace
getNullDate()
withnull
.
@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 ?
I did it
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?
@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?
@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
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 ?
Patch Teste works well on j4 https://github.com/joomla-extensions/patchtester/releases/tag/3.0.0-beta4
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'
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
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.
@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.
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.
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.
I have tested this item
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.
For reference for the "unsuccessful" test:
@richard67 Thanks Richard, makes sense.
The scheduling part worked fine. The expired tags were extra :)
I have tested this item
Marking as successful as the timed featured works well
@WoodyF4u better mark your test successful at top.
This gives it a chance to get included :)
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.
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
Labels |
Added:
Conflicting Files
|
Labels |
Removed:
Conflicting Files
|
I have tested this item
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
I have tested this item
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
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.
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;
I have tested this item
#pbf19 #jd19it
I have tested this item
This is a nice feature! :)
Status | Pending | ⇒ | Ready to Commit |
RTC
I have tested this item
I have tested this item
Retested with the corrections and now the expired gone too. Works well :)
I have tested this item
After applying test patch tester following error appeared in articles view
@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.
I have tested this item
After apply the database changes, test runs successful.
Thanks for your patience on this over the last 2 years!
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:
?
|
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.
@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.
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?
@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?
@brianteeman Yes, I think it is fine when the fields are in the Publishing tab.
But it must work and now it doesn't.
@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.
@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.
Yes, it's not very intuitive how it works. Could be really improved.
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.
In joomla 4 we are trying to avoid useless descruiptions on fields so you can just delete the _DESC strings