1. Nasir Khan
  2. SP Page Builder 3.x
  3. Thursday, 25 January 2018
I am using Article addon on several places of my website. I set the addon to use display the latest articles and I assume that the articles are sorted not only by the article recent publish order but categories are sorted as well.
There is no option to change the category order. so the issue is even though an article of 3rd category is the latest one but this addon is showing the articles from the 1st category and the real latest one never shows on top.
Accepted Answer
Accepted Answer Pending Moderation
Hi there,

Please follow the instruction.

Go to the file location
/templates/shaper_travelia/sppagebuilder/addons/articles/site.php

Find out the code and comment this line of code

$output .= '<span class="sppb-meta-date" itemprop="dateCreated">' . Jhtml::_('date', $item->created, 'DATE_FORMAT_LC3') . '</span>';


And replace with this code

$output .= '<span class="sppb-meta-date" itemprop="datePublished">' . Jhtml::_('date', $item->publish_up, 'DATE_FORMAT_LC3') . '</span>';


Go to the file location & find out the code
components/com_sppagebuilder/helpers/articles.php

// has order by
if ($ordering == 'hits') {
$query->order($db->quoteName('a.hits') . ' DESC');
} elseif($ordering == 'featured') {
$query->where($db->quoteName('a.featured') . ' = ' . $db->quote(1));
$query->order($db->quoteName('a.created') . ' DESC');
} elseif($ordering == 'oldest') {
$query->order($db->quoteName('a.created') . ' ASC');
} else {
$query->order($db->quoteName('a.created') . ' DESC');
}



And replace with this code


// has order by
if ($ordering == 'hits') {
$query->order($db->quoteName('a.hits') . ' DESC');
} elseif($ordering == 'featured') {
$query->where($db->quoteName('a.featured') . ' = ' . $db->quote(1));
$query->order($db->quoteName('a.publish_up') . ' DESC');
} elseif($ordering == 'oldest') {
$query->order($db->quoteName('a.publish_up') . ' ASC');
} else {
$query->order($db->quoteName('a.publish_up') . ' DESC');
}



-Thanks
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # Permalink
Responses (15)
Accepted Answer Pending Moderation
Hi,
ok, thanks we will check it , and fix in upcoming updates.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 1
Accepted Answer Pending Moderation
when the update will be published? you must not forget that this is a major bug of a paid extension. Without having the sorting feature there is no meaning of using this addon!
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 2
Accepted Answer Pending Moderation
Hi there,

We have checked your issue. But, we didn’t find the problem at our end. Please watch the screencast video.

https://drive.google.com/file/d/1O50Bzlf-65RbMxzoF-AeJxLbCFVch0VG/view

-Thanks
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 3
Accepted Answer Pending Moderation
@Nasir please show us video from your issue (article settings, addon settings and front-end)
because we couldn't fully recover your issue on our demo.
and please show us structure as you think it should work.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 4
Accepted Answer Pending Moderation
Thanks looking into the issue.

I watched the video o your demo and i saw that you are not facing the issue.

On my end i still facing the issue. I am sure that there is an issue because my category blog layout and Article addon article order are different.

So far by looking into the issue again i assume that the category priority might not the only issue. On Joomla Category blog layout (Menu type) and article order in admin panel are same but Article addon is a little different.

One guess is that Article Addon is ordering Recent articles by sorting the ID in Descending order and Joomla does that by sorting Start Publish Date Descending order.

Let me reproduce that on a fresh installation and i will share the details soon.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 5
Accepted Answer Pending Moderation
thanks,
please record also video , if the problem still persists.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 6
Accepted Answer Pending Moderation
I prepared a staging. Please check the following URLs and help me to identify the difference of the following page settings and to fix that. login credentials are sent to your inbox.

http://bluecube.rocks/joomla1/
http://bluecube.rocks/joomla1/index.php/category-blog
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 7
Accepted Answer Pending Moderation
Both of the code are same. Can you please recheck and update the one needed.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 8
Accepted Answer Pending Moderation
Both of the code are same. Can you please recheck and update the one needed.


Hi, Please check again. Thanks
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 9
Accepted Answer Pending Moderation
New code works.

My assumption about the ID sort was right in a way. By replacing the created date with the published date solved the issue.

I assume a new version of the Component and Template will be released soon. Please release a hot fix version as i am suffering for this for more than a month.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 10
Accepted Answer Pending Moderation
Hi there,

Thank you so much for your kind information. We will apply this fix earlier update version.

-Thanks
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 11
Accepted Answer Pending Moderation
Hello

Is it possible to make this module to have "custom" order?
To utilize Joomla drag and drop article ordering option.

Usually modules like this have this option as well.
Also what does "Featured Only" ordering do?

Thanks,
Regards

Latest Joomla and SPPB pro
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 12
Accepted Answer Pending Moderation
In the future yes, today no.
It was added to wish-list already.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 13
Accepted Answer Pending Moderation
Hi

Good news, thanks.
Also you may consider another feature suggestion: If article has show title option set to hidden, module should obey it. Currently, module always shows article title, no matter of article setting.

Regards
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 14


There are no replies made for this post yet.
Be one of the first to reply to this post!


This forum is archived

This forum has been archived. Please use JoomShaper official support system.