Please update for new Forms API
| Comment | File | Size | Author |
|---|---|---|---|
| #37 | subscriptions.install | 931 bytes | q0rban |
| #36 | subscriptions_1.module | 27.88 KB | q0rban |
| #30 | subscriptions_4.patch | 8.19 KB | q0rban |
| #28 | subscriptions_3.patch | 6.51 KB | wpd |
| #23 | subscriptions_2.patch | 6.16 KB | shouchen |
Comments
Comment #1
shouchen commentedComment #2
shouchen commentedPatch to update to new Forms API. I'm new at this... please review and commit to CVS if patch is good.
-Steve
Comment #3
shouchen commentedFrom what I can determine... this patch might be all that is needed to bring this module up-to-date with the upcoming 4.7 release.
Comment #4
q0rban commentedpatch didn't work for me.. looks like there is a new version of subscription as of Dec 12... did that version include this patch? if not, can someone reroll this patch? if so the status on here is incorrect.... cheers
Comment #5
q0rban commentednevermind.. just patched manually, and it seems to work fine now in 4.7.beta2.... once again, Diff'nPatch isn't cutting it for me...
Comment #6
q0rban commentedUpdated the autosubscribe checkbox in the user hook with the new forms API... can someone check this to make sure I did it right?
There is still a form_checkbox in the nodeapi hook, but I'm not understanding the 'form post' op so I left it as is:
Comment #7
q0rban commentedContinuing the discussion with myself... The module seems to work fine in 4.7 beta2, except for one minor flaw... no e-mails actually get sent out! hehe... not sure what the problem is there... email works for all other aspects of the site, ie new users, and private messages...
Comment #8
q0rban commentedI finally got it working (as well as fixing a few other bugs)... will submit a patch later...
cheers
Comment #9
q0rban commentedhere's the patch:
i hope it works for you!
Comment #10
q0rban commentedIt still has some problems.... :(
So far it seems like it is only sending out the email to the poster, and not anyone who is subscribed to the forum...
Comment #11
q0rban commentedfalse alarm.. it works fine so far...
:)
sorry about the confusion, and the spam if you are subscribed to this...
Comment #12
DaveNotik commentedHelp. Trying to patch on Windows using cygwin and the patch command, and it says the .patch contains garbage:
patch unexpectedly ends in middle of line
patch: **** Only garbage was found in the patch input.
I bet it has to do with line breaks or some other Linux/Windows difference. Please advise.
Can someone send me a revised .patch? I'm desperate. :(
Thanks.
Comment #13
q0rban commentedIt probably has to do with me patching on my Mac and line breaks being different... If you're brave, you can just cut and paste the items that need to be patched... Or you could try opening the .patch file in a Text Editor and pressing enter at the end of each line... If that doesn't work, I will try and re-roll the patch on my PC later today... that's right.. the only person who likes Macs and PCs!!! :)
I've never patched using cvs, so if someone else can re-roll who has experience doing that, it would be much appreciated..
Comment #14
shouchen commentedTry this patch file instead....
Comment #15
shouchen commentedFor the above patch... don't worry if Hunk #1 fails. It is just a comment.
Comment #16
shouchen commentedI've finally set up a test site using this patch, and I don't see any mail sent when the subscribed-to pages are modified.
Mail is sent properly when I request a new password, so I know that mail, itself, is working. (So far, I've done all testing with the first user account.)
Any ideas?
-Steve
Comment #17
shouchen commentedAuto-subscribe does not seem to work. If I select the checkbox during node creation, the node is not subscribed to after it is submitted.
Using the latest patch on this thread.
Comment #18
q0rban commentedI am receiving emails when new threads are created in subscribed forums... For example, If user-1 creates a new thread that user-2 is subscribed to, then user-2 is sent an email (user-1 is not sent any e-mails to threads he has created. Not sure if this is normal behavior or not).
I am not receiving emails when replies/comments are made to subscribed threads/nodes. I was assuming this was due to the following code:
However, I'm not sure if this is only when you are subscribed to a comment. Someone more familiar with the innerworkings of the subscription module will have to help/inform on this...
cheers..
Comment #19
dan_aka_jack commentedHi there,
Just wondering if there has been any updates with this module over the last week? I'm quite eager to use it! If no updates have been made then I'll role up my sleeves and have a go at the code myself when I have time.
Thanks,
Jack
Comment #20
q0rban commentedThe last patch i've worked on is above.. Try it out and see what works for you... Would definitely love some help on this one!
Comment #21
shouchen commentedI can confirm what q0rban said...
category subscriptions appear to be working. e-mail is sent when new nodes are created in subscribed-to categories
thread subscriptions do not seem to work. e-mail is not sent when a comment is added to a subscribed-to node
-Steve
Comment #22
q0rban commentedI think I figured out the problem.. The order of the variables in
hook_comment()call were backwards:Should be:
Comment #23
shouchen commentedThat fixed the thread subscription problem, q0rban. Here's a new patch!
Comment #24
dziemecki commentedI'll see if I can get Tom to test this in 4.7.
Comment #25
wpd commentedI applied the patch from post #23 to CVS HEAD.
I get notifications from my category subscriptions and I can subscribe to a thread and get comment notifications.
Still does not work:
When creating content, I can not subscribe to the thread. The checkbox on the edit/create page is not being saved properly.
I get the following error from admin/subscriptions
I am running PHP 5.
Comment #26
wpd commentedDespite the problems I listed, the module is now usable. I recommend commiting this patch and opening new issues for the other problems.
Comment #27
q0rban commentedI think I found the problem (from php.net):
[QOUTE]
The behavior of array_merge() was modified in
PHP 5. Unlike PHP 4, array_merge() now only
accepts parameters of type array. However, you
can use typecasting to merge other types. See the example
below for details.
Example 3. array_merge() PHP 5 example
[END QUOTE]
So, on line 533, modify the
$subrows = array_merge($subrowsn, etc...to this:See if that fixes the problem for you. Thanks for testing it out...
cheers...
Comment #28
wpd commentedAs per q0rban suggestion...
Changed one line ~529 in patched file to get rid of array error message in PHP 5. Rerolled patch. (It worked).
Comment #29
shouchen commentedTried to apply the latest patch against the version in HEAD... it no longer applies cleanly:
Hunk #5 FAILED at 335.
Hunk #7 FAILED at 526.
Hunk #8 succeeded at 558 (offset 3 lines).
Let's please get this patch in HEAD soon. Thanks!
-Steve
Comment #30
q0rban commentedOkay, I fixed the problem with the subscriptions checkbox when adding a node. This module should now be fully functional with 4.7!
I also changed how the body of the e-mail is formed. Line breaks weren't breaking for me in gmail, so I added them manually in the
t()function.This is a patch against HEAD (v 1.33).. I hope it works...
Looks like people were getting the same issues with PHP5
array_merge()in the 4.6 version, except that the fix in 1.33 is sloppier than ours IMO, so I left it the way we had it. :)Cheers
Comment #31
shouchen commentedYes - It applies cleanly against HEAD. Thanks.
Comment #32
wpd commentedWorks for me also. Is there a reason this patch is not getting commited?
(Lack of time, better things to do are reasonable answers.) I was just wondering if there is something wrong with the patch that could be fixed?
Comment #33
TDobes commentedReason for it not getting committed yet: Too busy trying to fix MAJOR bugs in the Drupal core.
Examples:
* 4.7 breaks all links within content of existing sites due to base href tag being removed (bug 13148)
* 4.7 breaks proper operation of the theme system (bug 52508)
* 4.7, for some reason, won't allow me to use the "\" character ANYWHERE... not content, not titles, not user-entered PHP code -- nowhere. I haven't found the cause for this yet to create a patch, but it's a big problem for me.
4.7 is still in beta and still has some major issues.
ahem... anyway: I appreciate greatly the work you all have done on getting this module working with 4.7. I will try to test and commit this patch as soon as I get my 4.7 test site functional again. (probably tomorrow afternoon) In the meantime, I apologize for the delay.
Comment #34
samc commentedJust an FYI in case anyone is still following this thread...
The patch applies cleanly, and works, against version 1.33 of the module.
Against 1.35 however, it applies mostly cleanly (with the exception of hunk #1 - the comment), but it kills the module administration page.
Hope this helps...
Now if I can only figure out how to use this thing!
Comment #35
dziemecki commentedI'm still following.
I've been hoping Tom would get to this and make it not be my problem, but he appears to be out of pocket. I'll see if I can get a cvs dev env gened up over the next few days and take care of this myself. Can somebody post the entire module? It's a pain to merge the patch with all of the other changes.
Comment #36
q0rban commentedWow.. A lot of changes in the cvs version.. I hope I got everything...
Comment #37
q0rban commentedinstall file...
Comment #38
dziemecki commentedHaven't seen the "*.install" syntax before. Would that work with "case 'pgsql':", as well? What invokes it?
Comment #39
q0rban commentedI guess there is a
hook_install()function somewhere in core. Here is the associated handbook page. The nice thing is you can create upgrade paths, as well as having the various cases for each database type...Comment #40
dziemecki commentedI'm genning up a 4.7 env this weekend to test this. Also bumpting priority up to critical, since we're in RC mode, for 4.7.
Comment #41
dziemecki commentedI've posted the forms API changes to cvs. Right now, there seems to be a problem with display\download side of the house, so it may be a little while before you see. it. Look for the version that includes the *.install file.
Comment #42
dziemecki commentedNo complaints for 2 whole days. I'm closing the ticket.