Thanks, nice module and I will be playting with it in anger this wekeend so might be back with more (hopefully not!) but here is one.
I installed the latest version which was downloaded 20 mins ago.
I installed and after creating some vocabulary I went to create an ad. There are two 'Classified Ads' links under Create content. I can obvioulsy disable one of them but wanted to point it out to help improve the module.
I will likely be trying to play with the menus as I would like to have a single Classified Ads menu with two children; Create Ad and Search Ads. Anyway, onwards and upwards!
Thanks again,
Paul
Comment | File | Size | Author |
---|---|---|---|
#6 | Drupal_ScreenShot.gif | 69.45 KB | gatman |
Comments
Comment #1
mcurry CreditAttribution: mcurry commentedI've noticed the double navigation menu entry - I'll see if I can figure out what's wrong.
Enjoy!
Comment #2
friskya CreditAttribution: friskya commentedI also noticed it.
One is "ed-classifieds", the other is "ed_classifieds".
Since the link outside the "create content" menu uses the underscore, rather than the hyphen, I kept that one and disabled the other.
Just a quick workaround, for anyone else who might need it.
Comment #3
mcurry CreditAttribution: mcurry commentedYeah, that's a strange one, that's what happens here, too - and yet, the string "ed-classified" doesn't appear anywhere in my source code, so I'm at a loss to explain it...
Comment #4
gatman CreditAttribution: gatman commentedSame on the menu - using PHP 5 here.
Also experiencing two entries as well. These are observed under Category: Some Cat => Latest ad => User Name
URL: http://domain/node/14
Thanks!
John
Comment #5
mcurry CreditAttribution: mcurry commentedI'm not sure what you are referencing. Can you provide a real URL to the site exhibiting this problem, or a attach screen capture (please compress/reduce in size, or crop, as I'm on a slow dialup connection).
Thanks
Comment #6
gatman CreditAttribution: gatman commentedDuplicate data in addition to duplicate Create Content
Here is screen shot
Using PHP5
Thanks
John
Comment #7
mcurry CreditAttribution: mcurry commentedThanks for the screen shot.
Please open a separate bug/issue for the 'duplicate content' issue, and attach this screen shot to that issue as well.
Comment #8
mcurry CreditAttribution: mcurry commentedgatman, I've committed some fixes for the double content issue. Please install 5.x-1.5-4 release and see if that fixes it for you.
I've opened a separate issue for this: http://drupal.org/node/123894
Comment #9
demeritcowboy CreditAttribution: demeritcowboy commentedIt's coming from node_menu in node.module. This part:
foreach (node_get_types() as $type) {
if (function_exists($type->module .'_form')) {
$name = check_plain($type->name);
$type_url_str = str_replace('_', '-', $type->type);
$items[] = array(
'path' => 'node/add/'. $type_url_str,
'title' => drupal_ucfirst($name),
'access' => node_access('create', $type->type),
);
}
}
I don't know enough about drupal to know what the right fix is and I really don't understand the rational for the _ to - conversion above.
Comment #10
demeritcowboy CreditAttribution: demeritcowboy commented(By "rational" of course I meant "rationale")
Also node_add() does the same thing, so there needs to be some kind of fix for that too, otherwise on the "?q=node/add" page the link has a hyphen too.
Comment #11
mcurry CreditAttribution: mcurry commented'demeritcowboy': Thanks for doing the investigation.
Does anybody have any idea why the drupal core is doing this in 5.x? Does this mean that any module that embeds '_' in the node type will break?
BIzarre!
Comment #12
demeritcowboy CreditAttribution: demeritcowboy commentedAs far as I can see it's because the founder of drupal doesn't like underscores in urls. See comment #131 in http://drupal.org/node/62340.
So one solution is to just let them do this, and take the link out of your hook_menu(). Although I notice that if you have lm_paypal installed that module doesn't seem to work properly with the "-" version of the link, so you probably eventually need to rewrite everything not to have an underscore.
Comment #13
mcurry CreditAttribution: mcurry commentedI'll wait a while and see where this goes.. seems like any node type name with an underscore in the name is asking for trouble, though. Yuck.
Comment #14
mcurry CreditAttribution: mcurry commentedI wonder how this affects lm_paypal, amazon_node (amazon associates tools) and other module names/node types with underscores in them? Perhaps I've just neglected something in my port to Drupal 5...
Comment #15
demeritcowboy CreditAttribution: demeritcowboy commentedI don't think the module name matters too much, but since the decision seems to have been arbitrary according to that thread, who's to say they won't arbitrarily decide later to break those too. What I meant was that if you're using lm_paypal as a way to require payment for the classified ads, clicking on the "-" version of the classified ad creation link doesn't seem to give you the exact right form, and you can create the ad without a subscription.
I haven't looked more into it since lm_paypal didn't really fit my needs anyway.
Comment #16
sniper08 CreditAttribution: sniper08 commentedCan I comment out
from function ed_classified_menu($may_cache) as a temporary fix?
Comment #17
Willdex CreditAttribution: Willdex commentedJust following up on this post since I'm also confused about the "node/add/ed-classified" vs "node/add/ed_classified."
Comment #18
mcurry CreditAttribution: mcurry commented@sniper08, you can try that workaround, but I'm not sure what's going on so I can't really comment on it.
@all: I'll dig into this a bit more since I am now looking into Drupal 5 issues in this module.
In the meantime, you can disable the incorrect menu item in admin/build/menu as a simple fix, can't you?
Comment #19
mcurry CreditAttribution: mcurry commentedProposed fix checked in @ http://drupal.org/cvs?commit=67075
If I can't beat them, I'll join them. Since drupal node.module insists on changing '_' to '-' we'll just use '-' in all URL paths defined by this module. Bizarre, but I'm not going to ask why node.module does this - since it appears to be 'by design'...
Please wait for the next Drupal 5.x-1.x-dev snapshot build (it may take up to 12 hours for the next build, so please look for a version with a date newer than April 9 2007).
I would like to hear some feedback on this new version - look for any broken links, etc. since I've changed the URLs from 'ed_classified' to 'ed-classified'. If I don't hear of any issues with this -dev version, I'll create a new release in a few days (perhaps longer).
If you have an established site with links to any 'ed_classified' URLs, you might want to create some path aliases to the new form of the URL, and consider using the 'global redirect' module in order to prevent any 404 errors. (In other words, on a production site, watch for any 404 errors and try to mitigate them.)
Comment #20
mcurry CreditAttribution: mcurry commentedProposed fix checked in @ http://drupal.org/cvs?commit=67075
If I can't beat them, I'll join them. Since drupal node.module insists on changing '_' to '-' we'll just use '-' in all URL paths defined by this module. Bizarre, but I'm not going to ask why node.module does this - since it appears to be 'by design'...
Please wait for the next Drupal 5.x-1.x-dev snapshot build (it may take up to 12 hours for the next build, so please look for a version with a date newer than April 9 2007).
I would like to hear some feedback on this new version - look for any broken links, etc. since I've changed the URLs from 'ed_classified' to 'ed-classified'. If I don't hear of any issues with this -dev version, I'll create a new release in a few days (perhaps longer).
If you have an established site with links to any 'ed_classified' URLs, you might want to create some path aliases to the new form of the URL, and consider using the 'global redirect' module in order to prevent any 404 errors. (In other words, on a production site, watch for any 404 errors and try to mitigate them.)
Comment #21
mcurry CreditAttribution: mcurry commentedSorry for the double post - my internet connection dropped out after the first post, I hit refresh, and now we have two posts.
Comment #22
(not verified) CreditAttribution: commentedComment #23
mcurry CreditAttribution: mcurry commented