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.
When I go to block configuration for openchurchhomepagefeatured and try to change an image the form returns an error of: The file used in the Current Image field may not be referenced.
I resized my image to to 220x110, same error. Log shows:
http://sitename/admin/structure/block/manage/openchurchhomepagefeatured?_wrapper_format=drupal_ajax&_wrapper_format=drupal_ajax&ajax_form=1&destination=front&element_parents=settings%2Ffeatured%2Fitem1%2Fimage1
Exception: Serialization of 'Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed in serialize() (line 14 of /var/www/sitename/core/lib/Drupal/Component/Serialization/PhpSerialize.php).
The file is appearing in sites/default/files/oc_homepage but does not appear to be resized before it gets there based on file sizes. It puts a new version there every save of the block form.
Site is running drupal 8.1.0, I recall seeing issues with serialization on webforms during pre-release, might be related.
Comments
Comment #2
JonM CreditAttribution: JonM commentedReplicated on a test site running drupal 8.0.6 as well
Comment #3
JonM CreditAttribution: JonM commentedI did a clean install with the openchurch profile, but I commented out actually writing of the pre-populated fields in openchurch_homepage.install
So it came up blank, but I was able to add images and save without issue. Another problem though, if you use a relative url like /blog, when returning to the homepage all that is displayed is: The website encountered an unexpected error. Please try again later. Using a full url works fine. Not expected drupal behavior though.
Comment #4
JonM CreditAttribution: JonM commentedWorkaround:
Edit profiles/openchurch/modules/openchurch_homepage/openchurch_homepage.info.yml
remove openchurch_homepage (line 12 in rc4)
drush pmu openchurch_homepage (if you don't have drush do it from the web interface)
drush en openchurch_homepage
Go to Block layout
Go down to Content, click Place Block
Find OpenChurch Homepage Featured and add it
Uncheck Display title
Upload your 3 images, configure urls if you want them linked.
Save
Move OpenChurch Homepage Featured back to the bottom
Now you can edit the images and urls on the block whenever you feel like it.