add a feature to send a 404 HTTP status code if a taxonomy term does not contain any nodes, please.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | taxonomy_cleanup_outdated_terms-d7.patch | 736 bytes | lilou |
| #9 | taxonomy_cleanup_outdated_terms.patch | 777 bytes | hass |
| #5 | taxonomy-HEAD.patch | 504 bytes | hass |
| #1 | taxonomy-4.7.6.patch | 486 bytes | hass |
Comments
Comment #1
hass commentedAttached a patch for 4.7.6
Comment #2
Crell commentedFeature requests only go against the development version, not stable (5) or legacy (4.7).
Comment #3
hass commentedhm, i need this fix in version 4.7.x and 5.x, too. I cannot wait for 6.x... should we change this into a bug for getting this critical problem fixed earlier?
Comment #4
Crell commentedThe behavior in 4.7 and 5 now is not a bug, but "by design". If you need it to behave differently for your site, you can modify it locally. Design decisions for stable versions of Drupal will not be revisited for that version. (Otherwise it ceases to be "stable", by definition.) Design decisions for the development version can be considered if there is agreement that the design change is a good one.
If you would like it considered for Drupal 6, provide a patch against the current HEAD version and include an explanation of why the change is warranted.
Comment #5
hass commentedok, this is the patch against taxonomy.module CVS v1.340
This patch removes outdated term URLs from search engines and therefor stop search engines crawling non existing content. this cleans up outdated urls and make a site looking better to search engines.
Comment #6
Crell commentedDo not set your own patches to RTBC.
Comment #7
catchBumping to 7.x - patch isn't rolled from root, but if you specify the path it still applies with a 261(!) line offset. Nice idea though.
Comment #8
catchThis is related to: http://drupal.org/node/185893 in many ways. Would be good to have consistent behaviour for these empty containers between both taxonomy and blog modules.
Comment #9
hass commentedUpdated patch for latest HEAD with some minor code optimizations.
Comment #10
hass commentedComment #11
birdmanx35 commentedStill applies, with a bit of offset, to Drupal HEAD.
Comment #12
lilou commentedReroll.
Comment #13
damien tournoud commentedSimple and nice idea.
Comment #14
drawk commentedPatch applies and works as advertised.
Comment #15
dries commentedIt is probably better to use
drupal_not_found()so this gets logged, we can omit blocks to save resources, etc, etc.Comment #16
hass commented@Dries: This wouldn't be a good idea. If we use
drupal_not_found()we are no more able to showt('There are currently no posts in this category.'). This is the correct error message for the user. We only set this header for crawlers, but keep a good message for users. Sometimes a category is really empty, but a menu entry exists. This is why the patch looks like it is.Comment #17
damien tournoud commentedI'm with hass on this one.
Comment #18
catchMe also, there's use cases for empty categories, you might still show parents, related terms, description and other stuff on that page.
Comment #19
dries commentedDoes that mean that drupal_not_found() should get a $message parameter to overwrite the default message? Let's think this through before making a decision.
Comment #20
hass commentedWell, we could also do this, but it would require some more options like:
This way seems to be a bit overkill for me and we don't have
$titlehere what gives us new problems. Adding another line for watchdog could be a good idea.Or an keep_title option what looks awful to me:
Not sure what to do now.
Comment #21
catchPutting back to needs review.
Comment #22
catchPost taxonomy sprint, I'm more convinced of #18 - you may want to show all kinds of things which don't require nodes being assigned to the term yet on these pages, so RTBC again.
Comment #23
dries commented@hass, re #20: I don't think we need custom watchdog messages. Using the standard 404 message would be sufficient. All we'd need is the ability to overwrite the title and the message.
@catch, Damien: on my personal blog, I use the features like "Top page not found errors" (?q=admin/reports/page-not-found). This patch would "break" that view in that it does not properly report 404s for use by other parts of the system.
Comment #24
catch@Dries, that's a good point, I'd partially forgotten what the original issue was about ;)
Per #18, I'm going to mark this won't fix - if a taxonomy term has a description, then it's not 'empty' as such - http://drupal.org/node/306224 will offer cleaner ways for modules like taxonomy_image etc. to interact with core terms, panels and views already allow for various things to be done on these pages which aren't simply nodes in the term.
I think we need much better administrative tools to help deal with merging terms, finding terms which aren't assigned to any nodes etc. - that's the real problem here.