Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Form Problem DropZone

form

Started by Bartek 8 months ago · 3 replies · 64 views
8 months ago

Hi everyone,

I'm running into an issue when trying to use Form in my project. I'm trying to load the file from md with dropzone.

When I run it in the browser, I get the following error:

TXT
Uncaught SyntaxError: Unexpected token '/'

The site was working fine before the update. I suspect it might be related to changes in how Grav handles assets or JavaScript modules.
Could anyone help me fix this or suggest a workaround?

Thanks in advance!

dropzone.md|690x338

dropzone|690x101

dropzone 2|369x64

8 months ago

@pawlikbartlomiej, For me, the information you've provided is a tad too little... Could you elaborate a bit more on:

  • What are you trying to achieve?
  • Are you talking about a form in frontend of backend (Admin)?
    • Frontend: The Form plugin has its own File field that allows you to download a file into the folder of the page.
    • Backend: There already is a download option in the page editor to download a file.
  • I have no idea what information the screenshot is showing (and please don't use screenshots...)
  • Why are you using nodejs to create a Form page to download a file?
  • Etc...

You might want to read /forum/general/the-art-of-asking-great-questions-t8554 to improve your question.

8 months ago

Based on the name sortable, I assume it's not about the file field, but rather about drag'n'drop DOM manipulation

8 months ago

Yes, exactly — it’s about the field where the user uploads files.
The problem is with Dropzone initialization.

On my local environment, everything works fine, but on production I get this error:

TXT
Uncaught SyntaxError: Unexpected token '/'

This all started happening after updating Grav to the new version; previously, updates didn’t cause any issues with this.

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 54 12 hours ago
Support · by Anna, 3 days ago
2 60 14 hours ago
Support · by Justin Young, 15 hours ago
1 30 15 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 57 5 days ago