Skip to content

Clarification page breaks for removed problems #3032

Open
@ntm97

Description

@ntm97

Description of the problem

Someone accidentally added a wrong problem to the GCPC extended contest.
A team noticed it and sent a clarification request, upon which the problem was deleted from the contest and replaced with the correct one.
However, now the clarifications page (/jury/clarifications) returns 500 Internal Server Error:

An exception has been thrown during the rendering of a template ("App\Twig\TwigExtension::problemBadge(): Argument #1 ($problem) must be of type App\Entity\ContestProblem, null given, called in /home/domjudge/muensterjudge/webapp/var/cache/prod/twig/9d/9d57c54119ebe7ee7c0a288abc88b039.php on line 210").

Your environment

  • DOMjudge version: b32fc5c8c5a84160e6e26203228fbbe1ec8444e9 with 028995f9c00e7897ec863283986ef995661e38b9 cherry-picked on top of that
  • Operating system / Linux distribution and version: Debian GNU/Linux 12 (bookworm), 6.1.0-27-amd64
  • Webserver: nginx/1.22.1

Steps to reproduce

  1. Request clarification for a specific problem
  2. Remove that problem from the contest
  3. Clarification page fails to render

Expected behaviour

The clarification page should still be able to display clarifications for all existing problems.
Not sure what should happen with the clarifications related to the removed problem.
Maybe they could be displayed with an empty subject or maybe they should just be deleted when the problem is removed.

Actual behaviour

The clarification page fails to render, making it impossible for the jury to see and react to new clarification requests.

Any other information that you want to share?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions