Custom router gives me “Front controller reached 100 router match iterations” when matches 404 Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?What is the cause of “Front controller reached 100 router match iterations” error?How can i rewrite TierPrice Block in Magento2404 Page - Front controller reached 100 router match iterationsMagento 2:ERROR: Front controller reached 100 router match iterationsMagento 2 Admin Front controller reached 100 router match iterationsMagento 2: toolbar url problems in custom module with custom routermagento 2 - custom router throws Front controller reached 100 router match iterations errorHow to solve Front controller reached 100 router match iterations in magento2Magento 2 Front controller reached 100 router match iterations issueMagento 2 : Front controller reached 100 router match iterations
Marquee sign letters
Bright yellow or light yellow?
Like totally amazing interchangeable sister outfit accessory swapping or whatever
Why is arima in R one time step off?
Getting AggregateResult variables from Execute Anonymous Window
How long can a nation maintain a technological edge over the rest of the world?
Will temporary Dex penalties prevent you from getting the benefits of the "Two Weapon Fighting" feat if your Dex score falls below the prerequisite?
Is it appropriate to mention a relatable company blog post when you're asked about the company?
Will I be more secure with my own router behind my ISP's router?
All ASCII characters with a given bit count
Processing ADC conversion result: DMA vs Processor Registers
Where/What are Arya's scars from?
How can I wire a 9-position switch so that each position turns on one more LED than the one before?
"Working on a knee"
TV series episode where humans nuke aliens before decrypting their message that states they come in peace
What were wait-states, and why was it only an issue for PCs?
Suing a Police Officer Instead of the Police Department
What is the ongoing value of the Kanban board to the developers as opposed to management
France's Public Holidays' Puzzle
When does Bran Stark remember Jamie pushing him?
Does a Draconic Bloodline sorcerer's doubled proficiency bonus for Charisma checks against dragons apply to all dragon types or only the chosen one?
Where can I find how to tex symbols for different fonts?
How was Lagrange appointed professor of mathematics so early?
Why do people think Winterfell crypts is the safest place for women, children & old people?
Custom router gives me “Front controller reached 100 router match iterations” when matches 404
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?What is the cause of “Front controller reached 100 router match iterations” error?How can i rewrite TierPrice Block in Magento2404 Page - Front controller reached 100 router match iterationsMagento 2:ERROR: Front controller reached 100 router match iterationsMagento 2 Admin Front controller reached 100 router match iterationsMagento 2: toolbar url problems in custom module with custom routermagento 2 - custom router throws Front controller reached 100 router match iterations errorHow to solve Front controller reached 100 router match iterations in magento2Magento 2 Front controller reached 100 router match iterations issueMagento 2 : Front controller reached 100 router match iterations
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I created a custom router
this is my di.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="MagentoFrameworkAppRouterList">
<arguments>
<argument name="routerList" xsi:type="array">
<item name="default" xsi:type="array">
<item name="class" xsi:type="string">VendorCustomControllerRouter</item>
<item name="disable" xsi:type="boolean">false</item>
<item name="sortOrder" xsi:type="string">40</item>
</item>
</argument>
</arguments>
</type>
</config>
This is the block match function:
public function match(MagentoFrameworkAppRequestInterface $request)
$identifier = trim($request->getPathInfo(), '/');
if(strpos($identifier, 'search') !== false)
$request->setModuleName('catalogsearch')->setControllerName('result')->setActionName('index');
else
//There is no match
return;
/*
* We have match and now we will forward action
*/
return $this->actionFactory->create(
'MagentoFrameworkAppActionForward', ['request' => $request]
);
Everything is fine till I got an error "Front controller reached 100 router match iterations" everytime I go to a 404 page.
magento2 router
add a comment |
I created a custom router
this is my di.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="MagentoFrameworkAppRouterList">
<arguments>
<argument name="routerList" xsi:type="array">
<item name="default" xsi:type="array">
<item name="class" xsi:type="string">VendorCustomControllerRouter</item>
<item name="disable" xsi:type="boolean">false</item>
<item name="sortOrder" xsi:type="string">40</item>
</item>
</argument>
</arguments>
</type>
</config>
This is the block match function:
public function match(MagentoFrameworkAppRequestInterface $request)
$identifier = trim($request->getPathInfo(), '/');
if(strpos($identifier, 'search') !== false)
$request->setModuleName('catalogsearch')->setControllerName('result')->setActionName('index');
else
//There is no match
return;
/*
* We have match and now we will forward action
*/
return $this->actionFactory->create(
'MagentoFrameworkAppActionForward', ['request' => $request]
);
Everything is fine till I got an error "Front controller reached 100 router match iterations" everytime I go to a 404 page.
magento2 router
what is the url of your 404 page ?
– Yash Shah
yesterday
cms/noroute/index this is working, but when I get to example.com/any-inexistent-path, the error takes place
– xdev
yesterday
add a comment |
I created a custom router
this is my di.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="MagentoFrameworkAppRouterList">
<arguments>
<argument name="routerList" xsi:type="array">
<item name="default" xsi:type="array">
<item name="class" xsi:type="string">VendorCustomControllerRouter</item>
<item name="disable" xsi:type="boolean">false</item>
<item name="sortOrder" xsi:type="string">40</item>
</item>
</argument>
</arguments>
</type>
</config>
This is the block match function:
public function match(MagentoFrameworkAppRequestInterface $request)
$identifier = trim($request->getPathInfo(), '/');
if(strpos($identifier, 'search') !== false)
$request->setModuleName('catalogsearch')->setControllerName('result')->setActionName('index');
else
//There is no match
return;
/*
* We have match and now we will forward action
*/
return $this->actionFactory->create(
'MagentoFrameworkAppActionForward', ['request' => $request]
);
Everything is fine till I got an error "Front controller reached 100 router match iterations" everytime I go to a 404 page.
magento2 router
I created a custom router
this is my di.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="MagentoFrameworkAppRouterList">
<arguments>
<argument name="routerList" xsi:type="array">
<item name="default" xsi:type="array">
<item name="class" xsi:type="string">VendorCustomControllerRouter</item>
<item name="disable" xsi:type="boolean">false</item>
<item name="sortOrder" xsi:type="string">40</item>
</item>
</argument>
</arguments>
</type>
</config>
This is the block match function:
public function match(MagentoFrameworkAppRequestInterface $request)
$identifier = trim($request->getPathInfo(), '/');
if(strpos($identifier, 'search') !== false)
$request->setModuleName('catalogsearch')->setControllerName('result')->setActionName('index');
else
//There is no match
return;
/*
* We have match and now we will forward action
*/
return $this->actionFactory->create(
'MagentoFrameworkAppActionForward', ['request' => $request]
);
Everything is fine till I got an error "Front controller reached 100 router match iterations" everytime I go to a 404 page.
magento2 router
magento2 router
asked 2 days ago
xdevxdev
637
637
what is the url of your 404 page ?
– Yash Shah
yesterday
cms/noroute/index this is working, but when I get to example.com/any-inexistent-path, the error takes place
– xdev
yesterday
add a comment |
what is the url of your 404 page ?
– Yash Shah
yesterday
cms/noroute/index this is working, but when I get to example.com/any-inexistent-path, the error takes place
– xdev
yesterday
what is the url of your 404 page ?
– Yash Shah
yesterday
what is the url of your 404 page ?
– Yash Shah
yesterday
cms/noroute/index this is working, but when I get to example.com/any-inexistent-path, the error takes place
– xdev
yesterday
cms/noroute/index this is working, but when I get to example.com/any-inexistent-path, the error takes place
– xdev
yesterday
add a comment |
2 Answers
2
active
oldest
votes
try compile and flush cache
bin/magento setup:di:compile
bin/magento cache:flush
not working, already done
– xdev
2 days ago
Try dump data in your condition "strpos($identifier, 'search')" I think it has problem in here
– the light
2 days ago
you mean to print the identifier value?
– xdev
2 days ago
add a comment |
Set return null in your else condition :
public function match(MagentoFrameworkAppRequestInterface $request)
$identifier = trim($request->getPathInfo(), '/');
if(strpos($identifier, 'search') !== false)
$request->setModuleName('catalogsearch')->setControllerName('result')->setActionName('index');
else
//There is no match
return null;
/*
* We have match and now we will forward action
*/
return $this->actionFactory->create(
'MagentoFrameworkAppActionForward', ['request' => $request]
);
not working... still gives me that error
– xdev
2 days ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270866%2fcustom-router-gives-me-front-controller-reached-100-router-match-iterations-wh%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
try compile and flush cache
bin/magento setup:di:compile
bin/magento cache:flush
not working, already done
– xdev
2 days ago
Try dump data in your condition "strpos($identifier, 'search')" I think it has problem in here
– the light
2 days ago
you mean to print the identifier value?
– xdev
2 days ago
add a comment |
try compile and flush cache
bin/magento setup:di:compile
bin/magento cache:flush
not working, already done
– xdev
2 days ago
Try dump data in your condition "strpos($identifier, 'search')" I think it has problem in here
– the light
2 days ago
you mean to print the identifier value?
– xdev
2 days ago
add a comment |
try compile and flush cache
bin/magento setup:di:compile
bin/magento cache:flush
try compile and flush cache
bin/magento setup:di:compile
bin/magento cache:flush
answered 2 days ago
the lightthe light
695
695
not working, already done
– xdev
2 days ago
Try dump data in your condition "strpos($identifier, 'search')" I think it has problem in here
– the light
2 days ago
you mean to print the identifier value?
– xdev
2 days ago
add a comment |
not working, already done
– xdev
2 days ago
Try dump data in your condition "strpos($identifier, 'search')" I think it has problem in here
– the light
2 days ago
you mean to print the identifier value?
– xdev
2 days ago
not working, already done
– xdev
2 days ago
not working, already done
– xdev
2 days ago
Try dump data in your condition "strpos($identifier, 'search')" I think it has problem in here
– the light
2 days ago
Try dump data in your condition "strpos($identifier, 'search')" I think it has problem in here
– the light
2 days ago
you mean to print the identifier value?
– xdev
2 days ago
you mean to print the identifier value?
– xdev
2 days ago
add a comment |
Set return null in your else condition :
public function match(MagentoFrameworkAppRequestInterface $request)
$identifier = trim($request->getPathInfo(), '/');
if(strpos($identifier, 'search') !== false)
$request->setModuleName('catalogsearch')->setControllerName('result')->setActionName('index');
else
//There is no match
return null;
/*
* We have match and now we will forward action
*/
return $this->actionFactory->create(
'MagentoFrameworkAppActionForward', ['request' => $request]
);
not working... still gives me that error
– xdev
2 days ago
add a comment |
Set return null in your else condition :
public function match(MagentoFrameworkAppRequestInterface $request)
$identifier = trim($request->getPathInfo(), '/');
if(strpos($identifier, 'search') !== false)
$request->setModuleName('catalogsearch')->setControllerName('result')->setActionName('index');
else
//There is no match
return null;
/*
* We have match and now we will forward action
*/
return $this->actionFactory->create(
'MagentoFrameworkAppActionForward', ['request' => $request]
);
not working... still gives me that error
– xdev
2 days ago
add a comment |
Set return null in your else condition :
public function match(MagentoFrameworkAppRequestInterface $request)
$identifier = trim($request->getPathInfo(), '/');
if(strpos($identifier, 'search') !== false)
$request->setModuleName('catalogsearch')->setControllerName('result')->setActionName('index');
else
//There is no match
return null;
/*
* We have match and now we will forward action
*/
return $this->actionFactory->create(
'MagentoFrameworkAppActionForward', ['request' => $request]
);
Set return null in your else condition :
public function match(MagentoFrameworkAppRequestInterface $request)
$identifier = trim($request->getPathInfo(), '/');
if(strpos($identifier, 'search') !== false)
$request->setModuleName('catalogsearch')->setControllerName('result')->setActionName('index');
else
//There is no match
return null;
/*
* We have match and now we will forward action
*/
return $this->actionFactory->create(
'MagentoFrameworkAppActionForward', ['request' => $request]
);
answered 2 days ago
Rohan HapaniRohan Hapani
7,11631865
7,11631865
not working... still gives me that error
– xdev
2 days ago
add a comment |
not working... still gives me that error
– xdev
2 days ago
not working... still gives me that error
– xdev
2 days ago
not working... still gives me that error
– xdev
2 days ago
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270866%2fcustom-router-gives-me-front-controller-reached-100-router-match-iterations-wh%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
what is the url of your 404 page ?
– Yash Shah
yesterday
cms/noroute/index this is working, but when I get to example.com/any-inexistent-path, the error takes place
– xdev
yesterday