Can not load learning path after upgrading to 3.1

Created on 9 June 2023, about 1 year ago
Updated 31 July 2023, 11 months ago

Problem/Motivation

Thank you for working on the update.

After updating to Opingo 3.1 from Opigno 3.0.9 and trying to start an existing learning path users get WSOD. Also when trying to create a learning path and getting to the next page where users are supposed to add modules and courses users get WSOD

When looking at logs, we get the error:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "opigno_learning_path.steps.finish" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of /mnt/www/html/MY-WEBSITE/docroot/core/lib/Drupal/Core/Routing/RouteProvider.php).

Steps to reproduce

Upgrade existing Opigno install from 3.0.9 to 3.1.0

Proposed resolution

not sure yet

Remaining tasks

debug error

Data model changes

not sure yet

πŸ› Bug report
Status

Downport

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sascher

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @sascher
  • πŸ‡ΊπŸ‡ΈUnited States sascher
  • πŸ‡ΊπŸ‡ΈUnited States sascher
  • πŸ‡ΊπŸ‡ΈUnited States sascher
  • πŸ‡ΊπŸ‡ΈUnited States firstlut

    That route did get dropped. We ran into trouble with a Boolean field for Guided Navigation that wasn't ever installed in our instance, and now we have to add it. Opigno did some work on navigation in Trainings and made free navigation the default.

  • πŸ‡΅πŸ‡±Poland Pozi

    As quick fix just comment out local task for which dedicated route was removed:
    1) file to edit "web/modules/contrib/opigno_learning_path/opigno_learning_path.links.task.yml",
    2) entry to comment out/remove:

    opigno_learning_path.steps.my_result:
      route_name: opigno_learning_path.steps.finish
      title: 'My result'
      base_route: entity.group.canonical

    3) drush cr

  • πŸ‡¬πŸ‡§United Kingdom NikLP

    Here's a patch against v3.1.0 via @somersoft, but please note this patch is specifically against the opigno_learning_path.module - this issue might have been better reported in the more specific queue: https://www.drupal.org/project/issues/opigno_learning_path β†’

  • πŸ‡ΊπŸ‡ΈUnited States sascher

    Patch from #7 worked for me, thanks

  • πŸ‡ΊπŸ‡ΈUnited States sascher

    I have reported the same issue here https://www.drupal.org/project/opigno_learning_path/issues/3372077 πŸ› Can not load learning path after upgrading to 3.1 Active

  • πŸ‡¨πŸ‡­Switzerland axelm

    Thanks for reporting this. We will include a fix in the next release of Opigno.

  • Status changed to Downport 11 months ago
  • πŸ‡¨πŸ‡­Switzerland axelm
  • I am unsure if this is the same issue or if this unrelated. I encountered the following issues while also upgrading from 3.0.9 to 3.1.0. I am fairly new to Drupal and PHP and I hope that what I am sharing here is relevant. If there is a better way for me to structure the information please let me know so I can contribute for efficiently:

    When a user attempts to enroll into a training (group) there is no issue:

    
https://DOMAIN/group/##/join?type=group



    When a user attempts to start the training (group) the button does not do anything:

    
https://DOMAIN/group/##/learning-path/start



    However, when entering this route into the URL bar directly we get the following error:


    The website encountered an unexpected error. Please try again later.
    
    Error: Call to undefined method Drupal\opigno_learning_path\Entity\LPResult::createWithValues() in Drupal\custom_redirect\Controller\CustomLearningPathStepsController->start() (line 41 of modules/custom/custom_redirect/src/Controller/CustomLearningPathStepsController.php).
    Drupal\custom_redirect\Controller\CustomLearningPathStepsController->start(Object, 'group')
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
    

    Here is the php-error.log for the same error:

    Error: Call to undefined method Drupal\opigno_learning_path\Entity\LPResult::createWithValues() in /code/web/modules/custom/custom_redirect/src/Controller/CustomLearningPathStepsController.php on line 41 #0 [internal function]: Drupal\custom_redirect\Controller\CustomLearningPathStepsController->start(Object(Drupal\group\Entity\Group), 'group')
    #1 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
    #2 /code/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #3 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
    #4 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
    #5 /code/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #6 /code/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
    #7 /code/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #8 /code/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #9 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #10 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #11 /code/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #12 /code/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #13 /code/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #14 /code/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #15 /code/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
    #16 {main}
    

    
When existing users attempt to continue a training (group) that they have already been enrolled into:

    https://DOMAIN/group/##/learning-path/start/group


    The website encountered an unexpected error. Please try again later.
    
    Error: Call to a member function createInstance() on null in Drupal\custom_redirect\Controller\CustomLearningPathStepsController->start() (line 196 of modules/custom/custom_redirect/src/Controller/CustomLearningPathStepsController.php).
    Drupal\custom_redirect\Controller\CustomLearningPathStepsController->start(Object, 'group')
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
    

    Here is the php-error.log for the same issue:

    Error: Call to a member function createInstance() on null in /code/web/modules/custom/custom_redirect/src/Controller/CustomLearningPathStepsController.php on line 196 #0 [internal function]: Drupal\custom_redirect\Controller\CustomLearningPathStepsController->start(Object(Drupal\group\Entity\Group), 'group')
    #1 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
    #2 /code/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #3 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
    #4 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
    #5 /code/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #6 /code/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
    #7 /code/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #8 /code/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #9 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #10 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #11 /code/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #12 /code/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #13 /code/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #14 /code/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #15 /code/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
    #16 {main}
    

    

When existing users attempt to continue a training (group) that they have already been enrolled into by clicking the following button it does not do anything:

    https://DOMAIN/group/##/learning-path/start

    However, there is a warning I see on the web page:

    Warning: Undefined property: Drupal\custom_redirect\Controller\CustomLearningPathStepsController::$content_type_manager in Drupal\custom_redirect\Controller\CustomLearningPathStepsController->start() (line 196 of modules/custom/custom_redirect/src/Controller/CustomLearningPathStepsController.php).
    Drupal\custom_redirect\Controller\CustomLearningPathStepsController->start(Object, 'group')
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
    
Production build 0.69.0 2024