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

Trying to correct a translation added/edited in the same "session" results in error #47

Open
ltguillaume opened this issue Jul 10, 2024 · 0 comments
Labels

Comments

@ltguillaume
Copy link

Bug Report

Current Behavior
When correcting a translation that you just added or edited before (so in the same "session" for Linguist"), I see an error message. The only way to correct the translation is to reload the page and find it again.

Steps to Reproduce

  1. Go to Lingust
  2. Add or edit a translation
  3. Try to edit the same translation again
  4. See error

Expected Behavior
The translation should be corrected.

Log

flarum.ERROR: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'flarum-subscriptions.email.new_post.subject-nl' for key 'fof_linguist_strings_key_locale_unique' in /data/host/skeleton/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117
Stack trace:
#0 /data/host/skeleton/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(117): PDOStatement->execute()
#1 /data/host/skeleton/vendor/illuminate/database/Connection.php(501): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /data/host/skeleton/vendor/illuminate/database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#3 /data/host/skeleton/vendor/illuminate/database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#4 /data/host/skeleton/vendor/illuminate/database/Connection.php(490): Illuminate\Database\Connection->run()
#5 /data/host/skeleton/vendor/illuminate/database/Connection.php(454): Illuminate\Database\Connection->statement()
#6 /data/host/skeleton/vendor/illuminate/database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert()
#7 /data/host/skeleton/vendor/illuminate/database/Query/Builder.php(3028): Illuminate\Database\Query\Processors\Processor->processInsertGetId()
#8 /data/host/skeleton/vendor/illuminate/database/Eloquent/Builder.php(1657): Illuminate\Database\Query\Builder->insertGetId()
#9 /data/host/skeleton/vendor/illuminate/database/Eloquent/Model.php(1188): Illuminate\Database\Eloquent\Builder->__call()
#10 /data/host/skeleton/vendor/illuminate/database/Eloquent/Model.php(1153): Illuminate\Database\Eloquent\Model->insertAndSetId()
#11 /data/host/skeleton/vendor/illuminate/database/Eloquent/Model.php(994): Illuminate\Database\Eloquent\Model->performInsert()
#12 /data/host/skeleton/vendor/fof/linguist/src/Repositories/StringRepository.php(64): Illuminate\Database\Eloquent\Model->save()
#13 /data/host/skeleton/vendor/fof/linguist/src/Api/Controllers/StringStoreController.php(33): FoF\Linguist\Repositories\StringRepository->store()
#14 /data/host/skeleton/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(116): FoF\Linguist\Api\Controllers\StringStoreController->data()
#15 /data/host/skeleton/vendor/flarum/core/src/Api/Controller/AbstractCreateController.php(22): Flarum\Api\Controller\AbstractSerializeController->handle()
#16 /data/host/skeleton/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\AbstractCreateController->handle()
#17 /data/host/skeleton/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#18 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ExecuteRoute->process()
#19 /data/host/skeleton/vendor/fof/reactions/src/Middleware/BindRequestToContainer.php(35): Laminas\Stratigility\Next->handle()
#20 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): FoF\Reactions\Middleware\BindRequestToContainer->process()
#21 /data/host/skeleton/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle()
#22 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\ThrottleApi->process()
#23 /data/host/skeleton/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(44): Laminas\Stratigility\Next->handle()
#24 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\CheckCsrfToken->process()
#25 /data/host/skeleton/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(69): Laminas\Stratigility\Next->handle()
#26 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ResolveRoute->process()
#27 /data/host/skeleton/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle()
#28 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\SetLocale->process()
#29 /data/host/skeleton/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(58): Laminas\Stratigility\Next->handle()
#30 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithHeader->process()
#31 /data/host/skeleton/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle()
#32 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithSession->process()
#33 /data/host/skeleton/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle()
#34 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\RememberFromCookie->process()
#35 /data/host/skeleton/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#36 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\StartSession->process()
#37 /data/host/skeleton/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle()
#38 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\FakeHttpMethods->process()
#39 /data/host/skeleton/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#40 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ParseJsonBody->process()
#41 /data/host/skeleton/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#42 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\HandleErrors->process()
#43 /data/host/skeleton/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle()
#44 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\InjectActorReference->process()
#45 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#46 /data/host/skeleton/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#47 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\RequestHandler->process()
#48 /data/host/skeleton/vendor/middlewares/base-path-router/src/BasePathRouter.php(99): Laminas\Stratigility\Next->handle()
#49 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePathRouter->process()
#50 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle()
#51 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Laminas\Stratigility\Middleware\OriginalMessages->process()
#52 /data/host/skeleton/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle()
#53 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePath->process()
#54 /data/host/skeleton/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle()
#55 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ProcessIp->process()
#56 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#57 /data/host/skeleton/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(64): Laminas\Stratigility\MiddlewarePipe->process()
#58 /data/host/skeleton/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(73): Laminas\Stratigility\MiddlewarePipe->handle()
#59 /data/host/skeleton/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#60 /data/host/myforum/public/index.php(34): Flarum\Http\Server->listen()
#61 {main}

Environment

  • Flarum version: 1.8.5
  • Extension version: 1.1.2
  • Webserver: nginx
  • PHP version: 8.3.9
  • Browser: all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant