Closed (fixed)
Project:
Stripe Registration
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 May 2018 at 21:38 UTC
Updated:
12 Oct 2020 at 20:34 UTC
Jump to comment: Most recent
Comments
Comment #2
liliplanet commentedSolved:
Created API test keys
Created plans on Stripe
Synchronise, all good :)
On Stripe list, see Stripe plan ID and Name
On ‘edit’ to assign a role, get:
InvalidArgumentException: Field user_id is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 587 of /home/my/public_html/core/lib/Drupal/Core/Entity/ContentEntityBase.php).Update: this happens if you have the language module enabled. All good :)
Comment #3
ptmkenny commentedMarking as closed because the issue was apparently fixed according to #2.
Comment #4
joe huggansI don't think this can be classed as fixed, it is happening for me using version 3.x of this module and without the language module installed.
Comment #5
ptmkenny commentedComment #6
grasmash commentedOk interesting. I'm not able to reproduce this. Could you provide a backtrace?
Comment #7
grasmash commentedDo you have the entity reference module enabled?
Comment #8
joe huggansSure, will get a backtrace soon. There is no entity reference module installed, apart from the Entity Reference Revisions module, not sure if that is relevant.
Comment #9
grasmash commentedJust to add some quick thoughts. I'd guess this is coming from the StripePlanEntity class, which uses methods like getOwner() to load the user_id property of a plan. Drupal core provides the user_id, so it's not actually defined in StripePlanEntity.
I can't seem to find where user_id actually gets defined, but I do see that various Drupal core tests assert it's presence.
Comment #10
joe huggansI'll be testing this again this weekend so will provide more information then, so if we can leave this open in the meantime. Thanks
Comment #11
joe huggansGot it round to doing this earlier than expected, here is the stack trace
InvalidArgumentException: Field user_id is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 587 of core/lib/Drupal/Core/Entity/ContentEntityBase.php).
Drupal\Core\Entity\ContentEntityBase->get('user_id') (Line: 112)
Drupal\stripe_registration\Entity\StripePlanEntity->getOwnerId() (Line: 69)
Drupal\commerce_license\FormAlter\GrantedEntityFormAlter->formAlter(Array, Object, 'stripe_plan_edit_form') (Line: 88)
commerce_license_form_alter(Array, Object, 'stripe_plan_edit_form') (Line: 539)
Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'stripe_plan_edit_form') (Line: 838)
Drupal\Core\Form\FormBuilder->prepareForm('stripe_plan_edit_form', Array, Object) (Line: 279)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 91)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comment #13
grasmash commentedI've pushed a change up that should resolve this. Please test and verify.
Comment #14
joe huggansSeems good to me!
Comment #15
grasmash commented