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

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

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
@lancepioch
Copy link
Member

We've replaced the front end.

@RMartinOscar RMartinOscar added this to the beta18 milestone Jan 7, 2025
@Boy132
Copy link
Member Author

Boy132 commented Jan 9, 2025

Can't reproduce this anymore, neither on the new client ui nor via the api.
Might be related to the (missing) properties for activity logs, but I will create a separate for that. (#897)

@Boy132 Boy132 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2025
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

4 participants