SOLVED - Content Plugin - No Records

nclaypool

Member
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.
 
Try appending &clearfilters=1 to the page URL (or ?clearfilters=1 if it's the first query string arg).

-- hugh
 
Interesting, while that does make one of them display records it appears they're being displayed without any filtering
 
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
 
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:
 
and look at the getData query for the lists in the debug output
So click on "list GetData:SC - UP Dashboard", this will show you a MySQL query.
The "WHERE" part is the interesting one.
 
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
 
...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...
 
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:
staff_certifications___child_abuse_neglect[value][]=%2D5+YEARS staff_certifications___child_abuse_neglect[value][]=%2B30+DAYS staff_certifications___child_abuse_neglect[condition]=BETWEEN
 
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"
 
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)
 
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)
nothing had changed
No Joomla version, no Fabrik version, no PHP version...?
 
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?
 
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.
 
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}
 
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
 
It's possible this may be to do with some changes I made to the caching code recently.

Can you try disabling caching in Fabrik entirely - it's a new(ish) setting in the Global tab of the global Fabrik options.

See if that changes anything. It shouldn't, if you are using different list ID's for each, but ... eh ....

-- hugh
 
Hmm, I don't seem to have a cache option under the Global tab of Global Fabrik options. I'm running 3.8.1, is there an even newer version that Joomla hasn't bugged me about??
 
There's quite a few changes in github since 3.8.1, we really need to get a 3.8.2 out.

OK, I'd advise doing a github update anyway, as there have been a number of fixes to do with caching, and just bug fixes in general.

If that doesn't fix your issue, we can look deeper.

As usual, do an Akeeba backup before updating.

-- hugh
 
Unfortunately I don't have the resources to setup a testing environment and I'm hesitant run code you guys haven't stamped with your seal of approval yet, lest it break my production system, I have Akeeba and would backup before any update anyways but it just makes me nervous. This isn't a super emergency for the effected users as I've assembled a band-aid for them to view the pertinent data at the moment anyhow.

I'll wait until you guys go full release on 3.8.2 then I'll give it a crack. I'll just go ahead and mark this thread SOLVED so you're not sifting through it anymore.
Thanks for all your help cheesegrits, I know you guys don't make any claim to watch the free threads but it means a great deal that you've taken the time to help me look into my issue.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top