Drupal 9 and quiz: 6.x-dev
quiz-question/add

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.quiz_question_type.add_form" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jcontreras created an issue. See original summary.

jcontreras’s picture

Drupal 9 and quiz: 6.x-dev
quiz-question/add

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.quiz_question_type.add_form" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php).

jcontreras’s picture

Title: The entity does not have an ID. » Route "entity.quiz_question_type.add_form" does not exist
Version: 6.0.0-alpha4 » 6.x-dev

Drupal 9 and quiz: 6.x-dev
quiz-question/add

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.quiz_question_type.add_form" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php).

jcontreras’s picture

Issue summary: View changes
djdevin’s picture

I can't reproduce this and neither can the tests.

That route was removed in 6.x, have you run drush updb/cr?

martin@infinitynetmedia.co.uk’s picture

I had / have the same problem, but thankfully I have finally worked out the cause.

This issue is the cause:
https://git.drupalcode.org/project/quiz/-/commit/1492462eabdb10af14645f8...

Line 44 shouldn't have been removed. While there is no ability to add question types, so the add form should be removed, the add-form link is needed for the question type selection.

Adding that line 44 back into src/Entity/QuizQuestionType.php solved this problem for me.

Pemson18’s picture

patch from #6

djdevin’s picture

Status: Active » Needs review

  • djdevin committed 2a69c9b on 6.x authored by Pemson18
    Issue #3224280 by Pemson18: Route "entity.quiz_question_type.add_form"...
djdevin’s picture

Status: Needs review » Fixed

Thanks - just to clear things up this was from admin/quiz/questions (not from a quiz).

Users shouldn't be adding new question types, but we removed the link at least, so that's fine.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.