upgrade to Joomla 3.3-NSP GK4 not displaying latest article

Free responsive Joomla 2.5 and 3.x module to present your content with easy and intuitive way.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Thu May 08, 2014 7:11 pm
NOTE: I am using the following Gavick products: News Show Pro GK4 and The Worlds News II template.

Today, I executed an upgrade from Joomla 2.5.19 to Joomla 3.3. I made a copy of my production site and I executed the upgrade on the test copy of my site. The upgrade went well, except for one strange problem.

The lead story module (Cultural Commentary, upper left) will not display the latest article. In fact, it will not display any articles with the current date, today's date. To test this theory, I took the article that does display and changed its create date to the current date; and, sure enough, it no longer displayed.

You can see the differences here:

http://dev25.denisonforum.org (test site, 3.3)
http://www.denisonforum.org (production site, 2.5.19)

Also, you can see the missing article by clicking on th 'Cultural Commentary' link on the top menu
(http://dev25.denisonforum.org/cultural-commentary)

The module parameters for that lead module are:

    Source of articles: Joomla! categories
    Categories: Cultural Commentary
    News order: By date
    News sort order: Descending
    Show article created after: blank
    Show frontpage items: Enabled
    Show unauthorized items: Disabled
    Frontpage items only: Disabled
    First news number: 0
    Time offset: 0

Then, I tried to bypass the impact of the date on the results by changing the 'Source of articles' to 'Joomla! articles' and I specified the specific article that I expected to display (id=1034). This resulted in a database error:

Code: Select all
1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND categories.published = 1 ORDER BY content.created DESC' at line 28 SQL=SELECT categories.title AS cat, content.id AS ID, content.access AS access, categories.title AS cat, users.email AS author_email, users.name AS author, content_rating.rating_sum AS rating_sum, content_rating.rating_count AS rating_count, categories.id AS CID FROM jml_content AS content LEFT JOIN jml_categories AS categories ON categories.id = content.catid LEFT JOIN jml_content_frontpage AS frontpage ON content.id = frontpage.content_id LEFT JOIN jml_users AS users ON users.id = content.created_by LEFT JOIN jml_content_rating AS content_rating ON content_rating.content_id = content.id WHERE AND categories.published = 1 ORDER BY content.created DESC


I am looking at the code now, but I thought that I would check with everyone while I looked to see if anyone has encountered this problem yet.

Thanks in advance for any help.
User avatar
Fresh Boarder

teitbite
Thu May 08, 2014 7:35 pm
Hi

This is a known problem with joomla articles. Please try play with modules Time offset value till You will see the latest articles right after publishing.
User avatar
Moderator

GK User
Thu May 08, 2014 7:58 pm
Okay, I will do that, thank you. But, can I ask another question?

Here is the SQL command that was created to select my articles:

SELECT
content.id AS IID,
content.title AS title,
content.introtext AS TEXT,
content.created AS DATE,
content.publish_up AS date_publish,
content.hits AS hits,
content.images AS images
FROM #__content AS content
WHERE
content.state = 1 AND
content.access IN (1,1) AND
( content.publish_up = '0000-00-00 00:00:00' OR content.publish_up <= '2014-05-08 00:00:00' ) AND
( content.publish_down = '0000-00-00 00:00:00' OR content.publish_down >= '2014-05-08 00:00:00' ) AND
( content.catid = 14 )
ORDER BY content.created DESC LIMIT 0,16;

I would have expected the datetime in the WHERE clauses to be something other than 00:00:00.

Looking in mod_news_pro_gk4/gk_classes/gk.source.joomla.php around line 112, I see this command:

$now = $date->toSql(true);

Is that toSQL function, method the problem
User avatar
Fresh Boarder

GK User
Thu May 08, 2014 8:07 pm
Okay, so I tried this and it worked exactly as I expected it to work and I think that it eliminates the need to mess with time offset value.

In ./mod_news_pro_gk4/gk_classes/gk.source.joomla.php, I changed line 111 from:

$date = JFactory::getDate($config['time_offset'].' hour '.date('Y-m-d', strtotime('now')));
to:
$date = JFactory::getDate($config['time_offset'].' hour '.date('Y-m-d H:i:s', strtotime('now')));

which seems to cause the module to pass in the current date and time not just the current date!

Thoughts?
User avatar
Fresh Boarder

teitbite
Sat May 10, 2014 6:08 pm
Hi

I think it's still depends of database server configuration, so this may not work for everyone, but if it works for You this is an exelence solution.
User avatar
Moderator

GK User
Sat May 10, 2014 11:29 pm
Error: No articles to display i have same problem :S i think there was a wrong
User avatar
Fresh Boarder

teitbite
Mon May 12, 2014 10:43 am
Hi

@bluevalente, this may be showing from number of miss configuration issues. Try the fix proposed in this thread, if this will not help send me an access to joomla panel with an id of module i should focus on.
User avatar
Moderator


cron