Skip to content
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: IPriceGroup\OcApiPlugin\Models\Resource" on line 242 of /var/www/yourdomain.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php #23

Open
Tetraneon opened this issue Mar 8, 2022 · 1 comment

Comments

@Tetraneon
Copy link

October 2.15
iPriceGroup/ocapiplugin 1.1.0

I've got this error when trying to view ocapiplugin in october backend :
Undefined index: IPriceGroup\OcApiPlugin\Models\Resource" on line 242 of /var/www/yourdomain.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php

@Tetraneon
Copy link
Author

Tetraneon commented Mar 8, 2022

I solved this issue...
In /var/www/html/plugins/ipricegroup/ocapiplugin/models/Resource.php, invert the two following lines of code at the end of the script, like this :

Before :

protected static function boot()
    {
        self::observe(ResourceObserver::class); 
        parent::boot();

    }

After :

protected static function boot()
    {
        parent::boot();
        self::observe(ResourceObserver::class);

    } 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant