Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#7 | 3224280-route-missing.patch | 591 bytes | Pemson18 |
Comments
Comment #2
jcontreras CreditAttribution: jcontreras at Texas Creative commentedDrupal 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).
Comment #3
jcontreras CreditAttribution: jcontreras at Texas Creative commentedDrupal 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).
Comment #4
jcontreras CreditAttribution: jcontreras at Texas Creative commentedComment #5
djdevinI can't reproduce this and neither can the tests.
That route was removed in 6.x, have you run drush updb/cr?
Comment #6
martin@infinitynetmedia.co.uk CreditAttribution: martin@infinitynetmedia.co.uk as a volunteer commentedI 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.
Comment #7
Pemson18patch from #6
Comment #8
djdevinComment #10
djdevinThanks - 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.