Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is related to:
#339196: Image uploading through popups
I've made a patch to make FileField and ImageField uploads work in a popup. I posted the Popups API part of my patch to that thread. I'm posting here the 'add and reference' node form part of the patch.
This is a simple patch that adds a hidden form field to node forms, when they're output in a popup. This form field's value is now checked by popups, instead of using any custom HTTP headers (which don't work when file uploads are involved).
Comment | File | Size | Author |
---|---|---|---|
#5 | uploadImageError.png | 6.26 KB | phpepe |
#4 | popups_reference_image_uploading.patch | 1.61 KB | Jaza |
#1 | popups_reference_image_uploading.patch | 479 bytes | Jaza |
popups_reference_image_uploading.patch | 484 bytes | Jaza |
Comments
Comment #1
Jaza CreditAttribution: Jaza commentedForm field properties needed '#' at the start... no idea why it worked before, but it doesn't work for me now.
Updated patch attached.
Comment #2
greg.harveyThis looks really promising. Subscribing, will try to find time to test. (In combination with your other patch, naturally.)
Comment #3
thekayra CreditAttribution: thekayra commentedsubscribing
Comment #4
Jaza CreditAttribution: Jaza commentedUpdated patch, for this thread and for:
#339196: Image uploading through popups
See the other thread for details.
Comment #5
phpepe CreditAttribution: phpepe commentedJaza,
I still have errors when uploading the image.
A page is loaded with a textarea containing some JSON code.
A screenshoot is attached.
Regards
Comment #6
kepford CreditAttribution: kepford commentedsubscribing
Comment #7
Breakerandi CreditAttribution: Breakerandi commentedsubscribing
Comment #8
Peter Törnstrand CreditAttribution: Peter Törnstrand commentedsubscribing
Comment #9
vectorfrog CreditAttribution: vectorfrog commentedI have applied the patch, but I'm still getting a "Bad Response form submission" error when I try to upload an image within the popup. Any ideas why this is?
Comment #10
ducdebreme CreditAttribution: ducdebreme commentedsubscribing
Comment #11
pvanerk CreditAttribution: pvanerk commentedHi,
I am still experiencing the "Bad Response form submission" with the module and the Popups API. I use
popups_reference 6.x-2.0-alpha1
popups 6.x-2.0-beta0
I tried the several patches but no luck on this.
Did anyone manage to get this working with the versions above?