Notification not contains the question
zolikonta - October 31, 2009 - 09:34
| Project: | FAQ_Ask |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
The notification not contains the question itself (like before), and the link to the faq node is http://example.com/faq_ask/answer/

#1
This is because the email is being sent using a form submit handler, before node_save has been called, so there's no nid for the email to reference.
Should be using nodeapi 'save' instead.
Writing a patch as right now.
#2
Okay, here's my patch...
It just moves the submit handler into hook_nodeapi 'insert' and 'update'. Yay.
#3
Apologies... missed the node type case... doh!
Fixed.
#4
I am having trouble with this patch:
A carriage return after the username comma would be nice.
The email includes the category it has been posted to but only gives the tid as a numeric not the text of that category.
I'm not sure about including the username of the person asking the question, but that might be fine.
Carriage return before and after the question would be easier to read.
Most importantly, the link "directly to the question" points to the path /faq_ask/answer/xxx and this gives an "Access denied". If the link returned /node/xxx it would work just fine.
Thanks,
Izzy