- Issue created by @tonytheferg
And if you comment that out, the next error in viewing the edit group is:
Error: Call to a member function getPrice() on null in Drupal\commerce_vado\Form\VadoGroupItemInlineForm::getPrice() (line 78 of /var/www/html/web/modules/contrib/commerce_vado/src/Form/VadoGroupItemInlineForm.php)
- Status changed to Needs review
almost 2 years ago 6:26pm 3 March 2023 This works. A couple of things to do:
- Add a warning message to the variation delete form notifying the user if group items will be deleted.
- Decide what to do if the deleted group item results in an empty group. It seems best to not delete the group, and make sure an empty group won't cause crashes, seeing that group items are required on a group.
- πΊπΈUnited States sleewok
Does this only work BEFORE you delete? I added this patch in and I am still getting the error when I try to delete a group that was associated with a deleted variation.
Sorry didn't see this comment. Yeah, the proposal is to delete group items WHEN the variation is deleted. You would have to query for groupt items that have no variation to find rogue group items.
Postponing as the fix on π Group items should be hidden when variation is unpublished Active might be a better approach. After that issue lands we can discuss whether or not to delete empty group items etc.
This is now fixed with π Group items should be hidden when variation is unpublished Active