这个流体错误意味着什么? 100次迭代后无法找到唯一的路径段

时间:2014-09-26 21:30:31

标签: fluid typo3-flow typo3-neos

我在订单审核页面上收到此错误:

    Exception while rendering
    checkout<TYPO3.Neos:Page>/
    body<TYPO3.TypoScript:Template>/
    content/
    main<TYPO3.Neos:PrimaryContent>/
    default<TYPO3.TypoScript:Matcher>/
    element<TYPO3.Neos:ContentCollection>/
    itemRenderer<TYPO3.Neos:ContentCase>/
    default<TYPO3.TypoScript:Matcher>/
    element<SeeThroughWeb.Shop:ShopOrderReview>:
    No unique path segment could be found after 100 iterations. (201409261654538b6e30)

知道为什么或意味着什么?顺便说一句,我在另一个网站上使用相同的模板,并没有在那里得到这样的错误。我使用的是Flow 2.1和Neos .99。 感谢

方法声明是:

     /**
     * A new form to fill shipping address
     *
     * @param \SeeThroughWeb\Shop\Domain\Model\Address $address List of address
     * @param integer $changeAddress
     * @return void
     */
    public function shippingAddressAction(\SeeThroughWeb\Shop\Domain\Model\Address $address = NULL, $changeAddress = 0) {  

以下是我在以下评论中引用的模板部分的更全面的列表:

<f:for each="{addresses}" as="address">
    <li>
    <f:link.action action="shippingAddress" arguments="{address: address}">{address.title}</f:link.action>
    </li>
</f:for>

同一页面上的类似错误似乎与地址变量有关:

14-11-05 17:18:27  CRITICAL  Fluid                Uncaught exception #1316441798: No unique path segment could be found after 100 iterations. - See also: 201411051718246a61dd.txt
    previousException => Uncaught exception #1316441798 in line 198 of /home/thebigcarrot/domains/shop.thebigcarrot.ca/public_html/releases/20131219160416/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Flow_Mvc_Routing_IdentityRoutePart.php: No unique path segment could be found after 100 iterations.

,异常日志如下所示:

Uncaught exception #1316441798: No unique path segment could be found after 100 iterations.

80 TYPO3\Fluid\ViewHelpers\Link\ActionViewHelper_Original::render("editOrderAddressForAdmin", array|2|, "OrderManagement", NULL, NULL, "", "", array|0|, FALSE, array|0|, FALSE)
79 call_user_func_array(array|2|, array|11|)
78 TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper::callRenderMethod()
77 TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper::initializeArgumentsAndRender()
76 TYPO3\Fluid\Core\Parser\SyntaxTree\ViewHelperNode_Original::evaluate(TYPO3\Fluid\Core\Rendering\RenderingContext)
75 TYPO3\Fluid\Core\Parser\SyntaxTree\AbstractNode::evaluateChildNodes(TYPO3\Fluid\Core\Rendering\RenderingContext)
74 TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper::renderChildren()
73 TYPO3\Fluid\ViewHelpers\SectionViewHelper_Original::render()
72 call_user_func_array(array|2|, array|0|)
71 TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper::callRenderMethod()
70 TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper::initializeArgumentsAndRender()
69 TYPO3\Fluid\Core\Parser\SyntaxTree\ViewHelperNode_Original::evaluate(TYPO3\Fluid\Core\Rendering\RenderingContext)

editOrderAddressForAdmin的声明如下所示:

/**
     * Edit order address for admin
     *
     * @param \SeeThroughWeb\Shop\Domain\Model\Address $address  
     * @param integer $shipping
     * @Flow\IgnoreValidation("$address")
     * @return void
     */
    public function editOrderAddressForAdminAction(\SeeThroughWeb\Shop\Domain\Model\Address $address  , $shipping = 0) {

        $this->view->assign('address', $address);
        $this->view->assign('shipping', $shipping);
        $countryAndStates = $this->taxZoneService->getCountryAndStates();
        $this->view->assign('countries', $countryAndStates['country']);
        $this->view->assign('states', $countryAndStates['state']);
    }

在模板中,我可以通过注释掉以下行来避免异常:

 <f:link.action action="editOrderAddressForAdmin" controller="OrderManagement" arguments="{address: order.shippingAddress, shipping: 1}" >
                        <div class="editOrderDetails">(edit)</div>
                    </f:link.action>

这又是一个涉及地址对象的链接。

1 个答案:

答案 0 :(得分:1)

问题在于地址论证.. 我猜你可能为shippingAddressAction()的地址参数定义了错误的类型..就像@param \My\Package\..\wrongType $address一样。 第二件事可能与Routes.yaml有关 - 例如routeParts中的错误..不是uriPattern中使用的唯一属性或者那里有错误的objectType .. 您还可以在shippingAddressAction()中添加@Flow \ IgnoreValidation(“$ address”) - 并查看会发生什么,请查看http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide/PartII/Validation.html的底部