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.
If multiple-plan mode is enabled in the settings, active plans have a Change plan link on the Subscription page, /user/USER_ID/subscription.
Clicking on the link yields:
PHP message: PHP Fatal error: Call to a member function getEntityType() on a non-object in /path/to/drupal/modules/contrib/recurly/src/Access/RecurlyAccessUser.php on line 17
Comment | File | Size | Author |
---|---|---|---|
#12 | cannot_change-2760927-12.patch | 7.1 KB | walangitan |
| |||
#10 | interdiff-2760927-9-10.txt | 797 bytes | markdorison |
#10 | cannot_change_plans_in-2760927-10.patch | 7.84 KB | markdorison |
| |||
#9 | cannot_change_plans_in-2760927-9.patch | 7.82 KB | walangitan |
| |||
#9 | interdiff-8-9.txt | 1.74 KB | walangitan |
Comments
Comment #2
colanLooks like this is only an issue in multiple-plan mode so I'm updating the title. I started doing some work on this, but I'm stopping now.
With the patch, the error goes away, but we're now getting a 403. The problem is that the Change plan link in multiple plan mode has the wrong target. It should be the same target as Change plan in single-plan mode.
Comment #3
markdorisonPatch needs re-roll. Is this issue still occurring?
Comment #4
colanThe patch fixed one problem, but not a second one that popped up.
I no longer need this to be fixed (at least not now) so won't be working on it for the time being.
Comment #5
markdorisonRe-rolled patch in #2.
Comment #6
markdorisonThere seem to be a few things going on here and as I began to pull the thread, my patch grew, before I ended up pulling it back. One structural change that I did end up with is that I removed the functionality that rendered change/cancel as tabs when in single subscription configuration and as links in multi-subscription configuration. Now they are always rendered as links along with the subscription listing itself.
This is a work in progress. It also contains the following fixes that are being handled by other issues, but are needed here to not block us:
Remaining steps:
Comment #7
markdorisonRe-rolled patch now that the following patches have been committed:
No other changes from #6.
Comment #8
markdorisonAssuming the patch works as expected, the remaining tasks would be to verify that there is no orphaned code that could now be removed with these changes. I am specifically thinking about the access class and it's service that may no longer be needed.
Comment #9
walangitan CreditAttribution: walangitan at Chromatic for TheaterMania.com, Inc. commented@markdorison - Including one of the access changes from #2 that @colan included that seemed to slip through the cracks in the re-roll. Also removed the access class completely -- in testing it appears that it's not utilized any longer though another review/reviewer would be prudent.
Comment #10
markdorisonFixed two small PHPCS issues.
Comment #11
markdorisonPatch needs re-roll.
Comment #12
walangitan CreditAttribution: walangitan at Chromatic for TheaterMania.com, Inc. commentedRe-rolled #10. Didn't include the interdiff since the one line in RecurlyAccessUser.php was already been committed in #2749513: Show available plans to anonymous users.
Comment #14
markdorison