(第2部分)这种流体误差是什么意思? 100次迭代后找不到唯一的路径段 [英] (PART 2) what does this fluid error mean? No unique path segment could be found after 100 iterations
问题描述
This is a continuation of a previously asked and answered question that has cropped up again and needs a different solution ( different problem but same error message ).
同样,未显示shippingAddress操作的链接:
Again the links to the shippingAddress action are not rendering:
<f:link.action action="shippingAddress" controller="Order" arguments="{address: shippingAddress, changeAddress: 1}"><f:translate id="seethroughweb.shop.change-address">Change</f:translate></f:link.action>
在调试并期望发现地址变量为NULL时,但我发现不是,但是var_dump将其报告为错误的类型-它显示为:TYPO3\Flow\Persistence\Doctrine\Proxies\__CG__\SeeThroughWeb\Shop\Domain\Model\Address persistable proxy
When debugging and expecting to find that the address variable is NULL but I found it was not, however it was being reported as the wrong type by var_dump - it was shown to be: TYPO3\Flow\Persistence\Doctrine\Proxies\__CG__\SeeThroughWeb\Shop\Domain\Model\Address persistable proxy
但应为:
SeeThroughWeb\Shop\Domain\Model\Address prototype persistable proxy
所以现在的问题是-为什么报告了错误的类型?为什么变量类型错误?查看代码,似乎所有内容都引用@param \SeeThroughWeb\Shop\Domain\Model\Address $address
So the question now is - why is the wrong type reported? Why is the variable the wrong type? Looking at the code everything seems to refer to @param \SeeThroughWeb\Shop\Domain\Model\Address $address
异常日志中产生的异常与以前一样:
The resulting exception in the Exception Logs is as before:
Uncaught exception #1316441798: No unique path segment could be found after 100 iterations.
80 TYPO3\Fluid\ViewHelpers\Link\ActionViewHelper_Original::render("shippingAddress", array|2|, "Order", NULL, NULL, "", "", array|0|, FALSE, array|0|, FALSE)
79 call_user_func_array(array|2|, array|11|)
如Philipp所述,
推荐答案
as Philipp already stated, these two issues are probably not related (in this case it's Doctrine though that creates the proxy, not Flow).
如果搜索异常代码 1316441798 ,您会看到在IdentityRoutePart
中引发了该异常.
可能您的路线如下:
If you search for the exception code 1316441798, you can see that this exception is thrown in the IdentityRoutePart
.
Probably you have a route like the following:
-
uriPattern: 'some/path/{address}'
defaults:
'@package': 'SeeThroughWeb.Shop'
'@controller': 'Order'
'@action': 'shippingAddress'
routeParts:
'address':
objectType: 'SeeThroughWeb\Shop\Domain\Model\Address'
使用objectType
选项,您告诉Flow使用数据库表将"{address}"映射到SeeThroughWeb\Shop\Domain\Model\Address
的实例.这样做是为了即使该实体发生更改也可以保持URL有效.
With the objectType
option you tell Flow to use a database table to map "{address}" to an instance of SeeThroughWeb\Shop\Domain\Model\Address
. This is done in order to keep the URL valid even if the entity changes.
如果两个实体解析到相同的URL段,则Flow将附加一个计数器(例如"address-1","address-2",...).如果在100次迭代后仍无法解析唯一的段,则会抛出该异常.
If two entities resolve to the same URL segment, Flow will append a counter (e.g. "address-1", "address-2", ...). The exception is thrown if no unique segment could be resolved after 100 iterations.
请参阅流程文档有关对象路径零件"的更多详细信息.
See Flow documentation for further details on "Object Route Parts".
这篇关于(第2部分)这种流体误差是什么意思? 100次迭代后找不到唯一的路径段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!