-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined index error after upgrading to nova 2.5.0 #86
Comments
Exactly the same in my environment |
Created a pull-request in Another option to work around this is to make Follow updates at https://github.com/laravel/nova/pull/684. |
Are you sure you created pull request in right place? And it would be nice to have a sample code for the |
It's definitely in the right place. To fix this temporarily in your project, you can just add this to each ->required(function () {
return false;
}) |
@nemrutco @Tarpsvo @snk-lab Yea they added public function __construct($fields, $attribute = null, $resolveCallback = null)
{
parent::__construct('', $attribute, $resolveCallback);
$this->withMeta(['fields' => $fields]);
$this->withMeta(['dependencies' => []]);
$this->requiredCallback = function() { return false; };
} But I'm not sure if this is just a workaround or an actual fix. They seem to be mixing a lot now in |
I don't really like the solution of adding a useless Giving the NovaDependencyContainer an actual attribute should also be a fix, though I haven't tested it and the attribute itself would also be equally useless. |
your link gets 404, that's why i asked are you sure you posted in right place. |
@nemrutco Yea @Tarpsvo A PR doesn't help much if nova expects a key to be present in an array, where some PR for this package obviously didn't wrote anything compatible to novas behaviour prior to 2.5.0. The default behaviour should apparently always be. return [$this->attribute => [..]]; Although it would nice to check the index first, I think they made this choice to escalate deliberately. Should be fixed in 1.2.7, please verify and if so close this issue. |
The problem could be avoided by including the following. |
@snk-lab |
Problem solved. Thanks |
Please close this issue if resolved. |
i am not sure why but i think there is a compatibility issue with nova 2.5.0, everything is fine until nova 2.4.0 version.
The text was updated successfully, but these errors were encountered: