Forogramero I see a 401 error and not 500. Profile pages still work and guests can browse it freely.
It's due this:
Endpoint\Create::make()
->authenticated(fn () => !$this->settings->get('michaelbelgium-profileviews.track_guests', false)),
Though yeah, I found 2 issues while investigating. Flarum v2 does some confusing stuff here
- When reproducing it, it does show the "You do not have permission to do that." error/toast, which is unnecessary,
If i would be a guest i'd think I don't have permission to view the profile page. But in reality its the /api/userprofileview request. As extension maintainer i don't think i can prevent showing that UI error.
If I try to prevent this by removing the authenticated call and move the check in the creating method, an entry gets added none the less... which shouldn't happen (like issue below)
- Viewing your own profile adds an entry in the table, while it's coded to not do so (returning
null in the creating method)
visited_at is always '0000-00-00 00:00:00' when the entry isn't suppose to be added