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

Link in mail is invalid #9

Closed
c-delouvencourt opened this issue Jun 14, 2021 · 4 comments
Closed

Link in mail is invalid #9

c-delouvencourt opened this issue Jun 14, 2021 · 4 comments

Comments

@c-delouvencourt
Copy link

Hello,

The link in mail redirect to a error, here a screenshot : https://gyazo.com/b81feb903066b0b66c92acbecb1bba66

Flarum 1.0.2, PHP 7.4

Thank you :)

@clarkwinkelmann
Copy link
Owner

Can you check if there is any error message in the Flarum log file at <flarum>/storage/logs or in the browser javascript console (under development tools) ?

If that's indeed a 500 error page then the log file will have all the details.

@c-delouvencourt
Copy link
Author

[2021-06-14 15:03:13] flarum.ERROR: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-6' for key 'PRIMARY' in /flarum/app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112 Stack trace: #0 /flarum/app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(112): PDOStatement->execute() #1 /flarum/app/vendor/illuminate/database/Connection.php(485): Doctrine\DBAL\Driver\PDOStatement->execute() #2 /flarum/app/vendor/illuminate/database/Connection.php(685): Illuminate\Database\Connection->Illuminate\Database\{closure}() #3 /flarum/app/vendor/illuminate/database/Connection.php(652): Illuminate\Database\Connection->runQueryCallback() #4 /flarum/app/vendor/illuminate/database/Connection.php(486): Illuminate\Database\Connection->run() #5 /flarum/app/vendor/illuminate/database/Connection.php(438): Illuminate\Database\Connection->statement() #6 /flarum/app/vendor/illuminate/database/Query/Builder.php(2959): Illuminate\Database\Connection->insert() #7 /flarum/app/vendor/illuminate/database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php(269): Illuminate\Database\Query\Builder->insert() #8 /flarum/app/vendor/fof/default-group/src/Listeners/AddDefaultGroup.php(38): Illuminate\Database\Eloquent\Relations\BelongsToMany->attach() #9 /flarum/app/vendor/illuminate/events/Dispatcher.php(412): FoF\DefaultGroup\Listeners\AddDefaultGroup->handle() #10 /flarum/app/vendor/illuminate/events/Dispatcher.php(237): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}() #11 /flarum/app/vendor/flarum/core/src/Foundation/DispatchEventsTrait.php(33): Illuminate\Events\Dispatcher->dispatch() #12 /flarum/app/vendor/clarkwinkelmann/flarum-ext-passwordless/src/Controllers/LoginFromTokenController.php(99): ClarkWinkelmann\PasswordLess\Controllers\LoginFromTokenController->dispatchEventsFor() #13 /flarum/app/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): ClarkWinkelmann\PasswordLess\Controllers\LoginFromTokenController->handle() #14 /flarum/app/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}() #15 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ExecuteRoute->process() #16 /flarum/app/vendor/flarum/core/src/Http/Middleware/ContentTypeOptionsHeader.php(21): Laminas\Stratigility\Next->handle() #17 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ContentTypeOptionsHeader->process() #18 /flarum/app/vendor/flarum/core/src/Http/Middleware/ReferrerPolicyHeader.php(30): Laminas\Stratigility\Next->handle() #19 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ReferrerPolicyHeader->process() #20 /flarum/app/vendor/flarum/core/src/Http/Middleware/FlarumPromotionHeader.php(30): Laminas\Stratigility\Next->handle() #21 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\FlarumPromotionHeader->process() #22 /flarum/app/vendor/flarum/core/src/Http/Middleware/ShareErrorsFromSession.php(57): Laminas\Stratigility\Next->handle()

@c-delouvencourt
Copy link
Author

Here is the error in the log, thank you 👍🏼

@clarkwinkelmann
Copy link
Owner

This is an error in fof/default-group FriendsOfFlarum/default-group#12 (I just opened that issue) because of an issue in Flarum flarum/framework#2713

The linked Flarum issue is made worse because this extension calls $user->activate() on each login. That method is supposed to have no effect if the user is already activated but that's currently not the case.

I don't think it makes sense to fix this here. A check for duplicate groups should be added in fof/default-group to future-proof it and the duplicate event issue should be fixed in Flarum itself.

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

2 participants