You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using this with a one-to-one relationship, Nova throws an error "Undefined index: value".
Full error: Undefined index: values {"userId":2,"exception":"[object] (ErrorException(code: 0): Undefined index: values at /var/www/vendor/kirschbaum-development/nova-inline-relationship/src/NovaInlineRelationship.php:520)
public function fields(Request $request)
{
return [
ID::make(__('ID'), 'id')->sortable(),
HasOne::make('Delivery Options', 'deliveryOption', ShippingZoneDeliveryOption::class)->inline(),
If I take out "inline" the relationship works. I can create, update and do all the regular things. As a matter of fact, if I create the relationship traditionally and then enable inline on it, I can update it normally.
The issue seems to be with creating it. I'm using the latest Nova/Laravel version.
-- Edit --
When I trace the code NovaInlineRelationship.php:520, it seems like $itemData only has a 'modelId' property, but no values, so an error is being thrown.
Ok, I resolved the issue. I was using a "heading" field, which has no form value (It is a label). This module does not support this, and throws the error.
Unsure the best way to fix this. Potentially guarding if values are set before trying to use them, essentially omitting fields that don't need to be processed.
I don't see this as an urgent issue. Current work-around is not to use helper fields like markup/heading. Fix would be nice to keep large inline relationships user friendly.
When using this with a one-to-one relationship, Nova throws an error "Undefined index: value".
Full error:
Undefined index: values {"userId":2,"exception":"[object] (ErrorException(code: 0): Undefined index: values at /var/www/vendor/kirschbaum-development/nova-inline-relationship/src/NovaInlineRelationship.php:520)
If I take out "inline" the relationship works. I can create, update and do all the regular things. As a matter of fact, if I create the relationship traditionally and then enable inline on it, I can update it normally.
The issue seems to be with creating it. I'm using the latest Nova/Laravel version.
-- Edit --
When I trace the code
NovaInlineRelationship.php:520
, it seems like $itemData only has a 'modelId' property, but no values, so an error is being thrown.The text was updated successfully, but these errors were encountered: