I got a custom menu plugin in Magento2 as below.
class TopmenuPlugin {
public function afterGetHtml(\Magento\Theme\Block\Html\Topmenu $topmenu, $html) {
$html = '';
$html .= "<li class=\"level0 nav-1 level-top parent ui-menu-item\">";
$html .= "<a href='\index.php' class='level-top ui-corner-all' aria-haspopup=\"true\" tabindex=\"-1\" role=\"menuitem\"><span class=\"ui-menu-icon ui-icon ui-icon-carat-1-e\"></span><span>" . __("Home") . "</span></a>";
$html .= "</li>";
....
In Chrome and IE the URL is
http://website.com/index.php
In Firefox the URL is
http://website.com\/index.php
And in Firefox I am getting Whoops, our bad... error
Is there something I am missing here????
asked Apr 25, 2016 at 22:49
Malaiselvan
1,4224 gold badges21 silver badges31 bronze badges
2 Answers 2
After I change from
<a href='\index.php'
to
<a href='/index.php'
it works great.
answered Apr 25, 2016 at 23:27
Malaiselvan
1,4224 gold badges21 silver badges31 bronze badges
How is your base url set? Because if your base url is http://website.com\ by accident then u will have this problem. stores --> configuration --> general --> web. It should be http://website.com/
answered Apr 25, 2016 at 22:52
Versdivers
1381 gold badge2 silver badges10 bronze badges
-
The base URL is already as
http://website.com/Malaiselvan– Malaiselvan2016年04月25日 22:54:18 +00:00Commented Apr 25, 2016 at 22:54 -
Can u try clearing your cookie and cache following these steps :support.mozilla.org/nl/questions/951951Versdivers– Versdivers2016年04月25日 22:56:14 +00:00Commented Apr 25, 2016 at 22:56
-
Also clear the cache of the website and run php bin/magento indexer:reindexVersdivers– Versdivers2016年04月25日 22:57:13 +00:00Commented Apr 25, 2016 at 22:57
-
I cleared everything in firefox. Cleared the Magento cache and rebuilt the indexes... fyi.. I installed firefox few minutes before just for testing this issue.Malaiselvan– Malaiselvan2016年04月25日 23:00:13 +00:00Commented Apr 25, 2016 at 23:00
-
Can u post your php.ini settings? I know there is a settings that defines if u allow file links or not. It seems that this link has been marked as a file link for some reason and then it does that in firefox appearently. If thats not the case then i'm out of idea's xd wish u the best luck thoughVersdivers– Versdivers2016年04月25日 23:11:11 +00:00Commented Apr 25, 2016 at 23:11
default