Closed (fixed)
Project:
Mail MIME
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Feb 2015 at 18:39 UTC
Updated:
28 Jun 2016 at 09:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
DrCord commentedI have made a patch, it is attached. The patch is only a 3 line addition, but due to formatting the code the if statement wraps with proper indenting, the patch looks more complicated than it is, like the entire file was changed...
Comment #2
salvisThank you for the analysis and patch!
Something is wrong with the patch -- it wants to replace the entire file, not just the
if. Maybe it's because you changed the file mode?Let's see what the testbot says. Patches need to go against HEAD, i.e. the -dev version.
While you're at it, please make your comment conform to the coding guidelines (space, initial cap, ending dot).
Comment #4
DrCord commentedHere is a new patch that I made sure the file permissions were the same, cleaned up my comment and such...I think the reason it is marking the file as having tons of replaced lines is the indentation from wrapping blocks the "if" statements...
Comment #5
salvisPlease set NR to trigger the testbot.
Comment #6
salvisNow it passes, but this is one nasty patch. I don't want to lose the entire history of the file.
What exactly is happening that disables the module? Can't we be more precise?
(BTW, Drupal coding conventions require ending comments with a dot.)
Comment #7
salvisAh, I only saw the change in mailmime.inc...
But now that I'm seeing the part in mailmime.module, I'm wondering why the former is needed at all.
Why not just something more reasonable like
?
(Note the white space.)
Comment #8
DrCord commentedthat is a very reasonable solution. I will try and find time today to re-patch. Thanks for your help on this! :D
Comment #9
DrCord commentedHere is a patch with the suggested edit to the patch in mailmime.module, it makes it a much nicer patch. I looked at making a change to the patch in mailmime.inc, but it doesn't really lend itself to the same solution as it isn't a function to return from...
Comment #10
DrCord commentedComment #11
salvisWhy are you still nuking mailmime.inc?
Comment #12
DrCord commentedbecause it caused errors if I didn't. It tried to do the stuff in the file during drush and was very unhappy.
Comment #13
salvisPlease be more specific.
Comment #14
DrCord commentedThe module would throw errors trying to load the classes that it couldn't due to the paths not being set by the init hook or something. I didn't save the errors at the time, just fixed them. Feel free to generate them and patch this yourself if my patch is unacceptable.
Comment #15
salvisThe problem with this patch is that it's 58K because of indenting changes, and
a) it's impossible to find the actual changes and
b) Git will mark most everything as changed when it really isn't.
I'm just trying to help out here because the author/maintainer has vanished, and I don't want to commit a patch that destroys the history of the module.
Comment #16
salvisHere's a more reasonable version of #9 that does the same thing except for changing indentation.
You also tried to fix some ugly indentation and line wrapping issues, but we must never fix functionality and hide (!) unrelated cosmetics in the same patch. Except maybe adding an empty line or two...
Comment #18
salvisComment #19
DrCord commentedYou rock! Thanks for fixing this the right way.
Comment #21
spuki commentedI got the error, which does not appear when I remove this patch from code.
Comment #22
spuki commentedComment #23
spuki commentedComment #24
DrCord commentedall your patch (#22) does is remove the patched functionality, this is not a patch to use!
Comment #25
DrCord commentedComment #26
haggins commentedIt should be
instead of
Otherwhise it will..
Comment #27
salvisSo, is this what we need?
Comment #28
haggins commentedAfter reading again the whole issue and thinking about it, I'd even say that patch from #22 is the correct one.
In #17 you committed a patch which checks for a drush instance in hook_init() as well as in mimemail.inc.
Since the original issue was just about the issue, that drush automatically disables mailmime due to hook_init() execution, I don't see a need to cancel execution in mimemail.inc. It can't hurt drush to have the MailMIME class available.
Comment #29
haggins commentedIndeed, I needed to apply patch #22 yesterday to make cron via drush working again. It's 100% save because the Drush condition in mailmime.inc makes absolutely no sense.
Comment #30
salvis#22 does not apply to the HEAD of 7.x-2.x because the condition is reversed.
So, could this be what we need?
Comment #31
haggins commentedYes, that's it! Thanks.
Comment #33
salvisOk, I take this as RTBC...
Thanks!