Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't upload or edit Payment Form #207

Closed
jomotion11 opened this issue Jul 29, 2021 · 4 comments
Closed

Can't upload or edit Payment Form #207

jomotion11 opened this issue Jul 29, 2021 · 4 comments
Assignees

Comments

@jomotion11
Copy link

Having trouble with payment form. It won't let me create new or edit forms. I get the error "Payment Form not found" or "Key "0" does not exist as the array is empty", which is odd because a form does exist.

Additional info

  • Craft CMS 3.6.7:
  • PHP version 7.3:
  • Plugin version 3.3.5:
@andrelopez
Copy link
Member

Hi @jomotion11 could you please recreate the issue and send back to us a zip file of the following folder? storage/logs

Please send the file to [email protected]

@shifuma
Copy link

shifuma commented Feb 19, 2023

I'm also getting this. Works fine locally, but on my staging site I'm getting Key "0" does not exist as the array is empty. when I create a new form. Going back to All Forms shows it was actually created, but trying to edit gives the same error.

2023-02-19 12:39:00 [web.ERROR] [Twig\Error\RuntimeError] Twig\Error\RuntimeError: Key "0" does not exist as the array is empty. in /webroot/daed86b3116754d8/vendor/enupal/stripe/src/templates/forms/_edit.twig:19
Stack trace:
#0 /webroot/daed86b3116754d8/vendor/craftcms/cms/src/helpers/Template.php(110): twig_get_attribute()
#1 /webroot/daed86b3116754d8/storage/runtime/compiled_templates/2e/2ef02dcc63810e7095b6f0a708680488.php(55): craft\helpers\Template::attribute()
#2 /webroot/daed86b3116754d8/vendor/twig/twig/src/Template.php(394): __TwigTemplate_a2c2292e99b934f72101921f0e3e9422->doDisplay()
#3 /webroot/daed86b3116754d8/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling()
#4 /webroot/daed86b3116754d8/vendor/twig/twig/src/Template.php(379): Twig\Template->display()
#5 /webroot/daed86b3116754d8/vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render()
#6 /webroot/daed86b3116754d8/vendor/twig/twig/src/Environment.php(277): Twig\TemplateWrapper->render()
#7 /webroot/daed86b3116754d8/vendor/craftcms/cms/src/web/View.php(451): Twig\Environment->render()
#8 /webroot/daed86b3116754d8/vendor/craftcms/cms/src/web/View.php(504): craft\web\View->renderTemplate()
#9 /webroot/daed86b3116754d8/vendor/craftcms/cms/src/web/TemplateResponseFormatter.php(56): craft\web\View->renderPageTemplate()
#10 /webroot/daed86b3116754d8/vendor/yiisoft/yii2/web/Response.php(1098): craft\web\TemplateResponseFormatter->format()
#11 /webroot/daed86b3116754d8/vendor/craftcms/cms/src/web/Response.php(286): yii\web\Response->prepare()
#12 /webroot/daed86b3116754d8/vendor/yiisoft/yii2/web/Response.php(339): craft\web\Response->prepare()
#13 /webroot/daed86b3116754d8/vendor/yiisoft/yii2/base/Application.php(390): yii\web\Response->send()
#14 /webroot/daed86b3116754d8/release/deployment_107_3d0f0e51/web/index.php(12): yii\base\Application->run()
#15 {main} {"memory":4250776,"exception":"[object] (Twig\\Error\\RuntimeError(code: 0): Key \"0\" does not exist as the array is empty. at /webroot/daed86b3116754d8/vendor/enupal/stripe/src/templates/forms/_edit.twig:19)"} 

Not sure if it's related, but from Settings > Subscription Plans > Refresh Plans I get No plans were found in stripe. Check your Stripe Keys. I'm not sure if I need to do this at all, but my Stripe keys are definitely set correctly.

Craft 4.3.10
Stripe Payments 5.1.0

@shifuma
Copy link

shifuma commented Feb 19, 2023

Very odd by after setting the staging environment to production (and thus disabling allowAdminChanges I no longer get the error.

@andrelopez
Copy link
Member

Possible related to #356 moving discussion to that ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants