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

Class name must be a valid object or a string error on activity log page #607

Open
Boy132 opened this issue Oct 3, 2024 · 0 comments
Open
Labels
🐛 bug Something isn't working 🟡 medium Somewhat challenging

Comments

@Boy132
Copy link
Member

Boy132 commented Oct 3, 2024

When enabling Hide admin activies? the following error is thrown when viewing activity logs:
image

https://github.com/pelican-dev/panel/blob/main/app/Http/Controllers/Api/Client/Servers/ActivityLogController.php#L36

production.ERROR: Class name must be a valid object or a string {"userId":1,"exception":"[object] (Error(code: 0): Class name must be a valid object or a string at /var/www/pelican/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php:793)
[stacktrace]
#0 /var/www/pelican/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php(588): Illuminate\\Database\\Eloquent\\Model->newRelatedInstance()
#1 /var/www/pelican/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php(658): Illuminate\\Database\\Eloquent\\Model->morphToMany()
#2 /var/www/pelican/vendor/spatie/laravel-permission/src/Models/Role.php(82): Illuminate\\Database\\Eloquent\\Model->morphedByMany()
#3 /var/www/pelican/app/Http/Controllers/Api/Client/Servers/ActivityLogController.php(36): Spatie\\Permission\\Models\\Role->users()

When running the same method in tinker console no error is thrown:
image

@Boy132 Boy132 added 🐛 bug Something isn't working 🟡 medium Somewhat challenging labels Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🟡 medium Somewhat challenging
Projects
None yet
Development

No branches or pull requests

1 participant