Closed (fixed)
Project:
Signup
Version:
6.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
3 Mar 2009 at 17:40 UTC
Updated:
4 Jul 2011 at 06:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dwwYup, there are all kinds of bugs in that field. ;) I'm working on it now. Stay tuned for a patch.
Comment #2
tiendoan commented:) Thanks dww. I'll keep watching the issue queue.
Comment #3
dwwTry this on for size. ;) Note: it's currently not displaying a link since your signup form isn't configured as a separate tab. This patch fixes that, but still hides the link if you've configured your signup form not to display at all.
Comment #4
tiendoan commentedwoa that was fast, much faster than reasonable person could have ask for in light of the pro bono nature of the service.
I applied the patches and there was slight hick-up with the last hunk not working. I visually examined the original file, the patch file, and the reject file and still can't figure out why it wouldn't patch. So I went ahead and patched the last hunk manually.
Happy to report everything is working !!! :)
Yip yip hurray for dww. :D
Again, thank you very much dww.
With regards,
Tien Doan
====
below is the content of the reject file:
====
*************** class signup_handler_field_signup_node_l
*** 72,98 ****
}
}
- function check_access($tab, $node) {
- global $user;
- switch ($tab) {
case 'signup':
- return variable_get('signup_form_location', 'node') == 'tab' && user_access('sign up for content');
case 'list':
- return variable_get('signup_display_signup_user_list', 'signup') != 'none' && user_access('view all signups');
- case 'admin':
- case 'add':
- $admin_all = user_access('administer all signups');
- $admin_own = user_access('administer signups for own content') && ($node->uid == $user->uid);
- return ($admin_all || $admin_own);
- case 'broadcast':
- $email_all = user_access('email all signed up users');
- $email_own = user_access('email users signed up for own content') && $user->uid == $node->uid;
- return $email_all || $email_own;
}
}
}
--- 75,123 ----
}
}
+ function check_access($node, $tab) {
+ switch ($tab) {
case 'signup':
+ // Slightly complicated, since _signup_menu_access() is testing if we
+ // want the signup tab, but here we just want to know if the user can
+ // signup at all.
+ return user_access('sign up for content') && _signup_needs_output($node) && variable_get('signup_form_location', 'node') != 'none';
case 'list':
+ // Also can't use _signup_menu_access() since we don't have to assume
+ // a tab for this access check.
+ $view_all = user_access('view all signups');
+ $admin = _signup_menu_access($node, 'admin');
+ return (($view_all || $admin) && _signup_needs_output($node));
+
+ default:
+ // All the other tabs can just use _signup_menu_access() directly.
+ return _signup_menu_access($node, $tab);
+ }
+ }
+ function get_url($node, $tab, &$link_options) {
+ switch ($tab) {
+ case 'signup':
+ if (variable_get('signup_form_location', 'node') == 'node') {
+ $link_options['fragment'] = 'signup';
+ return "node/$node->nid";
+ }
+ break;
+
+ case 'list':
+ $user_list = variable_get('signup_display_signup_user_list', 'signup');
+ if ($user_list == 'signup' || $user_list == 'embed-view') {
+ $link_options['fragment'] = 'signup';
+ return "node/$node->nid";
+ }
+ break;
}
+ // If we didn't already special-case the URL, we know it's just a subtab
+ // on the "signups" tab for the node.
+ return "node/$node->nid/signups/$tab";
}
}
Comment #5
dwwCommitted to HEAD and D6--1. You're welcome! Thanks for testing it.
Cheers,
-Derek
Comment #7
bismuthdrummer commentedFirst of all, I would like to say that this is a spectacular module, and the patch did work.
It might be better to supply an option in the views whether the link should be hidden if the class is closed. Why? Class cancellations. I set up a view for current classes where the user may select a cancellation link which takes them to the signup form, and since they're signed up it's actually a cancellation form. The cancellation link won't appear if the class is closed. I'm working around this by allowing the user to select the signup node in the view, but then they don't return to the view when finished. Small usability issue is all.
I have a deeper issue to resolve, and I'm not certain if this patch was the cause of it (or my application of the patch). I did run into the issue of all the hunks not being applied, but after a few tries I figured out that it somehow missed the destination file for the includes in the views integration. I entered the filename, and it appeared to have patched correctly.
The deeper issue I have is that I built a view of all members of a group and their signups, but the view refuses to display more than 50 entries at a time. I can change the amount displayed per page, and the pager works fine, but the view mysteriously cuts off after it lists 50 entries. Since the argument is the organic group with the user:signup relationship attached, I wanted to know if this patch (or the module) could possibly be causing this issue. So, could the patch have affected the views in such a way as to cut off or terminate the view prematurely?
I haven't tried building the view without the patch as I'm working on a production site and didn't wish to create any serious problems.
Let me know if anything didn't make sense or you need more info.
Comment #8
dwwPlease open new issues if you have new feature requests or support questions. The bug described in this issue is fixed and committed to CVS. It'll be out when I release RC4. Please leave closed issues closed and only reopen them if the actual bug reappears. Thanks.
Comment #9
Anonymous (not verified) commentedHello,
I use the latest version of Signup and I'm not able to display the node signup link in views. The link is only displayed at the bottom of the node.
Do I have to set a required relationship in my view ? Other fields like the edit link will show up in this same view but the signup link won't.
Any help would be really appreciated :)
Thank you
Comment #10
ezra-g commented@bumathan:
The previous comment on this thread was
> Please open new issues if you have new feature requests or support questions. The bug described in this issue is fixed and committed to CVS. It'll be out when I release RC4.
Please file a new issue so that someone can help you troubleshoot this problem.
Comment #11
liquidcms commentedas far as i can tell this is not fixed. i get no link presented for any of the form options.
possibly a clue and bigger issue is that the field options for which form and if view is to be the destination do not get remembered when the field settings are saved.
is this possibly since i am using Views3?
Comment #12
liquidcms commentednvm.. i sorted it out.. my signup time had simply expired.. doahhh!!