0

I get this error on an order review page:

    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)

Any idea why or what it means? BTW, I use the same template on another site and get no such error there. I am using Flow 2.1 and Neos .99 . Thanks

The method declaration is:

     /**
     * 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) {  

and here is a fuller listing of the template section referenced in my comment below:

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

A similar error ont he same page, seems to be related tot he address variable somehow:

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.

and the exception log looks like this:

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)

The declaration of editOrderAddressForAdmin looks like this:

/**
     * 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']);
    }

In the template I can avoid the exception by commenting out the following line:

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

So again its a link that involves an address object.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
The Newbie Qs
  • 483
  • 8
  • 22

1 Answers1

1

Problem lies in address argument.. I guess you may have wrong type defined for address argument for shippingAddressAction().. sth like @param \My\Package\..\wrongType $address. Second thing might be related to Routes.yaml - for example error in routeParts.. not unique property used in uriPattern or again wrong objectType there.. You can also add @Flow\IgnoreValidation("$address") in shippingAddressAction() - and check what happens, look at the bottom of http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide/PartII/Validation.html

k.tarkin
  • 726
  • 3
  • 9
  • Thanks, BTW the error seems to go away in production mode. Method declaration added to post. – The Newbie Qs Nov 05 '14 at 19:56
  • Thanks but I tried adding the ignore but no luck. I know nothing about the various yaml files, this is an app I am supporting not one I made. I am getting this same error from some other part of the page. In the shippingAddressAction method I moved the line $this->view->assign('availableAddress', $address); into a block that makes sure it is set first. Seems to have gotten me past it. – The Newbie Qs Nov 05 '14 at 22:16
  • In the Routes.yaml file I changes uriPattern: '{title}' to uriPattern: '{identifier}' for show and Edit address. now it seems to work, I'll test more but I think this may be it. – The Newbie Qs Nov 05 '14 at 22:54
  • Turns out the error DOES happen in prod mod but gets hidden - it still shows in the logs but the element does not display on the page and the rest of the page renders ok. This note applies to the Change link.action shown above. – The Newbie Qs May 01 '15 at 20:49
  • But on "Development" context it works fine? If so, in command line type first `export FLOW_CONTEXT=Production` and then `./flow flow:cache:flush --force` – k.tarkin May 02 '15 at 21:26
  • No in dev it does not work but there the error message is displayed on the web page - in production the error only shows in the logs and the link simply does not display on the page so it looked like it works there if you don't notice the little link missing. – The Newbie Qs May 04 '15 at 14:25
  • I added a followup question to pursue this further here: http://stackoverflow.com/questions/30061506/part-2-what-does-this-fluid-error-mean-no-unique-path-segment-could-be-found – The Newbie Qs May 05 '15 at 19:22
  • Also, just to clarify, the part of my problem that was fixed by changing uriPattern: '{title}' to uriPattern: '{identifier}' was the part about the editOrderAddressForAdmin link, the shippingAddress link was not addressed by that method, I don't even have a Route in my yaml for that action. – The Newbie Qs May 05 '15 at 19:25