aggregator sources and other menu item types as MENU_MODIFIED_BY_ADMIN display even though they are "disabled" in the drupal menu option. This is weird. According to menu.inc any MENU_VISIBLE option 2-8 should be visible according to the respective conditions: VISIBLE_IN_TREE, VISIBLE_IN_BREADCRUMB, VISIBLE_IF_HAS_CHILDREN.

We want all 3 to show up in footermap as a "full" site map. However there does not seem to be a way to disable menu items. For some silly reason drupal's menu core is doing operations in PHP and not in SQL when it comes to grabbing the menu. This may be inefficient.

I cannot fix this and maintain postgre and mysql database abstraction it looks like. That may be the reason why drupal doesn't do it either.

In any case if you need to get rid of aggregator feeds in footermap when they are "disabled", then replace the following conditional in the sql queries with:

right(cast(type as char),1) % 4 = 0 AND mid(cast(type as char),2,1) % 2 <> 0

I'm not going to commit this yet without review from drupal menu.inc maintainers.

Comments

mradcliffe’s picture

By Drupal design it looks like menu.type is based on a 3 digit hex operation. This means that a modified query in sql is not possible or it would break database abstraction (since mysql and postgresql have different function names for the same processes). This is pretty dumb. Instead they should have come up with a better representation of menu.type in order to better query the menu.

I'm thinking about adding a new menu.type to be truly disabled, but once again this would be against the drupal core and most likely not accepted.

mradcliffe’s picture

Status: Needs work » Fixed

I'm going to give up on doing anything sql wise. We'll just do everything with php's dechex function:

dechex($h->type) % 10 != 0

That should do the trick.

Anonymous’s picture

Status: Fixed » Closed (fixed)