SOLVED: Not visible data on list intro

Status
Not open for further replies.

dimoss

Well-Known Member
Hi,

I am using Sourcerer to present data on a list intro and produce a pdf.
http://wttcentries.alfaweb.gr/index.php?option=com_fabrik&view=list&listid=37&Itemid=150
I am using FabrikHelperElement::filterValue to get the filter data.
However for some strange reason I cannot get the data shown on the list intro while they are visible on the pdf output.
I run the latest Joomla 3.9.10 and Fabrik Github from July 29th.
The whole code is:
PHP:
{source}<?php
$db = JFactory::getDBO();
$assocID = FabrikHelperElement::filterValue(732);
$query = "SELECT sum(amount) AS Total FROM vw_overview_na WHERE assoc = ". $db->quote($assocID);
$db->setQuery( $query );
$total = $db->loadResult();

$query = "SELECT count(participant) AS Participants FROM vw_overview_na WHERE assoc = ". $db->quote($assocID);
$db->setQuery( $query );
$participants = $db->loadResult();

$query = "SELECT name AS Country FROM fab_countries WHERE country = ". $db->quote($assocID);
$db->setQuery( $query );
$country= $db->loadResult();

echo "<b>Country</b>: ".$country."<br/><b>Participants</b>: ".$participants."<br/><b>Total amount</b>: ".$total." EUR<br/><b>Status</b>: Approved";
?>{/source}

The same setup worked fine in fabrik 3.8 and joomla 3.8.2 in another case.

Thanks
 
Last edited:
Try
$assocID = FabrikHelperElement::filterValue(732,37_com_fabrik_37);

The PDF link has this param &listref=37_com_fabrik_37,
your list is displaying correctly by adding &setListRefFromRequest=1&listref=37_com_fabrik_37 (like the PDF link)
and since ??? filterValue() takes a 2nd param for the "RenderContext" (whatever this is;), I recall I had to add something like 12_com_content_12 in an element default coming from the content plugin)
 
Hi Troester,

Unfortunately it doesnt work either.
Btw I quoted the 37_com_fabrik_37 as it gave error.

What I realized is that when I re-load the browser after the filter applied, it works BUT this shouldn't be the case because when I clear the filter it doesn't clear and I have to re-load again.
 
Last edited:
Following our conversation:
set your list to ajaxfied=no, otherwise it won't update your list intro on filtering/clearing filter.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top