?
Referenced as Pull Request for: # 28632
avatar chmst
chmst
10 Apr 2020

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

Steps to reproduce the issue

Write an article, set is published and featured.
Make a Featured blog.

Expected result

The article is visible

Actual result

The article is not visible in the featured blog, but in a normal categoy blog

System information (as much as possible)

4.0 nightly build or newest clone.

Additional comments

The problem is only for new articles, not for sample data articles,

avatar chmst chmst - open - 10 Apr 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Apr 2020
avatar chmst chmst - change - 10 Apr 2020
Title
[4.0] Featured Articlers not shown in Frontend
[4.0] Featured Articler not shown in Frontend
avatar chmst chmst - edited - 10 Apr 2020
avatar chmst chmst - change - 10 Apr 2020
Title
[4.0] Featured Articler not shown in Frontend
[4.0] Featured Article not shown in Frontend
avatar chmst chmst - edited - 10 Apr 2020
avatar chmst chmst - change - 10 Apr 2020
The description was changed
avatar chmst chmst - edited - 10 Apr 2020
avatar chmst chmst - change - 10 Apr 2020
Category com_content
avatar chmst chmst - change - 10 Apr 2020
The description was changed
avatar chmst chmst - edited - 10 Apr 2020
avatar richard67 richard67 - change - 10 Apr 2020
The description was changed
avatar richard67 richard67 - edited - 10 Apr 2020
avatar richard67
richard67 - comment - 10 Apr 2020

@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?

avatar chmst
chmst - comment - 10 Apr 2020

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

avatar brianteeman
brianteeman - comment - 10 Apr 2020

Dont forget the sample data is written directly to the db so they are not good examples

avatar chmst
chmst - comment - 10 Apr 2020

Yes. It is a hint that people can reproduce the error only with new articles.

avatar brianteeman
brianteeman - comment - 10 Apr 2020

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

avatar richard67
richard67 - comment - 10 Apr 2020

That's useful info. Then it should be almost clear where to search.

avatar richard67
richard67 - comment - 10 Apr 2020

@brianteeman How is it with selecting a few items and using the action button?

avatar brianteeman
brianteeman - comment - 10 Apr 2020

Batch works. therefore the problem is in the item model and not the itemS model

avatar richard67
richard67 - comment - 10 Apr 2020

Yep.

avatar richard67
richard67 - comment - 10 Apr 2020

@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

avatar richard67 richard67 - change - 10 Apr 2020
Status New Confirmed
avatar richard67
richard67 - comment - 10 Apr 2020

Haven't found the mistake yet. Can be tricky.

avatar richard67
richard67 - comment - 10 Apr 2020
avatar chmst
chmst - comment - 10 Apr 2020

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

avatar richard67
richard67 - comment - 10 Apr 2020

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.

avatar SharkyKZ
SharkyKZ - comment - 10 Apr 2020

Dates, when not set, are empty strings but should be null when running the query.

avatar brianteeman
brianteeman - comment - 10 Apr 2020

If only we had tests

avatar richard67
richard67 - comment - 10 Apr 2020

F...ck, they are of data type sting ... they are not null as they should be. @SharkyKZ is right.

avatar joomla-cms-bot joomla-cms-bot - change - 10 Apr 2020
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2020-04-10 22:23:48
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 10 Apr 2020
avatar SharkyKZ SharkyKZ - change - 10 Apr 2020
Closed_By joomla-cms-bot SharkyKZ
avatar joomla-cms-bot
joomla-cms-bot - comment - 10 Apr 2020

Set to "closed" on behalf of @SharkyKZ by The JTracker Application at issues.joomla.org/joomla-cms/28628

avatar SharkyKZ
SharkyKZ - comment - 10 Apr 2020

Please test PR #28632.


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

Add a Comment

Login with GitHub to post a comment