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).
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).