Drupal 8 Menu links disappear

jlechuga's picture
jlechuga
Tue, 08/28/2018 - 14:03
#1
Drupal 8 Menu links disappear

I installed this module to drupal 8. And so far things are good but one thing. When trying to use my exisiting menu links to make a mega menu it removes the links. So what I am doing is activating the mega menu in my existing primary menu, once in menu editor window I click to change my menu from list to mega. Once I click that my links are removed. Is there a way to pull in my existing menu into the mega menu layout or code fix to allow the links to get pulled in. 

Thank you

cindy's picture
cindy
Thu, 08/30/2018 - 05:33

There are 3 types of menu item:

+ normal: menu item does not have submenu

+ list: menu item has submenu which is a list menu created in backend

+ mega: menu item has submenu which contains elements dragged into columns

If your menu item already has a list submenu and you set menu type Mega for the menu item, all links of submenu will be deleted. You have to drag thoes linked elements into column manuallly 

+ In old version, you can use element text, html

- Text element: after adding text, you select the text, toolbar appears, you choose '#' to insert  url.

- Html element: insert code like <a href="http://....">title link</a>

+ In new version, there are 2 more elements: link and image link to instert link => submega

Please update this file https://1drv.ms/u/s!ArRPkgVQNPYZg0ZYnPlW0fNmFdtj

jlechuga's picture
jlechuga
Thu, 08/30/2018 - 10:09

Hi, Thats a work around. Here are my thoughts. I think you have a good product that has some great features however I have some issues with it. If I am using drupal to have people create pages and publish them, how can the users add the newly created pages to a dropdown mega menu without having access to the full menu builder. Ideally if a user publishing pages adds a new page to a existing menu link then it should be applied automatically. But in this case it seems that your mega menu builder cant do that when in mega mode. This is where your mega menu builder tool needs to be able to pull in the links. I give you an example of a simliar tool that is free and incorporates the drupal menu and also allows you to build a mega menu while still using links that were created in drupal ( Drupal 8 Mega menu). If you can get this product to be able to pull in drupal 8 menu links it would be the best thing on the market. 

Aside from that I uploaded the update you shared and I see the new element options. However, I have been experiencing issues with the icons element. When I drag and drop icon element into mega menu it shows the user icon. But when I go the settings window to select a new icon from the drop down there is nothing there and I see no errors being generated. let me know if there is anything we can do to fix that. Also while on this topic I would like to use fontawesome icons library, is that an option. 

Thank you for you assistance.

cindy's picture
cindy
Fri, 08/31/2018 - 04:20

Thank you very much for your suggest. We will consider for future version

+ icons do not display: You may not install enough module. Megamenu uses module md_fontello to import icons from site fontello.

+ We have new update, replace module md_fontello with module md iconapi. MD iconapi supports more icons

Please check your email. We sent you some updated version. Just install module md iconapi and update module awebuilder and md megamenu 

jlechuga's picture
jlechuga
Mon, 09/03/2018 - 15:03

Hi, Thank you that helped. One last thing, Is there a way to add a search input field into the nav bar? and is there a way to add a basic bootstrap button into the nav bar? Not inside a dropdown or anything, Just directly inside nav bar. 

Thanks

jlechuga's picture
jlechuga
Sat, 09/01/2018 - 15:27

Hi, Thank you that helped. One last thing, Is there a way to add a search input field into th nav bar? and is there a way to add a button into the nav bar? Not inside a dropdown or anything. Just directly inside nav bar. 

Thanks

cindy's picture
cindy
Mon, 09/03/2018 - 23:24

Hello,

Currently, our module does not support the frature you require. We will consider for future version

Yet, you can override file template as follow:

+ copy file md-menubox.html.twig in folder md_megamenu/templates/frontend => folder templates in your theme

+ Add custome code to display search form under {{ el_content }} http://prntscr.com/kqahq9

+ Add css and js for your theme (style search form to match your theme design)

+ Clear drupal cache and check at frontend http://prntscr.com/kqah2x

jlechuga's picture
jlechuga
Mon, 09/10/2018 - 14:14

Hi I am experiencing another issue which is breaking the (/admin/structure/menu/manage/main?destination=/admin/structure/menu) edit menu page and not letting me access it. The error it is giving me is below. Please let me know what I can do to fix this quickly. 

The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\Core\Database\InvalidQueryException</em>: Query condition 'menu_link_content.uuid IN ()' cannot be empty. in <em class="placeholder">Drupal\Core\Database\Query\Condition->condition()</em> (line <em class="placeholder">103</em> of <em class="placeholder">core/lib/Drupal/Core/Database/Query/Condition.php</em>).

Thank you

cindy's picture
cindy
Mon, 09/10/2018 - 23:58

You cannot access /admin/structure/menu/manage/main because that page gets menu link data via uuid parameter. However, uuid "menu_link_content.uuid IN ()" is not transfered in the query.

We check code megamenu, data is only saved when you click save button at that page,  menu link is queried via Uuid at admin/structure/md_megamenu/build-menu/* and pages which include megamenu block.

To check, you can open file md_megamenu/src/Awelib/Awelib.php, search function getMenuItemsByList

and replace:

$menuContent = current(\Drupal::entityTypeManager()->getStorage('menu_link_content')->loadByProperties(['uuid' => $uuid]));
$mid = $menuContent->id();

with:

if($uuid){
$menuContent = current(\Drupal::entityTypeManager()->getStorage('menu_link_content')->loadByProperties(['uuid' => $uuid]));
$mid = $menuContent->id();
} else {
$mid = 'none';
}

If the problem still exists, it must be caused by other modules

jlechuga's picture
jlechuga
Tue, 09/11/2018 - 11:56

Thank you for the quick reply. I have another issue. So I want to have 2 navigation menus showing. A primary menu and a secondary menu. right now if I use your builder and activate the primary menu it works fine and does not affect my webpage. But if I turn on the secondary menu it negatively affects my websites functionaltu by altering WOW class settings. If there anyway to get this to show a primary nav (main) and a secondary nav (seconday-nav). 

Any help with this would be appreciated. 

Thank you 

cindy's picture
cindy
Tue, 09/11/2018 - 23:02

Hello

Please check your email for updates

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.