In the German Forum, we have a post: https://forum.joomla.de/thread/11561-cassiopeia-und-hauptbeitr%C3%A4ge/?postID=70156#post70156
Featured Article is not shown in Featured Blog
Write an article, set is published and featured.
Make a Featured blog.
The article is visible
The article is not visible in the featured blog, but in a normal categoy blog
4.0 nightly build or newest clone.
The problem is only for new articles, not for sample data articles,
Title |
|
Title |
|
Category | ⇒ | com_content |
It is what I found out - the table #__content_frontend is empty after storing and article with featured = yes - therefore not found via the query.
Please not that this does not appear with sample data. They have entries in #__content_frontpage
Dont forget the sample data is written directly to the db so they are not good examples
Yes. It is a hint that people can reproduce the error only with new articles.
I found that if you make an article featured in the item view then it does not work but if you make the article featured by toggling the icon in the list view then it does
That's useful info. Then it should be almost clear where to search.
@brianteeman How is it with selecting a few items and using the action button?
Batch works. therefore the problem is in the item model and not the itemS model
Yep.
@chmst But the featured flag is saved with the new article in the content table? Or is that also lost?
If it is saved, then the mistake might happen somwehere in this function: https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_content/src/Model/ArticleModel.php#L1094
Status | New | ⇒ | Confirmed |
Haven't found the mistake yet. Can be tricky.
Maybe it fails already here so that the function isn't called at all?
The problem is here:https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_content/src/Model/ArticleModel.php#L1189
As @richard67 said already, the prepared statements with empty date are the problem. If dates are entered, the #__content_frontpage record ist stored and all is comme il faut
Then it can be that it broken with #27970 , because when I had done that null date stuff it wasn't prepared statements yet, and I am 100% sure we had tested this case at the end and it has worked.
=> @SharkyKZ Any idea? Maybe binding the null values for the datetimes doesn't work? Or maybe that array bind?
Problem is: Meanwhile I found time to reproduce the error, and I could see nothing in the error log of the database server or in PHP error log. So it is not really an SQL syntax error, such I would see.
Dates, when not set, are empty strings but should be null
when running the query.
If only we had tests
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-04-10 22:23:48 |
Closed_By | ⇒ | joomla-cms-bot |
Closed_By | joomla-cms-bot | ⇒ | SharkyKZ |
Set to "closed" on behalf of @SharkyKZ by The JTracker Application at issues.joomla.org/joomla-cms/28628
Please test PR #28632.
@chmst As you told me elsewhere, the problem is that no record is created in the
#__content_frontpage
table when a new article is created with featued=Yes, is that right?