Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Medium Medium
    • Resolution: Unresolved
    • Affects Version/s: 2.5.0
    • Fix Version/s: None
    • Component/s: Misc
    • Labels:
      None

      Description

      You get an error when trying to dump or debug fosJs related routes.
      Error looks like

      root@28ca2ab43009:/var/www/html# cat web/js/fos_js php bin/console fos:js-routing:dump
      Dumping exposed routes.
       
      [file+] /var/www/html/app/../web/js/fos_js_routes.js
       
      In ExposedRoutesExtractor.php line 28:
                                                                                                                                                                                                                 
        Type error: Argument 2 passed to eZ\Bundle\EzPublishCoreBundle\Routing\JsRouting\ExposedRoutesExtractor::__construct() must be an instance of Symfony\Component\HttpFoundation\Request, null given, cal  
        led in /tmp/ezplatformcache/var/cache/dev/ContainerLumgnoo/getEzpublish_JsRouting_ExtractorService.php on line 8                                                                                         
                                                                                                                                                                                                                 
       
      fos:js-routing:dump [--callback CALLBACK] [--target [TARGET]] [--locale [LOCALE]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--siteaccess [SITEACCESS]] [--] <command>
      
      

      I think this is because there is no request when running the command from console.
      Could it be an option to make the masterRequest param optional at https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Bundle/EzPublishCoreBundle/Routing/JsRouting/ExposedRoutesExtractor.php#L28?

        Activity

        Hide
        Carlos Revillo added a comment -
        Show
        Carlos Revillo added a comment - suggested pr at https://jira.ez.no/browse/EZP-30492
        Hide
        André Rømcke added a comment -

        Carlos Revillo Where is the PR opened?

        Show
        André Rømcke added a comment - Carlos Revillo Where is the PR opened?
        Hide
        Carlos Revillo added a comment -
        Show
        Carlos Revillo added a comment - sorry André, my bad. It's here. https://github.com/ezsystems/ezpublish-kernel/pull/2614

          People

          • Assignee:
            Unassigned
            Reporter:
            Carlos Revillo
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: