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:
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
Comment #1
pwolanin commentedDo 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"
Comment #2
damien tournoud commentedPlus, 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.
Comment #3
ainigma32 commentedChanging status since we're waiting for feedback from mercmobily.
- Arie
Comment #4
mercmobily commentedHi,
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.
Comment #5
pwolanin commentedBasically if you want this, just implement the 404 handler.