User tests: Successful: Unsuccessful:
Pull Request for Issue #26828 .
Remove the check for featured_up
and featured_down
times in the content table class.
The featured_up
and featured_down
columns have been added to database table #__content_frontpage
with PR #25979 , thanks @eshiol for that new functionality and your patience.
During development, the new database columns first were added to table #__content
and later have been mode to table #__content_frontpage
.
This PR here removes a remainder of that change which causes the issue described in #26828 .
Thanks @Quy for having discovered the issue.
E_ALL
in your php.ini and switch on error logging to file or display of errors.No errors or warnings or notices.
PHP Notice: Undefined property: Joomla\Component\Content\Administrator\Table\ArticleTable::$featured_up in \libraries\src\Table\Content.php on line 278
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
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|
Set to null
if not set $this->featured_up
and $this->featured_down
.
Or maybe saving to the #__content_frontpage
is missing and has to be added?
Labels |
Added:
?
|
I've pinged George with a comment here, hope we will reply: #25979 (comment)
Notices are gone, however, featured dates don't swap when finish date is less than start date.
Notices are gone, however, featured dates don't swap when finish date is less than start date.
I think this is the wrong fix then.
@Quy It has been moved from the content table to the content frontpage table during development of that and there has been something forgotten for saving, that's what I think. Or can you check if changes on these dates are saved so you later see them when going back to the form from somewhere else?
Are you suggesting that lines 277 to 284 should not be there at all?
I do see them when editing.
Yes, that's what I think. You can save changes in them? Gotta go now, brb later.
Yes changes are saved.
And if you remove the code for those columns completely? Changed still saved?
Am away from desk now, can’t test myself.
Yes.
Hmm, I see, the function is necessary to fill times in the edit form.
The code for loading data for display should be moved to article model's getItem()
method. Date sanity checks should be moved to model's featured()
method and maybe to Joomla\Component\Content\Administrator\Table\FeaturedTable
class. We don't really use the latter when saving though.
No, that will have to be done in the frontend model as well.
Although I might be completely wrong with this suggestion. To me it seems that table class shouldn't load properties from other tables. But then Joomla\CMS\Table\User
does exactly that with groups. So I'm not sure anymore.
@SharkyKZ I get an error 1054 Unknown column 'featured_up, featured_down' in 'field list'
when testing your suggested change and opening the article for edit. The swapping of the dates is rubbish anyway, I'll leave that away. Other sanity checks seem already to be done.
I have tested this item
@infograf768 Could you test this here, too?
I have tested this item
tested with the json api
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-10-27 05:33:44 |
Closed_By | ⇒ | infograf768 | |
Labels |
Added:
?
|
tks
tested with the json api
@brianteeman Was your test maybe for #26825 and not this one here? Just to be sure all is right.
my test was for here
This is still an issue.