Looks like we have two versions of jQuery loading. Hence the "(...).once is not a function" errors in the console. jquery.once is definitely loaded but only for the first version of jQuery.


How do I track down where the second one is coming from... (rhetorical question)?


Having established this is a theme problem, what could be missing that would prevent selected files from uploading with the rest of the comment?


This has me completely stumped.

I have attached a file field (not media, for reasons) to a comment type.

I attach a file to a new comment, and save.

The comment is saved. The file is not. And there are no errors. None.

Nothing in the Drupal log at all.

It's not a permissions error, because no error message and because I tried with a node type and that worked fine. I've tried both private and public, same thing.

Examining the DB shows that there is nothing in the field table, or in the file table.

The files I'm using are test files I use all the time, they aren't too big just standard PDF files. (And the file type is correct - but like I said, there are no error messages anyway.)

We are doing some fancy stuff with themes, but for the file field only standard Drupal formatting is being applied. (I checked thoroughly with Twig debug switched on.)

  • 2
    Did you switch to a standard theme and try it? That’s the only real way to rule the theme out as being the problem – Clive Nov 20 '18 at 13:37
  • Do file uploads work on other entity types? – bleen Nov 20 '18 at 14:24
  • File uploads work with other entity types. And I can add a file to an existing comment in the admin back-end... @Clive – Adaddinsane Nov 20 '18 at 14:57
  • Switching to Bartik, yeah, it works. Theme issue then. It's a theme running a component-based style guide, but the forms should be pure Drupal. Obviously not pure enough. – Adaddinsane Nov 20 '18 at 15:04
  • From the console: form.js keeps reporting "(...).once is not a function". That's not going to help. – Adaddinsane Nov 20 '18 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.