Hey there,

Just wondering if there's any chance we could get some of the D7 patches applied to the module. I've been using the invite D7 module for a couple months now but have to run it with more than half a dozen patches which is getting out of hand and making it quite difficult to push new fixes back upstream. This is especially difficult as each patch I make often requires at least 3 prerequisite patches before it can be applied.

The module is still buggy, but getting there and I'd be happy to volunteer some time to help you guys add some of my patches back into the module. It will definitely make my life easier if that can happen :).

Anyway, let me know if there's anything I can do in this regard and I'll be happy to get it done.

Cheers,
- Scott

Comments

hadsie’s picture

StatusFileSize
new14.88 KB

Here's a patch that fixes the following issues:

* #1060808: db errors on invite admin settings page
* #1060826: Fixes for broken db_query calls
* #1060950: Invite 7.x token fixes
* #1060976: Undefined function db_fetch_object
* #1053460: Fatal error: Call to undefined function token_include()
* #1053598: Undefined variable: op in theme_invite_form()
* #1054392: Warning: unserialize() expects parameter 1 to be string, array given
* #1060980: Drupal 7 port fixall patch
* #1063032: Call to undefined function db_result()
* #1073010: undefined variable: SESSION
* #1091002: Invite tokens declared incorrectly

It /probably/ fixes:

* #1094432: Recoverable fatal error
* #1097350: Notice: Undefined offset: 5 in _menu_translate() (line 760 of /var/www/public/includes/menu.inc).

In addition, it fixes:

* a bug triggered on the pending invite listings page.

function invite_user_overview($page = 'accepted') {
      switch ($page) {
        case 'accepted':
        default:    
-         $account_exists = !is_null($invite->account);
+         $account_exists = !is_null($invite->uid);

          if ($profile_access && $account_exists) {
            $row[] = l($invite->email, 'user/' . $invite->invitee, array('title' => t('View user profile.')));

* A bug preventing sending invites to multiple accounts (this is actually the fix for #1054392: Warning: unserialize() expects parameter 1 to be string, array given as well) "Fix: Notice: Undefined property: stdClass::$data in invite_get_remaining_invites() (line 702 of /home/c3community/c3resilient/sites/all/modules/contrib/invite/invite.module)"

 function invite_get_remaining_invites($account) {
...
    }
  
    // Check user property for remaining invites.   
-   $data = unserialize($account->data);
+   $data = isset($account->data) ? unserialize($account->data) : array();
    if (isset($data['invites'])) {
      $remaining = $data['invites'];
    }
  ...
 function _invite_get_emails($string) {
    $ipv6 = '[0-9a-fA-F]{1,4}(\:[0-9a-fA-F]{1,4}){7}';
    $rx = "/($user@($domain|(\[($ipv4|$ipv6)\])))>?$/";
  
-   $emails = array_unique(explode("[,\n\r]", drupal_strtolower($string)));
+   $emails = array_unique(preg_split("/[,\n\r]/", drupal_strtolower($string)));
+ 
    foreach ($emails as $email) {
      $email = preg_replace('/^.*<(.*)>$/', '${1}', trim($email));
      if ($email) {

This patch took some time to put together, and should apply cleanly to the latest 7.x codebase. I've noticed several of the new tickets coming into this project are related to issues that I've already submitted patches for, so the sooner this can be applied the less unnecessary work everyone will have moving forward.

- Scott

hadsie’s picture

Category: task » bug
Priority: Major » Critical
StatusFileSize
new1.71 KB

Here's another set of fixes for the admin area. To be applied /after/ the patch in #1.

* Error in hook_menu -- $items['admin/config/people/invite/details/%user'] was set as a MENU_LOCAL_TASK but should only be a MENU_CALLBACK.
* drupal_get_form doesn't render the form in D7... needed to add render() to the admin invite listing.
* username's being populated with 'Anonymous' because 'name' is necessary in D7.

smk-ka’s picture

Status: Active » Fixed

Thanks Scott, and sorry for being so unresponsive (get in touch if you want commit access, you shouldn't be thwarted by someone like me). Committed and closed all referenced issues except:
* #1054392: Warning: unserialize() expects parameter 1 to be string, array given (seems NOT be included in the patches in this issue)
* #1091002: Invite tokens declared incorrectly (because of Dave Raid's comment)
* #1054392: Warning: unserialize() expects parameter 1 to be string, array given (have to check)

nevergone’s picture

I would rewrite Invite module (7.x-4.x), please patience. :)
http://drupal.org/node/671818#comment-4301030

jeffwidman’s picture

subscribe

hypertext200’s picture

sub

nevergone’s picture

Currently Views support prepare a support 6.x-2.x version, I would like to publish a new version after a couple of weeks with the bug corrections, then what I will be able to deal with him.
http://drupalcode.org/project/invite.git/shortlog/refs/heads/6.x-invite_...

hypertext200’s picture

Version: 7.x-2.x-dev » master
Status: Fixed » Needs work

Seems everything has gone in to master.

hypertext200’s picture

Version: master » 7.x-2.x-dev

Seems some tasks #1053460: Fatal error: Call to undefined function token_include() like has been committed to master clean it up please.

yugongtian’s picture

+1
Notice: Undefined index: name in _token_token_tree_format_row() (line 108 of /var/www/xxx.com/public_html/sites/all/modules/token/token.pages.inc).
Fatal error: Call to undefined function token_include() in /var/www/xxx.com/public_html/sites/all/modules/invite/invite.tokens.inc on line 110

hypertext200’s picture

Status: Needs work » Needs review
StatusFileSize
new19.13 KB

Fixed some issues and this version should work all basic functionality.

hypertext200’s picture

Category: bug » task
cutmedia’s picture

this patch #11 works in the main but gives an error
Warning: unserialize() expects parameter 1 to be string, array given in invite_get_remaining_invites() (line 712 of /home/test/public_html/modules/invite/invite.module)
This error is resolved for me by changing line 712 in invite.module from:
$data = isset($account->data) ? unserialize($account->data) : array();
to:
$data = isset($account->data);
When clicking the Withdraw link I get this:
Warning: Parameter 1 to invite_cancel() expected to be a reference, value given in drupal_retrieve_form() (line 771 of /home/test/public_html/includes/form.inc).
and in admin>invites>operations this:
Notice: Undefined property: stdClass::$canceled in invite_admin_details() (line 334 of /home/test/public_html/modules/invite/invite.admin.inc).
seems the canceled field isnt being found but cant find the correct reference.

modoq’s picture

subscribing

moonray’s picture

paulgemini’s picture

subscribing

Zarevac’s picture

Subs

cajunmba’s picture

Is 7.x-2.x-dev available for download? Not at http://drupal.org/project/invite.

paulgemini’s picture

click view all releases at the bottom of the page.

monican’s picture

+1

kitmobley’s picture

whenever i hit withdraw from either accepted or pending i get the " You are not authorized to access this page"

I've double checked the settings on the permissions page and i have all 3 boxes(anonymous, authenticated, and administrator) checked for withdraw accepted invitations and still no dice.

any ideas?

nevergone’s picture

7.x-4.x branch started.

medden’s picture

How is the progress with 7.x-4 branch going?
can only see 7.x-2 on the project page, and am confused about which patches to apply in which order.

a link to a working patched version or github / drupal git sandbox would be helpful for many users.

currently the 7.x-2 version gives a white screen of death when invitees try to register.
have tested on two independent servers and get same results on a clean D7 install with only invite contrib module enabled.

I don't want to report a s a bug as this thread makes it sounds like a new version is imminent.

sw3b’s picture

Subsribing... any news on 7.x-4.x or 7.x-2.x ?!?

paul_constantine’s picture

Subscribing ... need a working D7 version of this badly because this version does not work at all.

When getting an invite the invited person gets an "access denied" page. And there was no option to set the "user settings" to registration per invite. Beside this the module produces loads of php errors in combination with tokens (tokens seems buggy as well).

Cheers,
Paul

paul_constantine’s picture

To quote Clara Pella from the famous Wendy's "Where's the beef?" commercial in the early eighties:

I don't think there's anybody back there!

qsurti’s picture

Invite and userpoint modules are both gaining popularity but the updates for both of them are getting slower. Could there be some reason?

glekli’s picture

Status: Needs review » Closed (fixed)

Updates are now being applied. Please file an issue if you find anything. Thanks.