Hello, I think that if a user leaves a field on blank/empty, in the most cases that's happens because he/her do not want to add a value. If no value, nothing to do - nor? So I suggest that, if user do not add a value, submited content do not go to the front page. For redirect to front page, I suggest to use the official Drupal method "" instead of empty string.
Regards, thank You.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | cck_redirection-n335829-v4.patch | 34.68 KB | damienmckenna |
| #13 | cck_redirection_335829_11.patch | 708 bytes | guillaumeduveau |
| #11 | cck_redirection-n335829-empty_value.patch | 471 bytes | damienmckenna |
| #6 | cck_redirection_6_empty.patch | 1018 bytes | bigjim |
Comments
Comment #1
prom3theus commentedCorrection for "Drupal method "" instead of empty string."
Drupal method "<front>" instead of empty string.
Buggy tracker don't change the HTML special chars, argh.
Comment #2
prom3theus commentedPlease make a patch after a review if you accapt my request and the re-implemented code below:
Regards.
Comment #3
prom3theus commentedFor a more complate solution, I was modified the module code at line 561, posted code first line is just for context-information:
If redirection field's value is empty, redirection information message doesn't appears.
Comment #4
torsti commentedHello, I tried the code above and replacement and redirection info message hiding works ok. Though I'm desperately needing the most important feature, "do nothing if field is empty". Why redirection should always be directed to front page?
This cck field would be so fine addition to normal page insert - you could easily redirect pages when needed without messing with menu system.
prom3theus, can you enhance your code to do that?
Comment #5
bigjim commentedIf I'm not mistaken the auto-forwarding to front page is a change form the D5 version of cck re-direct correct? why change this behavior?
Comment #6
bigjim commentedHere is a patch that incorporates #3 and fixes the original issue posed by prom3thues. The crux of the additional fix is simply changing line 570 (in the current 6.x.1.1 version) from
to
Comment #7
choster commentedThe patches at prom3theus @3 and jalama @6 work well for me. though I had to edit them manually. Are they to be applied to HEAD or 6.x-1.1? I am using 1.1 straight from CVS and my line numbers are completely different, and so I cannot make a clean patch. The HEAD version, however, doesn't even have 500 lines in it.
Comment #8
tyromind commentedthanks prom3theus & jalama. Applied patch @6 working as expected. Running 6.x-1.1 on core 6.8
Comment #9
dboulet commentedWorks for me too, can we get these changes committed?
Comment #10
tyromind commentedsounds good to me!
Comment #11
damienmckennaHere's an alternative that brings the logic farther back to line 558, i.e. instead of:
it now says
Comment #12
BernieCram commentedI have applied Jamala's patch and CCK Redirection module now seems to be working for me as expected. Thanks for this because it was starting to redirect things to front every time I went in to edit stories older than the installation of the module.
I have not applied a patch before and followed instructions here: http://drupal.org/node/60818
Bernie
Comment #13
guillaumeduveauDamienMcKenna's method in #11 works nicely but strangely his patch won't apply at least for me. Here's a new patch. It would be nice to see this commited...
Comment #14
damienmckennaHere's a cleaned up patch. It also reviews the unnecessary if-statement from line 570.
Comment #15
guillaumeduveauThis patch removes all the code and puts it back with your modifications, why ?
Comment #16
damienmckennauh... oops.
Comment #17
damienmckennaSeems like it's a line ending issue.. Nano says that the file in CVS was saved in DOS/Windows format (CRLF) while my patch was to make it LF (UNIX/OSX). Note that all files in CVS *should* be saved as LF.
Comment #18
damienmckennaI've created an issue & patch to take care of the line endings issue: #501024: Code in CVS is saved with the wrong line ending format. Not sure if it will specifically work due to the weirdness of line endings vs patches..
Comment #19
damienmckennaThe patch in #13 misses another change from the current CVS checkout, e.g.:
Unfortunately, because the files in CVS are messed up with incorrect line endings I can't provide a proper patch (see above).
Comment #20
guillaumeduveauYes Damien, I realized this afternoon that your patch in #13 would not apply since I had not the latest CVS. Well I have issues with line ends too and need to read something about Drupal patches and that issue, if I found something.
Anyway I've applied for CVS access in order to move on with the module, commit all these patches and release and new version. Wait and see. Or would you like to do it ?
See you,
Guix
Comment #21
guillaumeduveauFixed in 6.x-1.2 !
Comment #22
damienmckennaAwesome! :-)
Comment #23
guillaumeduveauThanks to Robin ! Robin, BTW, just tell me if you don't want me to sort the issue queue.
Comment #24
damienmckennaWhile the change in CVS will strictly work, it has four times the validation necessary. I'll provide a cleaner patch that just needs one validation change based on my patch above.
Comment #25
dboulet commentedDamienMcKenna, are you still planning on submitting your patch, or can this be marked back to "fixed"?
Comment #26
dboulet commentedA year and a half without a response, so closing this issue. The bug is fixed, any code optimization can be taken care of in another issue.