Description
Description of the problem
Cannot create a problem with text/statement from the jury web interface.
Without a statement file, a problem can be normally created.
Your environment
Include details about your installation here.
- DOMjudge version = 6a99afc but also not working on 8.3.0 release
- Operating system = Ubuntu 22.04
- Webserver = docker stack, both development and production
Steps to reproduce
Replace this with a description of how we can reproduce your bug.
- download version 8.3.0 or main Github branch
- startup project (
docker compose up -d
) and wait for the initial setup- login into the jury account (
docker compose exec domjudge cat etc/initial_admin_password.secret
to get the password)- go to problem(s) administration (
http://100.105.42.72:12345/jury/problems
)- click "Add new problem"
- fill "Name" and "Timelimit" fields
- choose any pdf for the "Problem statement" field
- submit
- see error
An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'
This happens, because the system tries to do the same insert twice into the problem_statement_content
table.
INSERT INTO problem_statement_content (content, probid) VALUES (?, ?)
This problem occurs on latest main branch, both locally and on public demo as well as on 8.3.0 release tag!!
Expected behaviour
Problem should be created
Actual behaviour
Problem is not created, exception happens
Any other information that you want to share?
For now, I tracked the problem and validated in on 8.3.0 and main branch
The problem seems to be related to double calling to thedomjudge/webapp/src/Entity/Problem.php
Line 457 in 6a99afc