简体   繁体   English

TYPO3 Neos:创建路线引发异常

[英]TYPO3 Neos: Create route throws exception

I want to crate an inspector editor which loads data from the repository, and do the same like TYPO3.Neos do. 我想创建一个检查器编辑器,该编辑器从存储库中加载数据,并像TYPO3.Neos一样进行操作。 TYPO3 Neos v1.2.0-beta2 TYPO3 Neos v1.2.0-beta2

I created a template which render an relation link: 我创建了一个呈现关系链接的模板:

<f:security.ifAccess resource="Vendor_Package_BackendAccess">
    <link rel="vendor-data" href="{f:uri.action( package: 'Vendor.Package', controller: 'Backend\Content', action: 'load absolute: true )}" />
</f:security.ifAccess>

This is rendered like TYPO3.Neos:Page.head.neosBackendEndpoints 呈现为TYPO3.Neos:Page.head.neosBackendEndpoints

But with and without following routes settings it throws following exception: 但是,无论是否设置以下路由,都会引发以下异常:

Could not resolve a route and its corresponding URI for the given parameters. 对于给定的参数,无法解析路由及其对应的URI。 This may be due to referring to a not existing package / controller / action while building a link or URI. 这可能是由于在构建链接或URI时引用了不存在的包/控制器/动作。 Refer to log and check the backtrace for more details. 请参阅日志并检查回溯以获取更多详细信息。 (20141211101038f2dcd5) (20141211101038f2dcd5)

Routes.yaml: Routes.yaml:

#                                                                        #
# Default subroutes configuration for the Vendor.Package package.    #
#                                                                        #


-
  name: 'Content Controller - Load data'
  uriPattern: 'vendor/package'
  defaults:
    '@package': 'Vendor.Package'
    '@controller': 'Backend\Content'
    '@action': 'load

And the controller exists: 控制器存在:

Packages/Application/Vendor.Package/Classes/Vendor/Package/Controller/Backend/ContentController.php 包/应用程序/供应商。包/类/供应商/包/控制器/后端/ContentController.php

Here the log: 这里的日志:

Uncaught exception #1301610453: Could not resolve a route and its corresponding URI for the given parameters. This may be due to referring to a not existing package / controller / action while building a link or URI. Refer to log and check the backtrace for more details.

51 TYPO3\Fluid\ViewHelpers\Uri\ActionViewHelper_Original::render("load", array|0|, "Backend\Content", "Vendor.Package", NULL, "", "", array|0|, TRUE, FALSE, array|0|, FALSE)
50 call_user_func_array(array|2|, array|12|)
49 TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper::callRenderMethod()
48 TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper::initializeArgumentsAndRender()
47 FluidCache_Standalone_template_file_BackendEndpoints_036fbf06ab45ee579de56d2cae3e675dedf18c2d::{closure}()
46 TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper::renderChildren()
45 TYPO3\Fluid\Core\ViewHelper\AbstractConditionViewHelper::renderThenChild()
44 TYPO3\Fluid\ViewHelpers\Security\IfAccessViewHelper_Original::render("Vendor_Package_BackendAccess")
43 call_user_func_array(array|2|, array|1|)
42 TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper::callRenderMethod()
41 TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper::initializeArgumentsAndRender()
40 FluidCache_Standalone_template_file_BackendEndpoints_036fbf06ab45ee579de56d2cae3e675dedf18c2d::render(TYPO3\Fluid\Core\Rendering\RenderingContext)
39 TYPO3\Fluid\View\AbstractTemplateView::render()
38 TYPO3\TypoScript\TypoScriptObjects\TemplateImplementation_Original::evaluate()
37 TYPO3\TypoScript\Core\Runtime_Original::evaluateInternal("landingPage<TYPO3.Neos:Page>/head<TYPO3.TypoScript:Array>/BackendEndpoints", "NULL", TYPO3\TypoScript\TypoScriptObjects\ArrayImplementation)
36 TYPO3\TypoScript\Core\Runtime_Original::evaluate("landingPage<TYPO3.Neos:Page>/head<TYPO3.TypoScript:Array>/BackendEndpoints", TYPO3\TypoScript\TypoScriptObjects\ArrayImplementation)
35 TYPO3\TypoScript\TypoScriptObjects\AbstractTypoScriptObject::tsValue("BackendEndpoints")
34 TYPO3\TypoScript\TypoScriptObjects\ArrayImplementation_Original::evaluate()
33 TYPO3\TypoScript\Core\Runtime_Original::evaluateInternal("landingPage<TYPO3.Neos:Page>/head", "NULL", TYPO3\TypoScript\TypoScriptObjects\ArrayImplementation)
32 TYPO3\TypoScript\Core\Runtime_Original::evaluate("landingPage<TYPO3.Neos:Page>/head", TYPO3\TypoScript\TypoScriptObjects\ArrayImplementation)
31 TYPO3\TypoScript\TypoScriptObjects\AbstractTypoScriptObject::tsValue("head")
30 TYPO3\TypoScript\TypoScriptObjects\ArrayImplementation_Original::evaluate()
29 TYPO3\TypoScript\Core\Runtime_Original::evaluateInternal("landingPage", "Exception")
28 TYPO3\TypoScript\Core\Runtime_Original::render("landingPage")
27 TYPO3\TypoScript\TypoScriptObjects\MatcherImplementation_Original::evaluate()
26 TYPO3\TypoScript\Core\Runtime_Original::evaluateInternal("root<TYPO3.TypoScript:Case>/layout<TYPO3.TypoScript:Matcher>", "Exception")
25 TYPO3\TypoScript\Core\Runtime_Original::render("root<TYPO3.TypoScript:Case>/layout<TYPO3.TypoScript:Matcher>")
24 TYPO3\TypoScript\TypoScriptObjects\CaseImplementation_Original::renderMatcher("layout")
23 TYPO3\TypoScript\TypoScriptObjects\CaseImplementation_Original::evaluate()
22 TYPO3\TypoScript\Core\Runtime_Original::evaluateInternal("root", "Exception")
21 TYPO3\TypoScript\Core\Runtime_Original::render("root")
20 TYPO3\Neos\View\TypoScriptView_Original::render()
19 TYPO3\Flow\Mvc\Controller\ActionController_Original::callActionMethod()
18 TYPO3\Flow\Mvc\Controller\ActionController_Original::processRequest(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
17 TYPO3\Flow\Mvc\Dispatcher_Original::dispatch(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
16 TYPO3\Flow\Mvc\Dispatcher::dispatch(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
15 call_user_func_array(array|2|, array|2|)
14 TYPO3\Flow\Mvc\Dispatcher::Flow_Aop_Proxy_invokeJoinPoint(TYPO3\Flow\Aop\JoinPoint)
13 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
12 TYPO3\Flow\Security\Aspect\RequestDispatchingAspect_Original::blockIllegalRequestsAndForwardToAuthenticationEntryPoints(TYPO3\Flow\Aop\JoinPoint)
11 TYPO3\Flow\Aop\Advice\AroundAdvice::invoke(TYPO3\Flow\Aop\JoinPoint)
10 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
9 TYPO3\Flow\Mvc\Dispatcher::dispatch(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
8 call_user_func_array(array|2|, array|2|)
7 TYPO3\Flow\Object\DependencyInjection\DependencyProxy::__call("dispatch", array|2|)
6 TYPO3\Flow\Object\DependencyInjection\DependencyProxy::dispatch(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
5 TYPO3\Flow\Mvc\DispatchComponent_Original::handle(TYPO3\Flow\Http\Component\ComponentContext)
4 TYPO3\Flow\Http\Component\ComponentChain_Original::handle(TYPO3\Flow\Http\Component\ComponentContext)
3 TYPO3\Flow\Http\Component\ComponentChain_Original::handle(TYPO3\Flow\Http\Component\ComponentContext)
2 TYPO3\Flow\Http\RequestHandler::handleRequest()
1 TYPO3\Flow\Core\Bootstrap::run()

HTTP RESPONSE:
[response was empty]

OK. 好。 It's necessary to configure the /Configuration/Routes.yaml first with 首先需要使用以下命令配置/Configuration/Routes.yaml

-
  name: 'Vendor Package'
  uriPattern: '<VendorPackageSubroutes>'
  subRoutes:
    'VendorPackageSubroutes':
      package: 'Vendor.Package'
      variables:
        'defaultUriSuffix': '.html'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM