Are there any plans as of yet (or are either of the dev snapshots) for this module to be compatible with CiviCRM 2.0?

(with installation of 2.0, I get Fatal error: Call to undefined function crm_get_groups() in /modules/civicrm_subscribe/civicrm_subscribe.module on line 138)

Comments

alimc29’s picture

Just to follow up, it looks like this function is replaced by civicrm_groups_get( $params )
(http://wiki.civicrm.org/confluence/display/CRMDOC/Group+APIs)

xurizaemon’s picture

Version: 5.x-1.x-dev » 5.x-1.2
Component: Code » Miscellaneous
Assigned: douggreen » Unassigned
Category: feature » support
Priority: Critical » Normal
Status: Needs review » Active

http://forum.civicrm.org/index.php/topic,3008.0.html is a CiviCRM forum thread on migrating API code from 1.x to 2.x

that0n3guy’s picture

I may have created a duplicate issue http://drupal.org/node/234066. Different error though.

It seems there are many of us that want/need this for civicrm 2.x. Maybe we should all pitch in some cash to get'r done.

chrismott’s picture

Assigned: Unassigned » chrismott
Status: Active » Needs review
StatusFileSize
new10.48 KB

I have jumped in here and ported the 5.x-1.2 code to use the new v2 api in CiviCRM 2.0. It needs thorough testing and a review before using for a production site. Please give it a test run.

A couple changes of note:

  • Method of creating hash values has changed since v2 API doesn't expose the CiviCRM contact hash value (http://forum.civicrm.org/index.php/topic,2814.0.html). I didn't fully understand rationale behind previous design so there may be a problem I haven't considered yet.
  • Handling of matching contact search on subscription submit, for the cases of multiple matches, partial matches and no matches was updated along with the new api. Correct behaviour should be verified for your different use cases.

The Drupal repository should probably be branched so that users can download either Drupal 5.0 + CiviCRM 1.9 or Drupal 5.0 + CiviCRM 2.0 versions. The Drupal 6.0 branch won't have this need since it will only be Drupal 6.0 + CiviCRM 2.1+

xurizaemon’s picture

subscribe

owen barton’s picture

Version: 5.x-1.2 » 5.x-1.x-dev
Component: Miscellaneous » Code
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new11.02 KB

This patch works for me. I have updated the patch to the latest DRUPAL-5 code.

owen barton’s picture

Actually that patch does include a couple of additional fixes I found.

douggreen’s picture

Grugnog, you have CVS commit rights to this project. If you've tested the patch, can you please commit it too? Thanks!

mlecha’s picture

subscribe

Working Drupal 5.7 with CiviCRM 2.0.

douggreen’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for getting this started. But there's still debugging code in the patch. And I want a patch that works with both 1.0 and 2.0 versions. I've got a client that needs this done, so hopefully a new patch will be posted (and committed) today.

douggreen’s picture

Assigned: chrismott » douggreen
Status: Needs work » Needs review
StatusFileSize
new2.94 KB

Please try the attached patch, and the new civicrm20compat module.

I believe that CiviCRM 2.0 has double-opt-in features. Is this module needed anymore?

sonicthoughts’s picture

this is still more powerful than the civi-subscriber logic. for example, it allows an email upon subscription. i also think the do_not_email logic is better.

webdev2’s picture

Priority: Normal » Critical

Sort of a newbie question, I see the "+" and "-" in the patch. Am I supposed to add the "+" lines in the referenced function and delete the "-" lines?

webdev2’s picture

I added patch and still am getting a blank display to this page

ANy ideas??

fm’s picture

Is this also CiviCRM 2.1 compatible?

owen barton’s picture

Category: support » feature
StatusFileSize
new13.39 KB

Updated patch to full CiviCRM 2.x compatibility (not using thecivicrm20compat module). If we still want to support CiviCRM 1.x, perhaps this could be committed as a 2.x branch?

webdev2’s picture

Does this last path (Oct 16, #16) require the previous patches be applied or can I go straight from the downloaded module to this patch?

Also, is there an easier way to apply a patch than to go through each line by line manually and making the change?

Thanks!

owen barton’s picture

Version: 5.x-1.2 » 5.x-1.x-dev
Component: Miscellaneous » Code
Assigned: Unassigned » douggreen
Category: support » feature
Priority: Normal » Critical
Status: Active » Needs review

@webdev2,
This is a complete patch, that should apply cleanly on the 5.x-1.x-dev branch code.

To apply the patch please see http://drupal.org/patch/apply - no need to apply manually!

webdev2’s picture

Holy crap, will that save some time. Many thanks!

sonicthoughts’s picture

sorry - can you clarify is this is working with drupal 6 + civicrm 2.1? Is it necessary still?

Also - can the subscription email confirmation be customized per group?

thanks,

S.

bcobin’s picture

Drupal 5.12
CiviCRM 2.0.7

I just get a white screen upon submit, using the patch from #16. The user does get added to the group, but hitting 'return' on the white page url just exposes the form in a page and we're back where we started. (My signup form is in a block.)

This should be such a simple (and really, really important) function; why is everything in CiviCRM such an absolute nightmare?

Thanks for trying anyway... :(

douggreen’s picture

Status: Needs review » Fixed

I applied the patch, tested, created a new branch and new tag. The DRUPAL-5--2 branch now supports CCRM 2.0! Thanks!

fm’s picture

Just CiviCRM 2.0, or CiviCRM 2.x (including the current version, CiviCRM 2.1; and the soon to be released v2.2)?

xurizaemon’s picture

@fm: As CiviCRM v2.1+ is only compatible with D6 for now, you'd need the 6.x-dev version, and this patch seems to be against the 5.x code.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.