Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've posted issue in UserPoints module which causes this crash :
#786378: Last DEV release incompatible with UserPointsContrib module
But maybe fix should be implement in UserPointsContrib.
Comment | File | Size | Author |
---|---|---|---|
#1 | userpoints_contrib.patch | 4.28 KB | Antoine Lafontaine |
Comments
Comment #1
Antoine Lafontaine CreditAttribution: Antoine Lafontaine commentedI've create a patch for:
userpoints_download
userpoints_flag
userpoints_modr8
userpoints_pageviews
This basically changes how $params are passed to userpoints_userpointsapi and would allow to go forward with the patch that would allow $params to be passed by reference. http://drupal.org/node/441678#comment-2907194
In the four modules listed above this is how $params is passed:
This should be as follow:
Put patch inside userpoint_contrib folder and apply using:
I've tested successfully with userpoints-6.x-1.x-dev and usepoints_contrib-6.x-1.x-dev.
Comment #2
kbahey CreditAttribution: kbahey commentedI appreciate the effort, but we have to wait until all the modules for D6 have a similar patch. We can't leave some out. There are also modules that live in their own projects too.
Perhaps it is better to postpone this until the D7 upgrade is about to be done.
See #637584: Drupal 7 port
Comment #3
Antoine Lafontaine CreditAttribution: Antoine Lafontaine commentedAlright, I understand.
I also have a patch ready for referral module (referral_userpoints)...
Do you think this would be a worthwhile effort to try to submit patches for other modules that live in contrib.
If the list you compiled on the userpoints_contrib page is complete, I would not mind going over those modules and submit patches. It is a fairly easy fix actually.
If you think this isn't worthwhile, would you consider a patch that would return params so that at least we could retrieve the transaction ID (txn_id) from a succesful call to userpoints_userpointsapi. (could also be only txn_id and not the whole params id in my own use case, but that might be too limited...)
Thanks for your time.
Comment #4
kbahey CreditAttribution: kbahey commentedThe definitive list of modules in the userponits_contrib is what is in CVS with the DRUPAL-6--1 tag. If you checkout using that tag, then you got them all.
It would be great if you patch them all, but we need testing too, which will take time.
As for other projects, some of them I maintain, and others have a different maintainer. If you get an inventory and then do an estimate for the number of modules, we can see if they are just a few, or too many for this change to be feasible on D6 (i.e. pushed to D7).
For the txn_id, this is separate, so please open a new issue so others can discuss it and weigh in on how best to do this.
Comment #5
Antoine Lafontaine CreditAttribution: Antoine Lafontaine commentedI believe my patch above covers all modules in the userpoints_contrib "bundle". (only the four listed modules needed to be patched) And of course, it would need testing.
I will try to compile a list of contrib module outside of userpoints_contrib and list it here.
The txn_id issue would be solved by this patch http://drupal.org/node/441678#comment-2907194 that was rolled back because it broke contrib modules... So going forward with my proposed patch would be the first step to make http://drupal.org/node/441678#comment-2907194 possible.
Since the patch I propose here is almost just a code cleanup/reformating, which doesn't involve any change in functionality, you could go forward with a commit pending enough review. Then I'll try to build the list of contrib module outside of userpoints_contrib and make a new issue to coordinate the progress of committed clean-up patches. If this all goes well, this would allow for http://drupal.org/node/441678#comment-2907194 to be committed without breaking anything in contrib.
I know this is a long shot, but if you do support at least going forward with the cleanup in userpoints_contrib, then it would be worthwhile for me to try to push forward with similar updates to other modules relying on userpoints.
Again, thank you for considering this.
Comment #6
BerdirI've recently added a change to userpoints 7.x that makes accessing the resulting transaction object in way that is backwards compatible. Basically, on a successful transaction, the txn array is returned as part of the array that currently only contains the TRUE/FALSE. So you can easily get it from there.
This will not require this patch and the userpoints_flag part has already been improved as part of another issue.
So I think this issue isn't necessary anymore.