Needs review
Project:
UC Recurring Payments and Subscriptions
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jun 2013 at 07:54 UTC
Updated:
9 Oct 2015 at 20:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tinker commentedAttached patch
Comment #2
tinker commentedBackport patch for 6.x-2.x
Comment #3
stewart.adam commentedRebase 7.x patch against latest git.
Comment #4
stewart.adam commentedRemoved the check against count($fees) - this resulted in hidden links or a 403 if no fees were present instead of displaying the "no current subscriptions" message.
Comment #5
tinker commented@stewart.adam,
Thx for rebasing the patch. The count($fees) is there on purpose to hide the link to the user's subscription page. I don't see any value in displaying the link or the page when it provides no functionality when there are no recurring fees. What reason do you see to have it visible?
Comment #6
stewart.adam commentedPrimarily, it's because links to that page (e.g. from emails or instructional documentation) fail if the user has no subscriptions. It looks like a broken link and gives a bad user experience instead of just informing the user they have no active subscriptions.
I haven't tested that this is the case, but something to consider as well would be if the user has an active subscription that expires/gets deleted so the page that was previously visible to them is no longer so.
For this reason, I would advocate that the link stays enabled at all times and users can use hook_menu_alter() if it needs to be disabled when empty.
Comment #7
tinker commented@stewart.adam, Good point about the email links. You should remove the '$fees = uc_recurring_get_user_fees($account->uid);' from uc_recurring_user_fees_access($account) as it become unnecessary database loads.
Comment #8
glynster commented@tinker & @stewart.adam, this patch works well to resolve the issue of the admin recurring tab on an order to render all charges (rather than nadda). The work around before was to go to the original order, then click on recurring tab and you would see all the charges. However if the order state is in pending mode (as more attempts to bill occur) the same work around needs to occur. Not sure why. That said, being able to see all recurring fees from the last order issued is golden. Other than the above user case "fixes the fee operation links".
Comment #9
tinker commented@glynster, This patch fixes the fee operation/option links on admin/store/orders/(order_id)/recurring and user/(user_id)/recurring-fees. It does not directly try to fix anything about the list of associated orders on the admin page. If it has fixed anything there it is a by product of improving access control.
The fee operation links are display in the far right column and can be 'Edit', 'Charge', 'Update', 'Cancel' etc. This patch fixes access callbacks that control which links are displayed. The patch fixes the arguments passed to the access callback, makes the access callback co-operate properly with payment handler modules, and sets up sensible defaults for the operation links such as "don't display a 'cancel' link if the subscription is already canceled".
Comment #10
tinker commented@glynster, I think I found the issue you are talking about. If a renewal order fails payment and is 'pending' it will not show up on the admin recurring orders tab because the reference to the renewal order is only created if payment is successful. I have created a new report with patch for this issue #2579479: New order reference not saved in uc_recurring_orders when payment fails. That patch is not retro active so will only have effect on new renewal orders.
Comment #11
glynster commented@tinker, OK great, if this is the case then +1 to have this committed as it definitely fixes those issues. Tested on Admin & authenticated users.
Comment #12
glynster commented@tinker, been running this patch for 5 days is working perfectly +1 to have this committed to the latest dev.
Comment #13
glynster commentedI think it is time to RTBC.