Closed (duplicate)
Project:
Role Expire
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jul 2011 at 02:20 UTC
Updated:
10 Aug 2011 at 08:17 UTC
Jump to comment: Most recent file
Comments
Comment #1
prossel commentedGot the same problem. Also on 7.4.
Module turns out to be unusable so far.
I also have the following notices when saving a user:
Comment #2
stewsnoozeI agree. See this URL for the "release notes"
http://drupal.org/node/1209456
All I did was push to git to start the ball rolling. Also hoping that others might create a sandbox project branch or github clone to help get it ready for 7.
Comment #3
prossel commentedI managed to make user edit form and user view work for D7.
Here is my first Drupal patch. It is based on 7.x-1.x
I hope everything is OK and it will be useful.
Comment #4
stewsnooze@prossel thanks so much for the patch. Unfortunately it fails to apply cleanly. I'll paste the output here
Comment #5
prossel commented(edit: don't know what's wrong, could not upload patch correctly first time by replying to #4)
Comment #6
prossel commented(double post)
Comment #7
prossel commentedSorry for the trailing spaces. I was in a hurry and didn't take the time to verify my patch.
Here is a new version that should work smoothly.
Comment #8
joemaine commentedI applied the patch but receive the following when cron is run:
Fatal error: Cannot use object of type stdClass as array in /........../public_html/sites/all/modules/role_expire/role_expire.module on line 420
aside from the error...the module looks very promising. I wonder if this might be a candidate to join Drupal Commerce (in replacement of Role Reference and Commerce Subscription). Usings Rules is the easiest way to create a role on a purchase...and this module can remove the role.
Comment #9
sharplesa commentedNice. I wish I'd seen this before I spent all day Saturday doing the same thing(!). Your work is more complete than what I did.
1. Do you think you'll be able to address joemaine's cron problem in comment #8 by Monday? If so, I'll wait. Otherwise, I'd be glad to roll a patch with the cron fix in it.
2. The format of the date string as rendered in the role_expire text field needs attention.
3. The code comments need attention. E.g., a few "TODO Please review the conversion..." comments need to be deleted since those D7 queries are correct. Also, a few of the function headers are wrong.
4. Should get rid of "function role_expire_user_XXX".
Comment #10
sharplesa commented5. function role_expire_form_user_admin_role_alter (triggered by admin/people/permissions/roles/edit/#)
a. #title: "Default day length for the role %role" should be something like "Default duration for the role %role".
b. #description: How about changing "Leave blank for no default length. Values should indicate the number of days the role should be active for." to something like "Default number of days this role should be active. Leave blank for no limit."
Comment #11
stewsnoozeThose text changes would be fine by me
Comment #12
joemaine commentedHi sharplesa,
If you're looking for another text change....
Line 389 (after patch from #7)
- $roles[$key] = t("%role role - expires on %timedate", array('%role' => ucfirst($val), '%timedate' => format_date($expiry_roles[$key])));
+ $roles[$key] = t("%role role expiration: %timedate", array('%role' => ucfirst($val), '%timedate' => format_date($expiry_roles[$key])));
...this will solve a tense display issue for expired roles.
The cron error I posted earlier appears at the footer of every page.
Comment #13
BenK commentedGreat to see progress on this... subscribing and can help with testing.
--Ben
Comment #14
joemaine commentedAny work on the cron issue?
Would it be better to use hook_cron_queue_info instead of hook_cron?
Comment #15
sharplesa commentedIt's an easy fix. I've got it running on my machine. Will have the patch for you to try on by the end of the day.
Comment #16
sharplesa commentedPosted a patch at http://drupal.org/node/915334#comment-4779172. Suggest closing this bug as a duplicate of 915334. What do you think?
Comment #17
stewsnoozeAre you going to close this. The patch in 915334 just went in or is there still a problem here for you?
Comment #18
stewsnoozeThis was fixed in #915334: Port drupal 7 - patch