I have quite the specific issue here... hopefully there's a fix for it.

I have a view with an exposed filter for node content types (The type list is also filtered to only specific types). When I select multiple types to hide, the URL appears as ...?type[]=content_type_1&type[]=content_type_2&... and so on, and the view works fine. What happens, though, is every menu item that I have inserted manually into my primary site nagivation (the "main menu", for lack of a better word) which links to a static page (Drupal's default static type), completely disappears from the menu listing, and this is the only case that I've found where this happens (but it does happen consistently).

Ideas? Or better... a fix? :)

Comments

merlinofchaos’s picture

I can't think of a single way that a view can affect the menu. The systems are so unrelated that I can't imagine how this is possible. Perhaps something else is really at fault?

SpikeX’s picture

I know what you mean...but I really can't think of anything, myself.

Like I said, it happens consistently, and only one the page where I use an exposed content type filter (selecting more than one type and applying it). The only other semi-related thing I can think of, is that it has an argument, "Node: User posted or commented", which is often null (and then calls up "All values").

MamaGubs’s picture

I'm having a similar problem, which may be related. I have defined a nested menu using hook_menu in my module. For a few of the menu items, my page callback is views_embed_view to views with exposed filters. Everything works fine (the view is displayed and my nested menu displaying at the top of the page) until I use the exposed filter to select a subset of nodes. The view then reappears correctly, but the menu disappears. Any thoughts?

dawehner’s picture

If you embed a view with exposed filters, the "path" of the view is not automatically set.

You can also use this code

$view = views_get_view('name');
$view->override_path = 'yourpath';
print $view->preview($display, $args);
SpikeX’s picture

It's not embedded though, it's just a standard, regular Views page.

duygu’s picture

I have the same problem. The menu items with static node addresses diappears suddenly if I go to node with link. Some menu items like contact or a view item stays, but all others disappear.

SpikeX’s picture

I've found the solution, and you're not going to believe it.

The variable name in the URL that you use cannot be the word "type" - which is the default.

I simply changed the identifier from "type" to "content_type", and the issue immediately resolved itself.

Devs - Good luck explaining why menu items disappear when the word "type" is used as the identifier for the exposed content type filter. ;) I'm just glad I fixed it.

designotb’s picture

I had a similar issue recently with a site I was developing, while this solution didn't solve the problem directly, it did give me an idea of where to look.

The problem I was having was with a couple of unused arguments in the View I had created.

It was causing all of my views that contained a path element to disappear from my primary links menu.

Hope this helps someone else :)

breathingrock’s picture

Helped me a ton. Thanks!

My problem had to do with an argument with a provided default value (user id from logged in user).

After some playing I narrowed the problem down to the argument validator - switching to Basic Validation solved it. Here are the settings that broke it:

Validator: User
Only allow numeric UIDs [selected]
Restrict user based on role [checked]
Checked a custom role [a role the logged in user belongs to]
Action to take if argument does not validate: Hide view / Page Not Found (404)

Switched from 'Provide Default Argument' to 'Display all values' in 'Action to take if argument is not present', and problem remained.

Just updated from views 2.6 to 2.11. It happened sometime between those two.

Letharion’s picture

Version: 6.x-2.6 » 6.x-2.11
Assigned: Unassigned » merlinofchaos

@merlinofchaos
I'm not sure what to makes of this one, but there does seem to be some interesting information added lately, so I'm assigning to you so you can decide what to do with it :)

Letharion’s picture

Assigned: merlinofchaos » Letharion

Actually, I should try to reproduce it myself first.

pfaocle’s picture

Experienced something similar here (D6, Views 2.12), where a View page display with the "Node: User Posted or Commented" argument was causing two blocks containing menus to not show at all.

Solved at the moment by un-checking the "Restrict user based on role" option in the Validator options. Validating with "User" and "Only allow numeric UIDs" seems to be OK.

mustanggb’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)