0

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

2 Answers 2

1

After I change from

<a href='\index.php'

to

<a href='/index.php'

it works great.

answered Apr 25, 2016 at 23:27
0

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
6
  • The base URL is already as http://website.com/ Commented Apr 25, 2016 at 22:54
  • Can u try clearing your cookie and cache following these steps :support.mozilla.org/nl/questions/951951 Commented Apr 25, 2016 at 22:56
  • Also clear the cache of the website and run php bin/magento indexer:reindex Commented 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. Commented 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 though Commented Apr 25, 2016 at 23:11

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.