After installing the module and selecting only 1 menu for a content type. Still when creating a new content type ALL menus are available. Module seems not do no anything accept making a new menu....

CommentFileSizeAuthor
9-4-2009 14-03-40.png11.56 KBopen social

Comments

vasike’s picture

do you have installed any other menu module related?
if yes please change (increase) the weight of the ctm module

open social’s picture

Nope. I tried Auto Menu afterwards, but it didn't work either (only selection of Navigation menu).

vasike’s picture

Status: Active » Postponed (maintainer needs more info)
open social’s picture

What more info do you need?

vasike’s picture

what modules do you have installed or were installed? how about their weights?
The menu settings for your content types.

alexPalumbo’s picture

Hi , I have exactly the same problem , i have set the weight of the module to -1 but it's still not working

Regards
Alessandro

this is a list of the enabled modules

Drupal core

Drupal 6.13
Includes: Block, Color, Database logging, Filter, Help, Locale, Menu, Node, Path, System, Taxonomy, Trigger, Update status, Upload, User
Modules

Advanced help 6.x-1.2
Includes: Advanced help, Advanced help example

Content Templates (Contemplate) 6.x-1.1
Includes: Content Templates

Content Construction Kit (CCK) 6.x-2.4
Includes: Content, Content Copy, Content Permissions, Fieldgroup, Node Reference, Number, Option Widgets, Text

Menu Settings per Content Type 6.x-1.0
Includes: Menu Settings per Content Type

Date 6.x-2.3
Includes: Date, Date API, Date Locale, Date Timezone

Devel 6.x-1.16
Includes: Devel

Email Field 6.x-1.2
Includes: Email

FileField 6.x-3.1
Includes: FileField

FileField Paths 6.x-1.3
Includes: FileField Paths

ImageField 6.x-3.1
Includes: ImageField

Link 6.x-2.6
Includes: Link

Utility 6.x-2.3
Includes: Access Permissions Fieldsets Manager, Module Weights, System Module, Util

Token 6.x-1.12
Includes: Token, Token actions
Update availablewarning
Transliteration 6.x-2.0
Includes: Transliteration

Validation API 6.x-1.0
Includes: Validation API

Views 6.x-2.6

vasike’s picture

you have to set the biggest weight possible for this module

jdelaune’s picture

Status: Postponed (maintainer needs more info) » Needs review

I ran into the same issue. May I suggest you add this line to your ctm_install(); function:

db_query("UPDATE {system} SET weight = 100 WHERE name = 'ctm'");
alan d.’s picture

How about something like this? (Cut n' paste from one of my modules)

This maintains a list of modules that cause issues (I only added the menu module, as I do not know the full list), and sets the weight to be 2 greater. Hardcoding 100 only works when all others are less than 100. I have seen weights of up to 999 (rare but these do happen).

<?php

function ctm_install() {
  # other stuff
  ctm_incompatible_modules_fix();
}

/**
 * Implementation of hook_update_N().
 * (I do not know the highest update required, this assumes first update for 6.1 branch)
 */
function ctm_update_6100() {
  $ret = array();
  ctm_incompatible_modules_fix();
  return $ret;
}

# Optional - hook into the requirements hook and automatically do this when someone previews the admin system overview page. :)

/**
 * Helper function to fix these module issues.
 */
function ctm_incompatible_modules_fix() {
  # just keep tagging these on here....
  $incompatible_modules = array('menu');
  $placeholders = db_placeholders($incompatible_modules, 'varchar');
  $weight = max(20, db_result(db_query("SELECT MAX(weight) + 2 FROM {system} WHERE name IN (". $placeholders .")", $incompatible_modules)));
  db_query("UPDATE {system} SET weight = %d WHERE name = 'ctm'", $weight);
}

?>

Setting weight too high may cause issues with other modules that are unrelated to the menu system.

Tino’s picture

Module did not work until I used phpMyAdmin to query:
UPDATE `my_drupal_database`.`system` SET `weight` = '100' WHERE `system`.`filename` = 'modules/ctm/ctm.module';

Thanks for the hint in #8 Starnox!

This module was just what I needed.

vasike’s picture

Status: Needs review » Closed (won't fix)

i thought a lot and i believe the solution it's to change the weight of the module that fits your drupal configuration, it could be done as shown above or with the Utility module (Module Weight) : http://drupal.org/project/util

stephen ollman’s picture

Setting the weight value to 100 using 'phpmyadmin' worked for me......clear cache also.

SELECT * FROM `system` WHERE name like '%ctm%'

UPDATE `gta_drupal`.`system` SET `weight` = '100' WHERE `system`.`filename` = 'sites/default/modules/ctm/ctm.module';