User tests: Successful: Unsuccessful:
Pull Request for Issue #27001 .
Check if featured up and down are set in data before calling the featured routine.
With PR #25979 scheduling of featuring articles has been implemented.
During development of this PR, the 2 new database columns have been moved from table #__content
to table #__content_frontpage
. This change introduced errors which obviously have not been noticed when testing that PR. Some other errors caused by this have already been fixed, see e.g. PR #26829 . This PR here fixes another of these errors.
The error happens with blog sample data and testing sample data. But testing sample data needs in addition PR #26392 , so the test of blog sample data is easier and should be sufficient. The error fixed here is the same for both.
Install Blog Sample Data and watch the PHP error log (with error reporting set to "maximum" or "development").
Edit an article or create a new one, set the featured option to "Yes", and in the fields for feature start and end which appear then, enter some times. Click "save and close" to save the article and close the edit view.
Edit the article again which you have edited in step 2. Check if the dates and times entered in step 2 for featured start and end are still the same.
For step 1: No PHP notices.
For step 3: The dates and times are still the same, i.e. they were correctly saved in database.
For step 1: There are 2 PHP Notices:
PHP Notice: Undefined index: featured_up in \administrator\components\com_content\Model\ArticleModel.php on line 950
PHP Notice: Undefined index: featured_down in \administrator\components\com_content\Model\ArticleModel.php on line 950
For step 3: See expected result.
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_content |
Title |
|
Multilang sample data was inserting data directly to the frontpage table and got patched already - so I don't think this will be an issue there. I think this looks like the correct fix for me. These values are nullable so shouldn't be required on store
Yes, I meanwhile also got more confident and think it is a correct fix. Now it only needs 2 testers ;-)
Labels |
Added:
?
|
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
rtc
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-11-07 10:59:54 |
Closed_By | ⇒ | infograf768 | |
Labels |
Added:
?
|
tks
Thanks.
@wilsonge Please review, and read also what I wrote in summary of changes about fixing the diverse sample data in addition, and that I am not sure if this PR fixes the issue in the right way.
Update: I think this featured up and down thing needs to be a bit redesigned, too, maybe together with workflows v2, because like it is made now that the table class of the content table reads also data from content_frontpage table seems to be wrong to me, I think such stuff belongs into models or maybe a helper. But I am not deep enough into Joomla 4 architecture to be sure with that or to be able to redesign that functionality in the right way, at least not without help/advice.