verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
93 stars 68 forks source link

Strange error message #1882

Closed DarioDiGiacomo closed 1 month ago

DarioDiGiacomo commented 1 month ago

Describe the bug

If installed formie in Craft CMS v5. After I create a new form their comes a error message without any explanation.

image

I cant do anything inside the form itself, but every other page works fine I guess.

image

Steps to reproduce

1. + New form image

2. Create the form image image (It doesn't matter which stencil I use)

image

Form settings

All the settings are default

Craft CMS version

Craft CMS 5.1.2

Plugin version

3.0.0-beta.10

Multi-site?

No

Additional context

No response

engram-design commented 1 month ago

Something looks to be wrong with the JS and CSS as things don't seem to be rendering properly at all.

Can you check your browser console in Web Developer Tools (for Chrome)? There should be some sort of error with the JS. I would also try clearing your Craft caches in Utilities > Clear Caches

DarioDiGiacomo commented 1 month ago

I only get a error about my favicon

image

I've also tried to install it on a other project, both with the code but with no succes :(

image

engram-design commented 1 month ago

I meant opening your developer tools when editing a Formie form, not the front-end of the site. Are there any error there when you try to edit or create a form in the Craft control panel?

DarioDiGiacomo commented 1 month ago

No i also don't get any erros of css or js here

I also can't make any new fields image

image

engram-design commented 1 month ago

I can tell the JS isn't loading correctly because that second screenshot for the new form isn't styled correctly. Might have something to do with Windows, so will spin up a site just in case.

DarioDiGiacomo commented 1 month ago

Okay, I can't wait for an answer. It's a bit strange it happened. no one in my class has the same issue.

I tried to install it on another project just with the try button. and then i got this error

image Maybe it was a important to know..

engram-design commented 1 month ago

Can you have a look at the logs in /storage/logs/formie.log?

DarioDiGiacomo commented 1 month ago

2024-05-14 02:32:38 [ERROR] Couldn’t save form - [["Handle cannot be blank."],{"handle":["Handle cannot be blank."]}]. 2024-05-14 02:32:38 [INFO] Request context: $_GET = [ 'p' => 'admin/formie/forms/new' ]

$_POST = [ 'action' => 'formie/forms/save' 'redirect' => 'c28fab55f8c0db525f201ee2b4649b7dceda83d508c1f643d367479e4cfed944formie/forms/edit/{id}' 'CRAFT_CSRF_TOKEN' => '••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••' 'title' => 'blank form ' 'applyStencilId' => '' 'handle' => '' ] 2024-05-14 02:32:50 [ERROR] Couldn’t save form - [["Handle cannot be blank."],{"handle":["Handle cannot be blank."]}]. 2024-05-14 02:32:50 [INFO] Request context: $_GET = [ 'p' => 'admin/formie/forms/new' ]

$_POST = [ 'action' => 'formie/forms/save' 'redirect' => 'c28fab55f8c0db525f201ee2b4649b7dceda83d508c1f643d367479e4cfed944formie/forms/edit/{id}' 'CRAFT_CSRF_TOKEN' => '••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••' 'title' => 'blank form' 'applyStencilId' => '' 'handle' => '' ] 2024-05-14 05:29:48 [ERROR] Couldn’t save form - [["handle \"test\" has already been taken."],{"handle":["handle \"test\" has already been taken."]}]. 2024-05-14 05:29:48 [INFO] Request context: $_GET = [ 'p' => 'admin/formie/forms/new' ]

$_POST = [ 'action' => 'formie/forms/save' 'redirect' => 'c28fab55f8c0db525f201ee2b4649b7dceda83d508c1f643d367479e4cfed944formie/forms/edit/{id}' 'CRAFT_CSRF_TOKEN' => '••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••' 'title' => 'test' 'applyStencilId' => '1' 'handle' => 'test' ] 2024-05-14 05:29:54 [ERROR] Couldn’t save form - [["handle \"test\" has already been taken."],{"handle":["handle \"test\" has already been taken."]}]. 2024-05-14 05:29:54 [INFO] Request context: $_GET = [ 'p' => 'admin/formie/forms/new' ]

$_POST = [ 'action' => 'formie/forms/save' 'redirect' => 'c28fab55f8c0db525f201ee2b4649b7dceda83d508c1f643d367479e4cfed944formie/forms/edit/{id}' 'CRAFT_CSRF_TOKEN' => '••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••' 'title' => 'test' 'applyStencilId' => '1' 'handle' => 'test' ]

The only error in here is about forgetting a handle

engram-design commented 1 month ago

That would make sense as the handle is auto-generated for new forms with JS. If there's an issue loading the JS - which is the issue here - that's going to fail.

Really tricky to figure out what's going on without a look at your environment and install. I'm spun up a Windows machine, and that seems to be okay. Can you let me know what your setup is for development?

DarioDiGiacomo commented 1 month ago

I use wampserver with a virtualhost for craft cms, is that what u mean?

engram-design commented 1 month ago

Yup, just wanted to check in case it made a difference.

DarioDiGiacomo commented 1 month ago

If it's easier to talk another way if that would be faster than on github, that's fine with me.

engram-design commented 1 month ago

If you're on the Craft Discord, let's maybe chat there?

DarioDiGiacomo commented 1 month ago

Alright i just joined the discord, didn't know it existed. Where can i find u? U can find my under @daarieoo

engram-design commented 1 month ago

Managed to get to the bottom of this, and should be resolving in a dependency we use.

DarioDiGiacomo commented 1 month ago

Alright, what do have i have to do know?

engram-design commented 1 month ago

This should be fixed in Craft 4.9.5 and 5.1.5. See https://github.com/craftcms/cms/issues/15043