PaulV888
Member
Hi,
I just updated a site and my pivot table list plugins are not working as expected anymore. If I use custom element links on my pivot tables (so the user can click and see the details of the where the data came from), then the pivot is recognizing the same groups anymore.
On investigation I see the custom element link code is changed and now is automatically including the data-rowid in the link, which causes every row to be unique.
Assuming that this is desired for other area's, I suggest that we strip 'data-rowid='123'" back out, just for the pivot plugin.
Suggested code change in /plugins/fabrik_list/pivot/pivot.php, insert following lines at the beginning of onLoadData, line 249.
If you guys agree with this change, i'll be happy to submit a pull request.
Thanks,
Paul
I just updated a site and my pivot table list plugins are not working as expected anymore. If I use custom element links on my pivot tables (so the user can click and see the details of the where the data came from), then the pivot is recognizing the same groups anymore.
On investigation I see the custom element link code is changed and now is automatically including the data-rowid in the link, which causes every row to be unique.
Assuming that this is desired for other area's, I suggest that we strip 'data-rowid='123'" back out, just for the pivot plugin.
Suggested code change in /plugins/fabrik_list/pivot/pivot.php, insert following lines at the beginning of onLoadData, line 249.
Code:
// Remove data-rowid's
foreach ($data as $groupKey => $group)
{
foreach ($group as $rowKey => $row)
{
$data[$groupKey][$rowKey]->$yCol = preg_replace('/ data\-rowid="\d+" /',' ', $row->$yCol);
$data[$groupKey][$rowKey]->$xCol = preg_replace('/ data\-rowid="\d+" /',' ', $row->$xCol);
}
}
If you guys agree with this change, i'll be happy to submit a pull request.
Thanks,
Paul