Closed (fixed)
Project:
Mailhandler
Version:
master
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Jan 2006 at 07:06 UTC
Updated:
3 May 2006 at 18:15 UTC
Jump to comment: Most recent file
Comments
Comment #1
markus_petrux commentedJust wanted to say that I started to port it, also fixing some minor spelling/hardcoded language issues.
Though, it is a huge job. =:-o ...if anyone else is doing this, please speak up! ;-)
Comment #2
moshe weitzman commentedI don't know of anyone doing this. Thanks.
Comment #3
markus_petrux commentedmoshe, do you know how to translate 'view_private' in hook_user ?
Is it 'view' and showing only to self?
Comment #4
markus_petrux commentedThe admin/mailhandler part seems to work (add/edit/del mailboxes). Now, I need to review the rest.
I'm attaching what I have done in mailhandler.module, if anyone wants to test?
Since, I never used this module before I'm going somehow blind, lol
Comment #5
moshe weitzman commentedyes, view_private means that only self and admins can see it. like email address field
please have a look at the upgrading page (http://drupal.org/update/modules) to make sure we are catching everything that has changed. you may ask questions here or to me via email as needed. thanks again.
Comment #6
markus_petrux commentedRegarding this message, I've been thinking... what about adding an option for each mailbox where admins can choose which roles can post. It would make possible to control who can view this message in hook_user and, more importantly, who can post. ???
Comment #7
moshe weitzman commentedLets not add featrues during this port ... ideally other modules should be informing users about their mailbox capabilities using hook_user(). If I had commit access to blog.module, I would move this message there and let it decide who can post by mail.
Comment #8
jasonwhat commentedI'll test once ported. Thanks for your work.
Comment #9
markus_petrux commentedOk, here we go...
Here's the SQL schema using the new UTF8 stuff
Comment #10
markus_petrux commented..and here's the whole module script.
There might be some more cleanup to do. Please, let me know.
Comment #11
jasonwhat commentedWhen trying to add a mailbox I get this error:
Comment #12
markus_petrux commentedAre you sure you're testing with the script I posted above?
Comment #13
jasonwhat commentedUsing the code from here,
http://drupal.org/files/issues/mailhandler_1.module
Comment #14
markus_petrux commentedIn that file, line 613 looks like this:
and form_textfield is not used anywhere in mailhandler.module
Strange
Comment #15
jasonwhat commentedOoops. I have a multi-site install and I did have mailhandler elsewhere. Sorry about that. I tested it and it is working well. The only issue I noticed was that I had to add "status: 1" to the defualt commands for stuff to publish, I don't think this was the case with the original module. Another issue that may not matter to many is how to deal with the new tagging in drupal. Could a user simply add category: (red,green,blue) to create new tags with those categories or something?
Comment #16
markus_petrux commentedGreat it worked! :-)
I believe we have to wait for moshe's input to add/change features. My main goal was to make it work in 4.7
Comment #17
markus_petrux commentedYup! I forgot to call node_submit before calling node_save. "status: 1" shouldn't be necessary if the poster does not have 'administer nodes' permission.
I'll post another script as soon as I make some tests.
Comment #18
markus_petrux commentedWell, node_submit solved that. Here's the new script.
Comment #19
jasonwhat commentedOne more bug I noticed. I'm unable to delete a mailhandler mailbox once I've set it up. Clicking the "delete" link doesn't cause any change. Otherwise things seem great. Thanks.
Comment #20
markus_petrux commentedDelete issue fixed.
Comment #21
jasonwhat commentedLatest with mailhndler_3: still needed to set the publish status to have the nodes published. The command to choose the filter setting didn't work either and used the default. I set "format: 3" but it still chose the default of filtered html instead of full html. I'll have to test more, but I published one at midnight and it was dated midnight the day before, not midnight of the current day and therefore wasn't posted at the top of the blog list. This could be a Drupal thing with the time and not the module though. The delete is working great, thanks.
Comment #22
markus_petrux commentedThe published status worked for me when sending an email assigned to a user that has permission to blog, but has not 'administer nodes' access. Could you please check this?
I'll try to see what's going on with the format and date.
@moshe: have you seen the code? is there anything else missing?
Comment #23
moshe weitzman commentedi haven't reviewed it yet. if possible please supply a patch so i don't have to generate my own :). i will review very soon.
it is possible that the filter format was not working before the port too. not sure.
@jason - maybe check your settings for the blog content type in admin/settings => content types. you might be unpublishing new nodes by default?
posting of categories worked in 4.6 so it is within scope to assure that they work in the port. if you want to wait on that issue until this port is committedd, i am OK with that.
Comment #24
markus_petrux commentedmoshe, I changed almost all lines in the script. Check yourself with WinMerge or something like that.
Are you sure you want a patch?
Comment #25
moshe weitzman commentedok, i will generate one myself if needed. thanks.
Comment #26
jasonwhat commentedMy settings are set so that all blogs are published and have comments enabled, but this isn't the case with mailhandler nodes. I'm mailing from user 1's email so all permissions are set, but I also added myself to another group with "edit own blog" permissions and still notice the problem of blogs not being published. Also, though I doubled checked that comments are default for blogs, they are being disabled for mailhandler published nodes and as stated before the input filters command is having no effect. I'm not seeing any errors in the log. Maybe if these issues can't be replicated I'll list my active modules to see if there is a conflict.
Comment #27
moshe weitzman commentedgood description. can you try again with a user who does not have admin nodes permission?
when you have admin nodes, the submit code probably expects to see the status checkbox and the promote checkbox and uses their values. if not present (as in this case), they default to false. it would be helpful if they defaulted to the content type setting.
maybe markus_ will have a good idea how to fix. if we need to, we can fix in mailhandler but ideally we fix in node.module
Comment #28
markus_petrux commentedUID has 'administer nodes' permission, therefore it doesn't explicitly sets publishing options. It is the same behaviour when UID creates a blog entry interactively. If posting via UID 1's mail you have to set "status: 1" in the command section.
Comment #29
markus_petrux commentedSorry, by "UID", I meant "UID 1".
Comment #30
moshe weitzman commentedi opened an issue for the promote/status/sticky problem at http://drupal.org/node/46549
Comment #31
jasonwhat commentedI tried it with another user and it did publish properly. However, it still set comments on the node to disabled, even though that isn't the default. It did choose the default input format 1, "filtered html" even though I had specified "format: 3" in the default commands for mailhandler.
Comment #32
benwei commentedHello,
I was trying this out with the latest Drupal CVS and found one issue: I was getting an error from strtotime saying I was supplying an empty date. I traced it back to line 260 mailhandler_3.module which sets some date fields for the node, but not the actual field 'date' which is what's being looked at in node_validate(). Attached is my updated version.
Comment #33
moshe weitzman commentedplease upload a patch per http://drupal.org/diffandpatch
Comment #34
benwei commentedWhat would you like me to patch? My change is against the mailhandler_3.module submitted by markus_, which I do not believe has been committed. Previously markus_ had said that almost every line in the script had been changed and asked you if you really wanted one, to which you replied no.
I'm assuming then that you are requesting a patch against the mailhandler_3.module submitted by markus_, which is attached. Let me know if you'd like something different and I can supply it.
Ben
Comment #35
sanduhrsThis is a patch against current cvs for all this here.
Comment #36
bohtho commentedCould you post the entire module instead of the patch ? There's so many patches and modules posted above..
Comment #37
sanduhrsAs stated above, it is a patch against current cvs, get current mailhandler here: http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/ma... and apply the patch.
If you have problems patching, there's alot of infos here: http://drupal.org/node/22568
vg
Comment #38
karens commentedI got 23 out of 23 hunks failed when applying the patch. Can you go ahead and post the patched module just to move things along?
Thanks!
Comment #39
moshe weitzman commentedpatch works for me. why are there so many lines in the diff that seemingly have not changed? makes a review a bit difficult.
Comment #40
moshe weitzman commentedwhat i meant to say is that the patch applied fine
committed to HEAD and 4.7. thanks all.
please report other bugs here. i haven't actually handled mail with this code yet.
Comment #41
(not verified) commented