impresspages / ImpressPages

ImpressPages is php framework with admin panel. Build functional website in one hour.
http://www.impresspages.org
Other
501 stars 179 forks source link

Grid type Grid doesn't work when parent has custom idField #819

Open XEuRoMAN opened 7 years ago

XEuRoMAN commented 7 years ago

It looks like connectionField always trying to connect tables by id in parent table.

Preview error when id doesn't exist in parent table:

Notice: Undefined index: id in \Ip\Internal\Grid\Model\Field\Grid.php:76

Error when id exists (but you still use custom idField) and trying to open sub-grid.

Fatal error: Uncaught exception 'Ip\Exception' with message 'girdParentId GET variable missing' in \Ip\Internal\Grid\Model\Table.php on line512

Ip\Exception: girdParentId GET variable missing in \Ip\Internal\Grid\Model\Table.php on line 512
maskas commented 7 years ago

Unless I misunderstood this issue, 'id' field of parent was never an option to be configured. If you want to use multi-hierarchy GRID, you have to use 'id' as 'id'.

I don't say it is impossible to do, I just want to stress, that this falls into the "new features" category instead of "bugs" category.