1. Fabrik 3.8.1 has been released. It is mostly bug fixes and feature enhancements, but does include two new plugins (push notifications, and the sequence element). As usual we strongly recommend testing the new release on a sandbox if your application is mission critical, and always do an Akeeba backup before updating.
    Dismiss Notice

Content Plugin - No Records

Discussion in 'Community' started by nclaypool, Sep 12, 2018 at 1:54 PM.

  1. nclaypool

    nclaypool Member

    Level: Community
    I have several articles published in Joomla with {fabrik view=list... items posted inside them to display various content in a dashboard sort of way.

    Recently a whole series of them just started saying "No records" instead of displaying the actual list contents. I still have others that appear to work just fine. I have tried removing any filtering from the list reference just to get something to display, even then where its literally referencing a list ID and nothing more it still says no records. I also tried referencing a different list, same thing.

    Normally these references would display records using a date based filter. I'm scratching my head here. Anybody else experiencing this issue.
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Try appending &clearfilters=1 to the page URL (or ?clearfilters=1 if it's the first query string arg).

    -- hugh
     
  3. nclaypool

    nclaypool Member

    Level: Community
    Interesting, while that does make one of them display records it appears they're being displayed without any filtering
     
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Try appending &fabrikdebug=1 (make sure Fabrik Debug is enabled in the global options), and look at the getData query for the lists in the debug output. See if there's any clues in those.

    -- hugh
     
  5. nclaypool

    nclaypool Member

    Level: Community
    Here's the items that debug spit out.
    Any specific one you would think seeing would be helpful or do you want me to dump them all up here.

    render:post
    filter array: after querystring filters
    filter array: after session filters
    filter array: search form
    filter array: start getPostFilters
    filter array: before onGetPostFilter
    filter array: after onGetPostFilter
    filter array: after getpostfilters
    filter array
    filter array: after access taken into account
    filter:request
    prefilters
    filter:request keys
    listmodel::getFilterArray middle
    end filters
    after plugins:eek:nFiltersGot
    joins
    list GetData:SC - UP Dashboard
    table:data
    joins
    element filterValueList_Exact:
    joins
    element filterValueList_Exact:
    joins
    element filterValueList_Exact:
    joins
    element filterValueList_Exact:
     
  6. troester

    troester Administrator Staff Member

    Level: Community
    So click on "list GetData:SC - UP Dashboard", this will show you a MySQL query.
    The "WHERE" part is the interesting one.
     
  7. nclaypool

    nclaypool Member

    Level: Community
    Here's the output from that item:

    SELECT SQL_CALC_FOUND_ROWS DISTINCT `staff_certifications`.`id` AS `staff_certifications___id`,
    `staff_certifications`.`id` AS `staff_certifications___id_raw`,
    `staff_certifications`.`date_time` AS `staff_certifications___date_time`,
    `staff_certifications`.`date_time` AS `staff_certifications___date_time_raw`,
    `staff_certifications`.`modified_by` AS `staff_certifications___modified_by_raw`,
    `joslo_users`.`name` AS `staff_certifications___modified_by`,
    `staff_certifications`.`name` AS `staff_certifications___name`,
    `staff_certifications`.`name` AS `staff_certifications___name_raw`,
    `staff_certifications`.`center` AS `staff_certifications___center`,
    `staff_certifications`.`center` AS `staff_certifications___center_raw`,
    `staff_certifications`.`degree` AS `staff_certifications___degree`,
    `staff_certifications`.`degree` AS `staff_certifications___degree_raw`,
    `staff_certifications`.`inservice_training_hours` AS `staff_certifications___inservice_training_hours`,
    `staff_certifications`.`inservice_training_hours` AS `staff_certifications___inservice_training_hours_raw`,
    `staff_certifications`.`cda` AS `staff_certifications___cda`,
    `staff_certifications`.`cda` AS `staff_certifications___cda_raw`,
    `staff_certifications`.`child_abuse_neglect` AS `staff_certifications___child_abuse_neglect`,
    `staff_certifications`.`child_abuse_neglect` AS `staff_certifications___child_abuse_neglect_raw`,
    `staff_certifications`.`cr` AS `staff_certifications___cr`,
    `staff_certifications`.`cr` AS `staff_certifications___cr_raw`,
    `staff_certifications`.`cpr` AS `staff_certifications___cpr`,
    `staff_certifications`.`cpr` AS `staff_certifications___cpr_raw`,
    `staff_certifications`.`fp` AS `staff_certifications___fp`,
    `staff_certifications`.`fp` AS `staff_certifications___fp_raw`,
    `staff_certifications`.`first_aid` AS `staff_certifications___first_aid`,
    `staff_certifications`.`first_aid` AS `staff_certifications___first_aid_raw`,
    `staff_certifications`.`safe_sleep` AS `staff_certifications___safe_sleep`,
    `staff_certifications`.`safe_sleep` AS `staff_certifications___safe_sleep_raw`,
    `staff_certifications`.`tb` AS `staff_certifications___tb`,
    `staff_certifications`.`tb` AS `staff_certifications___tb_raw`,
    `staff_certifications`.`unip` AS `staff_certifications___unip`,
    `staff_certifications`.`unip` AS `staff_certifications___unip_raw`,
    `staff_certifications`.`race` AS `staff_certifications___race`,
    `staff_certifications`.`race` AS `staff_certifications___race_raw`,
    `staff_certifications`.`id` AS slug
    , `staff_certifications`.`id` AS `__pk_val`

    FROM `staff_certifications`
    LEFT JOIN `#__users` AS `joslo_users` ON `joslo_users`.`id` = `staff_certifications`.`modified_by`
    WHERE ( (CONVERT_TZ(staff_certifications.unip, "+0:00", "+00:00") >= DATE_ADD(LAST_DAY(now()), INTERVAL 1 DAY) AND CONVERT_TZ(staff_certifications.unip, "+0:00", "+00:00") <= DATE_ADD(LAST_DAY(NOW()), INTERVAL 1 MONTH) ) OR (CONVERT_TZ(staff_certifications.unip, "+0:00", "+00:00") >= DATE_ADD(LAST_DAY(DATE_SUB(now(), INTERVAL 2 MONTH)), INTERVAL 1 DAY) AND CONVERT_TZ(staff_certifications.unip, "+0:00", "+00:00") <= LAST_DAY(DATE_SUB(NOW(), INTERVAL 1 MONTH)) ) OR (CONVERT_TZ(staff_certifications.unip, "+0:00", "+00:00") >= DATE_ADD(LAST_DAY(DATE_SUB(now(), INTERVAL 1 MONTH)), INTERVAL 1 DAY) AND CONVERT_TZ(staff_certifications.unip, "+0:00", "+00:00") <= LAST_DAY(NOW()) ) ) AND ( `staff_certifications`.`unip` BETWEEN '2018-09-17 05:00:00' AND '2018-09-16 17:59:59' )
    ORDER BY `staff_certifications`.`unip` ASC,`staff_certifications`.`center` ASC,`staff_certifications`.`center` ASC
     
  8. troester

    troester Administrator Staff Member

    Level: Community
    ...AND ( `staff_certifications`.`unip` BETWEEN '2018-09-17 05:00:00' AND '2018-09-16 17:59:59' )

    The first date is after the 2nd one...
     
  9. nclaypool

    nclaypool Member

    Level: Community
    I have no idea why all of a sudden it would have started doing this, here is the code in the article that is calling the content plugin, it has been working fine for several months, nothing had changed to it...can you see what would be making it spit out dates in that manner?

    Code (Text):
    staff_certifications___child_abuse_neglect[value][]=%2D5+YEARS staff_certifications___child_abuse_neglect[value][]=%2B30+DAYS staff_certifications___child_abuse_neglect[condition]=BETWEEN
     
  10. nclaypool

    nclaypool Member

    Level: Community
    Now I'm really confused, I went through and took off the code from those articles so it literally is calling the list and nothing else.

    Still no records, I debug and see its still putting in those oddball dates. I am using some Pre-Filters on the related lists but they are the baked in "last month," "this month," or "next month"
     
  11. troester

    troester Administrator Staff Member

    Level: Community
    I can't see a relation between your content plugin (filtering staff_certifications___child_abuse_neglect) and the debug output (showing only conditions on staff_certifications.unip)
     
  12. troester

    troester Administrator Staff Member

    Level: Community
    What do you get if you are calling the list data directly (in the backend or via menu in the frontend)?

    Where does
    AND ( `staff_certifications`.`unip` BETWEEN '2018-09-17 05:00:00' AND '2018-09-16 17:59:59' )
    come from? (The other conditions seem to be "last month" etc)
    No Joomla version, no Fabrik version, no PHP version...?
     
  13. nclaypool

    nclaypool Member

    Level: Community
    Well, its a bit odd. Staff Certifications is the main table, I then made lists, for example child abuse and neglect, that link to the same table but only display a specific set of columns to keep the amount of data displayed low. I have an article with a content plugin line for each of the five different columns I wish to display, and I'm linking to a "category blog" of the category housing all of those articles.

    Is it possible its freaking out because the content plugin is being pinged multiple times on the same page?
     
  14. nclaypool

    nclaypool Member

    Level: Community
    To answer your other questions, aside from updating Joomla and Fabrik, I should have clarified, nothing changed code wise on those articles, I'm running latest Joomla and Fabrik. I can't speak specifically to when it stopped working as this isn't a page I view often, I had a user contact me to say it wasn't working anymore but they don't look at it often either.

    If I view the list view of these specific lists, they're good, all data is displayed as expected and pre-filters are working as intended.
     
  15. troester

    troester Administrator Staff Member

    Level: Community
    So you have multiple content plugins on one site:
    Do they all use different list ids?
    The lists are linked to the same db table, so all have identical column/element names.
    Did you try to put 'resetfilters=1' in every content plugin?
    {fabrik view=list id=1 resetfilters=1}
     
  16. nclaypool

    nclaypool Member

    Level: Community
    Yes, all have different list IDs
    You are correct, linked to same DB table so identical column/element names
    Yes, all content plugins references have resetfilters=1 in them
     

Share This Page