mod_flexicategories hide trashed items count

5 months 3 weeks ago #73745 by smarterweb
in the module mod_flexicategories when we enabled the option "Number of Articles (cached)"
the module now also shows trashed items. I think there should be either an option to disable this or do not display any trashed items counter.

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago #73746 by ggppdk
Hello

It is already published items with states
- Published
- Published - work in progress
and with publication times that are non-scheduled and non-expired

Try cleaning cache to see if that makes a difference


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago #73764 by smarterweb
hello, 
I am talking about the variable $numitems not the articles themselves.
I did clear cache, tried different browsers but frontend of module always shows the total (including trash) number of articles.

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago - 5 months 3 weeks ago #73766 by ggppdk
Hello

i will add fix for next release

Edit via FTP or via SSH or via CPANEL filemanager
the plugin file
plugins/system/flexisystem/flexisystem.php

if you edit via WEB filemanager and you break the syntax then your website will no longer load

Find query about line 700
  // Get total active items for every category
        $query    = 'SELECT c.id, COUNT(rel.itemid) AS numitems'
            . ' FROM #__categories as c'
            . ' LEFT JOIN #__flexicontent_cats_item_relations AS rel ON c.id=rel.catid'
            . ' LEFT JOIN #__content AS i ON rel.itemid=i.id '
            . '  AND i.state IN (1,-5) '
            . '  AND ( i.publish_up = ' . $db->Quote($nullDate) . ' OR i.publish_up <= ' . $_nowDate . ' )'
            . '  AND ( i.publish_down = ' . $db->Quote($nullDate) . ' OR i.publish_down >= ' . $_nowDate . ' )'
            . ' WHERE c.extension=' . $db->Quote(FLEXI_CAT_EXTENSION) . ' AND c.lft > ' . $db->Quote(FLEXI_LFT_CATEGORY) . ' AND c.rgt < ' . $db->Quote(FLEXI_RGT_CATEGORY)
            . ' GROUP BY c.id'
            ;
Replace 2 times
LEFT JOIN
with
JOIN

clear joomla cache
and then view page with the module


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago #73767 by smarterweb
fantastic! thank you very much, 
once again you guys ROCK! great support, can't wait for the pro version

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.