Okay, this is not a post. I'm just sharing a patch. I will follow up explaining what is in the patch and why later.
This patch is a WIP of comment_notify for D7. All functionality has been upgraded and tested AFAIK. The test has not been.
Greggles and I talked, and while it is his preference that we not make such an overhaul for maintenance / continuity purposes, it was after I had already done it. While I agree in principle, it was too late, and I think in this case so much is different that trying to keep line-by-line diffs to D6 branch seemed not worth it. I think the code is a lot better for it (and there is a lot more to do). Building an upgrade path though shouldn't be difficult as functionality and architecture has not changed much, just code structure (and of course 80% of the code because D7 is a lot different w/ re to tokens, database, hook_{entity}_*, etc... basically everything in this module).
Anyway, I'll write more about that tomorrow when I get some time, have to sleep now, but didn't want to delay sharing.
Enjoy!
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | comment_notify.test | 7.1 KB | JacobSingh |
| #5 | 628878_comment_notify_d7_5.patch | 54.65 KB | greggles |
| #4 | comment_notify_d7_4.patch | 60.91 KB | pwolanin |
| #2 | comment_notify_d7_3.patch | 63.14 KB | JacobSingh |
| comment_notify_d7.patch | 58.51 KB | JacobSingh |
Comments
Comment #1
JacobSingh commentedSorry, and a disclaimer. While documenting stuff, I made some last minute changes. This is not totally re-tested so treat as alpha code until I get a chance to re-test tomorrow.
-J
Comment #2
JacobSingh commentedOkay, here is an update, w/ tests.
Comment #3
gregglesI'm more and more open to the idea that this branch will be totally separate and I'm thinking it would be be better to apply this so that we can track the commit of other issues into this version because, for example, this whole thing doesn't apply any more :/
Any chance you have some magic way of re-rolling it? Or should I just branch 6.x, and take HEAD back to the date you created this on and commit from there and find individual stuff to merge in manually? I'm fine with doing that, just want to make sure it's not unnecessary.
Comment #4
pwolanin commentedI think this patch will apply cleanly against CVS HEAD if you want to branch and then apply it. Note that there is 1 new file to be added to CVS.
it includes one more minor fix in function comment_notify_user_update() to avoid notices.
Comment #5
gregglesAwesome, thanks pwolanin and Jacob for this great work on the module.
# Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 272 of /var/www/7d/includes/entity.inc).
Comment #6
gregglesComment #7
pwolanin commented@greggles - can you commit now? that would make follow-up patches easier.
Comment #8
gregglesI did some really basic testing but not full testing. At this point the tests are more complete than manual testing I do, so I'd like to rely on them to be the decider of whether or not to commit this.
Comment #9
JacobSingh commentedLet's see if this works...
Comment #10
gregglesI've committed this http://drupal.org/cvs?commit=290756 - now time for final fixups. Thanks, Jacob!
It turns out the missing thing for the tests was to add the file to comment_notify.info file. The tests no longer pass for me, but I can look into that later. I think it's related to my local environment more than anything.
Comment #11
dave reidI think this is missing the comment_notify.lib file (also, why not comment_notify.inc) as I'm getting a bunch of undefined function errors on D7. Plus, it's also included in global context instead of only when necessary.
Comment #12
gregglesdetails details. http://drupal.org/cvs?commit=332192 ;)
Comment #13
gregglesSo, I'm reviewing and fixing up a handful of things today and noticed that comment_notify_variable_registry_set doesn't seem to actually get called anywhere. Is that right? Is there a reason for that?
Comment #14
gregglesOk, I just committed an update: http://drupal.org/cvs?commit=350198
module_load_include('inc', 'comment_notify', 'comment_notify');and only doing so in places where it's necessary.I think this is pretty close to done so I'm marking this "fixed".
Though I'd still love to know why comment_notify_variable_registry_set was added and if there is anything that actually uses it.
Edited to add reference to the array flip issue and change a not to now since now is what I meant.
Comment #15
JacobSingh commentedI think just for completeness (and because I likely cut-and-paste it from another module of mine). By having a corresponding set, you can be a little more certain people will centralize their namespace declaration.
I'm not opposed to removing it, just seems like every _get should have a _set...
Congrats papa Greg!