Error when enable Mega MENU

luckycazin's picture
luckycazin
Thu, 02/08/2018 - 08:35
#1
Error when enable Mega MENU

When enabled Mega MENU tells me the following error:

UnexpectedValueException: External URLs do not have an internal route name. in Drupal\Core\Url->getRouteName() (line 555 of /xxx/xxx/xxxx/xxxx/core/lib/Drupal/Core/Url.php).

Can help solve the problem?

cindy's picture
cindy
Thu, 02/08/2018 - 21:49

Hi,

Are you using the latest version of MD Megamenu 8.x-1.4?

If not, please update (you can download the update at your account page https://megadrupal.com/user/luckycazin)

If yes, please send us your site url and admin account to check this issue

Best,

luckycazin's picture
luckycazin
Fri, 02/09/2018 - 04:34

Where to send access data?

cindy's picture
cindy
Fri, 02/09/2018 - 21:27

You can comment here with your account information and check "private message" under the comment box for security 

cindy's picture
cindy
Sun, 02/11/2018 - 21:12

Hi,

Please open file : md_megamenu/src/AweLib/AweLib.php and search function : public function getMenuItemsByList($list, $existItems, $level = 1)
Then, change:

 if($item['url']->isExternal()){
$href = $item['url']->toString();
} else if ($item['url']->getRouteName() == '<front>') {
$href = $item['url']->getRouteName();
} else if($item['url']->getRouteName() != '<none>'){
$href = $item['url']->toString();
}


with

if($item['url']->isExternal()){
$href = $item['url']->toString();
} else if($item['url']->getUri()){
$href = $item['url']->getUri();
}else if ($item['url']->getRouteName() == '<front>') {
$href = $item['url']->getRouteName();
} else if($item['url']->getRouteName() != '<none>'){
$href = $item['url']->toString();
}

luckycazin's picture
luckycazin
Mon, 02/12/2018 - 02:00

Now this error occurs:
UnexpectedValueException
: This URL has a Drupal route, so the canonical form is not a URI. in Drupal\Core\Url->getUri() (line 708 of /xxx/xxx/xxx/xxx/core/lib/Drupal/Core/Url.php).

cindy's picture
cindy
Mon, 02/12/2018 - 03:07

Please send us your FTP account to check this

Congnv's picture
Congnv
Mon, 02/12/2018 - 06:17

I fixed

Now all are ok

If submenu items don't show, please edit menu item parent, tick checkbox Show as expanded https://prnt.sc/idkinu

If you see error like bottom of image https://prnt.sc/idkh33, please go to megamenu  building page http://prntscr.com/idkn6e. Click save to update new megamenu data

luckycazin's picture
luckycazin
Mon, 02/12/2018 - 08:54

When i want to edit megamenu, open a blank page

cindy's picture
cindy
Tue, 02/20/2018 - 22:28

Hi,

Sorry for the late respond. We have just resumed our services after the holiday

When you edit megamenu, you will see a blue loading icon http://prntscr.com/ihmf67. After a while, the edit page will be shown. However, in your website, your files are loaded slowly, you can inspect chrome browser: F12 => tab network, check status and file loading time. You will see some files pending which means that it takes a long time to load those files http://prntscr.com/ihmfsf

It will take 2-3 minutes to complete loading css, js, font library before showing page builder http://prntscr.com/ihmif0ban 

You should check and solve this slow-loading issue

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.