• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Icons only displayed on first row of list data

achartier

Super Moderator
Staff member
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).
 
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
 
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.
 
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
 
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.
 
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.
 
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
 
Glad you know which buttons to push a knobs to twiddle for CB. :)

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

-- hugh
 
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.
 
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
 
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.
 
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:
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top