I'm keen to integrate this into the Answers module. However, am running into a problem.
I receive this error ...
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM subscriptions s WHERE (module = 'node') AND (field = 'field_srt_parent') ' at line 1: SELECT FROM {subscriptions} s WHERE (module = :db_condition_placeholder_0) AND (field = :db_condition_placeholder_1) AND (value = :db_condition_placeholder_2) ; Array ( [:db_condition_placeholder_0] => node [:db_condition_placeholder_1] => field_srt_parent [:db_condition_placeholder_2] => 1 ) in subscriptions_get() (line 677 of D:\xampp\htdocs\drupal_7\sites\all\modules\subscriptions\subscriptions.module).
... when I create a child node which refers to a parent for which I set a "node" subscription.
I've attached a simple module which I used to test Subscriptions Reference. It defines a parent node type and a child node type. When I create a parent, then subscribe to it, then try to create a child, I get the above error.
In case it helps, I've attached the simple module I've used.
| Comment | File | Size | Author |
|---|---|---|---|
| srt.zip | 3.12 KB | chipcleary |
Comments
Comment #1
bulat commentedComment #2
bulat commentedCan you please check if patch from #1853644: subscriptions_get generates pdo exception solves it.
Comment #3
bulat commentedfeel free to reopen if still having problems.
Comment #4
chipcleary commentedYes, this fixed it. Thanks!
Comment #5
bulat commentedIn terms of using this module for Answers I would strongly recommend looking at Message module. It provides a better architecture and API. We started by writing subscriptions_reference, and than had to switch to Message in our project. If you are interested I can contribute some code samples from our project in corresponding Answers issue.
Comment #6
hussainweb@bulat, I am already using subscriptions in my project and I am not sure if I want to switch entirely to message stack of modules. Does message work seamlessly with subscribe?
Comment #7
bulat commented@hussainweb, recommendation in #5 was for answers module, where notifications are build from scratch. If you already have subscriptions than this module is great.
Comment #8
hussainwebI should have mentioned that I was also looking to integrate with the answers module. I already have subscriptions working and live with other regular content and that is why I was looking to reuse.
Anyway, it seems I have my answer. I will continue building on this module. I have posted some issues and patches for them too.