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.
I am getting this error and can't figure out where it's coming from:
User error: Unable to load picture mapping block. in picture_field_formatter_picture_view() (line 892 of xxxxx/sites/all/modules/picture/picture.module).
Watchdog is recording the error as:
TYPE php
DATE Monday, October 31, 2016 - 16:29
USER sysadmin
LOCATION http://<my-dev-site>/
REFERRER http://<my-dev-site>/admin/structure/block
MESSAGE User error: Unable to load picture mapping block. in picture_field_formatter_picture_view() (line 892 of /<my-dev-path>/sites/all/modules/picture/picture.module).
SEVERITY error
Any suggestions appreciated on where this error is coming from.
Martin
Comments
Comment #2
newswatch CreditAttribution: newswatch commentedI am getting exactly the same error.
And iage is obviously not displaying either.
Comment #3
BrankoC CreditAttribution: BrankoC as a volunteer commentedWe are getting this message because we seem to have removed a picture mapping in the past, but parts of the system are still looking for it.
Debugging is made harder by the fact that something in devel seems to clear whatever cached reference there is to the mapping, so that the error no longer occurs?!
These errors are seriously clogging up our logs on a fairly high traffic site. Every page load causes several of these error messages to be recorded.
Why is this an error in the first place, why not a warning? And why is it logged? Maybe missing picture mappings should be listed on the Status Report page using hook_requirements().
Comment #4
junaidpvWe faced similar issue recently. It was throwing this error because one of our "File Display" of image file type were configured to use a particular picture mapping which was already removed.
I fixed it by re-saving file display by selecting correct picture mapping.
Depending on site configuration, one or more of image field displays or file field displays of image file entity type would be using already deleted picture mapping. Just reconfiguring those displays will fix this issue.
Comment #5
lesleyfernandes CreditAttribution: lesleyfernandes commentedI am closing all very old tickets that have not received comments for a long time. If someone still faces these issues or thinks they are relevant, please reopen it. Feel free to contribute with more info or a patch.