1. If you update to Joomla 3.8.10, please make sure that you either do a full GitHub update of Fabrik, or disable caching for your lists (in the Advanced settings) or turn off Joomla's System Cache setting. A change in Joomla's cache code in 3.8.10 required a fix in Fabrik, which will be rolled in to the next release, but is currently only available in GitHub.

Icons only displayed on first row of list data

Discussion in 'Community' started by achartier, May 20, 2018.

  1. achartier

    achartier Active Member

    Level: Community
    I have a list and certain elements are set up to display icons in the list view. Only the first row is getting the icons. I have researched the issue and here is what I have found.

    The link is converted to an icon in renderListData in file components/com_fabrik/models/elementlist.php. It renders the icon when $this->iconsSet is false at line 646. the value of $this->iconsSet is only ever changed in file components/com_fabrik/models/element.php and it is only ever set to true at one point at line 662. Now it seems that once it has been set true it is never reset to false for rendering each element column displayed in the list, so subsequent renderings of that element in the column do not render the icons. When the system starts to render the next column the value is reset.

    The result is that the icon is rendered correctly in the first element in the column that it is supposed to, but no other elements in the column get rendered correctly. So we might see an icon rendered in row 3 of column A and row 7 of column B, but none of the elements in column A from 4 onward and in column b from row 8 onward are rendered as icons.

    When I reset the value of $this->iconsSet to false at the end of the renderListData (line 712) the icons display correctly throughout the list view.

    I do not know what other impact this change might make. The renderListData function is called from many places. I suspect there is a for loop that is rendering all the elements in the column but I have not been able to back trace it.

    Hugh, I think you will have a better chance of determining where the issue is than I (at least a lot quicker than I can).
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Professional
    I can't replicate this.

    What element type is this, or does it happen for all types?

    Are you using "raw" or label data for the icon names?

    -- hugh
     
  3. achartier

    achartier Active Member

    Level: Community
    It is a db join, it is the only type I use in this manner. The icon is a static icon file defined in the list view settings.
     
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Professional
    Ah, I haven't tested static icons. I'll take a look later today.

    -- hugh
     
  5. achartier

    achartier Active Member

    Level: Community
    Did you get a chance to look at this?
     
  6. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Professional
    Nope.

    I'll try and find time today.

    -- hugh
     
  7. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Professional
    I still can't replicate this, even with a static icon on a join element, I get the icon on every row.

    Which site / list / element is this on? I need to check your settings, see if you've got anything different.

    -- hugh
     
  8. achartier

    achartier Active Member

    Level: Community
    I am out of town until Monday. I will see about getting you access to the test site where the problem exhibits when I return.
     
    cheesegrits likes this.
  9. achartier

    achartier Active Member

    Level: Community
    OK. Use the Test Gravit8 site details. Once logged in access the list from the Manage->Clients menu. At present I have the line to reset the IconsSet value, you can see this insert at line 712 of components/com_fabrik/models/elementlist.php, comment this line out (using eXtplorer), save and refresh the clients list and you will see the results.

    If you need/want ssh access let me know.
     
  10. achartier

    achartier Active Member

    Level: Community
    Did you see anything when you had a look?
     
  11. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Professional
    I can't login on the front end. Looks like some CB thing, "you haven't completed something or other, do this and that and check your email". I looked in J! and my user is enabled (and I can login on the backend), but I don't see a 'hugh' in CB. As I know nothing about CB, I'm not about to start pushing buttons at random to try and fix it. :)

    -- hugh
     
  12. achartier

    achartier Active Member

    Level: Community
    OK, you should be able to log in now. Had to sync the CB Users for the manual entry.
     
  13. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Professional
    Glad you know which buttons to push a knobs to twiddle for CB. :)

    I'll take a look when I get another minute.

    -- hugh
     
  14. achartier

    achartier Active Member

    Level: Community
    Hugh, I will need to take this test site down soon. Will you get a chance for another look? Otherwise I can archive it and restore it when you are ready.

    Please advise, thanks.
     
  15. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Professional
    I'm looking at it now.

    -- hugh
     
  16. achartier

    achartier Active Member

    Level: Community
    Would it help to get an akeeba backup of the site to play with?
     
  17. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Professional
    Well, yes and no. Obviously it would make replicating the bug easier, but ... it takes about 45 mins to download, install an Akeeba, set up a PHP Storm project on it and get the debugging going. Which is hard to justify in Community support. Akeeba archive debugging is something I try and reserve for Pro subs, as it's one of the things that adds value to a Pro sub, and allows me to earn a living. If I start doing it for free ...

    -- hugh
     
  18. achartier

    achartier Active Member

    Level: Community
    I have updated the site to the current git and see that the problem is still there. I have some free time over the next few days so will attempt to discover the root cause.
     
  19. achartier

    achartier Active Member

    Level: Community
    Hugh, it is very strange that you cannot replicate this. If I take any list display and change one of the elements (take a dropdown) and in the List View Settings, Icons Tab, leave Replace with Icons as No, and put heart30 in the static icon. Save and now go refresh your list. The heart is showing for that element on the first row only.

    Do you see anything different?
     
    Last edited: Jun 20, 2018
  20. achartier

    achartier Active Member

    Level: Community
    Friendly bump...
     

Share This Page