Hi,

I am porting Drigg to Drupal 6. I am VERY nearly there. However, I am unable to do so because of what seems to be a bug in Drupal 6.

If you have something like this:

function foobar_menu(){
  $items['%foobar_id'] = array(
    'page callback' => 'foobar',
    'access arguments' => array('access content'),
    'page arguments' => array(0),
    'type' => MENU_CALLBACK,
  );
}

function foobar_id_load($foobar_id){
  return $foobar_id;
}

The loader is not called. This forum entry has more information about it:

http://drupal.org/node/238346

It really looks like arg(0) is just not considered. This is absolutely _crucial_ in Drigg, which creates entries like http://www.example.com/Category_1 like Digg does.
So, effectively, Drigg cannot be ported until this is fixed...

$100 to anybody who gets a patch that gets committed. Developers, please don't postpone it to Drupal 7.

Marking "critical" because it seems to be a genuine bug with the menu system that prevents something important...

Bye,

Merc.

Comments

pwolanin’s picture

Do you really want to be using a wildcard, or can you create a real path for each item?

Having a wildcard in the first position doesn't make much sense - basically it says "if this path matching nothing else (it's a 404) try to load a Drigg ID"

damien tournoud’s picture

Category: bug » support
Priority: Critical » Normal

Plus, there could only be one path like this in a whole Drupal website, which could create conflicts between modules.

This is not a bug. I'm really opposed that we change the current behavior.

ainigma32’s picture

Status: Active » Postponed (maintainer needs more info)

Changing status since we're waiting for feedback from mercmobily.

- Arie

mercmobily’s picture

Hi,

I changed my module so that it actually adds each new path. It's a bit more work, but it feels like the way to do this.

I will leave it up to you wheather you should allow Drupal to have a wildcard as the first bit. I agree that it would be "anything"; if NO other module wants it, and you cannot thing of ANY reason why you should have it, then close this issue.

Bye!

Merc.

pwolanin’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Basically if you want this, just implement the 404 handler.