1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

SOLVED: Not visible data on list intro

Discussion in 'Community' started by dimoss, Aug 9, 2019.

Thread Status:
Not open for further replies.
  1. dimoss

    dimoss Well-Known Member

    Level: Community
    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: Aug 9, 2019
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    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)
     
  3. dimoss

    dimoss Well-Known Member

    Level: Community
    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: Aug 9, 2019
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    Following our conversation:
    set your list to ajaxfied=no, otherwise it won't update your list intro on filtering/clearing filter.
     
  5. dimoss

    dimoss Well-Known Member

    Level: Community
    You r right. I should have check that..:)
     
Thread Status:
Not open for further replies.

Share This Page