Score:0

Image field input renders with type text instead of file

om flag

(Drupal newb - please go easy and give references that help me learn how to debug stuff in Drupal myself, thank you!)

I've taken over a Drupal site with 7.80.

There's a type called Event which has a bunch of fields including an Image. There are many existing Events where Image upload presumably worked fine in the past. The images are visible when editing those Events.

Problem: The form for adding a new Event renders the Image control as a text box (i.e. input type='text' with an attach button instead of a file control (i.e. input type='file').

Also notable that if I use e.g. chrome inspector to change the type of the input to file and then try to upload a file it fails with:

"The file in the Image field was unable to be uploaded."

How can I start to debug this? Google didn't turn up any obvious hits that I could find so pointers on how to start debugging much appreciated!

cn flag
Check which widget is being used for that field (in Manage Fields), it might be something custom the previous developers have written
in flag
Regarding: _"Also notable that if I use e.g. chrome inspector to change the type of the input to file and then try to upload a file it fails with: "The file in the Image field was unable to be uploaded."_ That is reassuring, as it would constitute a [Cross Site Request Forgery (CSRF)](https://en.wikipedia.org/wiki/Cross-site_request_forgery).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.