Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Error: Call to a member function view() on null in template_preprocess_photoswipe_image_formatter() (row 84 file /modules/photoswipe/photoswipe.theme.inc).
Comment | File | Size | Author |
---|---|---|---|
#3 | photoswipe-caption-unset-2666636-3-D8.patch | 1.09 KB | geisel |
Comments
Comment #2
Nikit CreditAttribution: Nikit commentedComment #3
geisel CreditAttribution: geisel as a volunteer commentedThis issue seems to occur when a new display mode has been added for a content type, but the "Photoswipe Caption" has not yet been set. The default value for this gets set in PhotoswipeFieldFormatter.php to empty string (in defaultSettings()). In photoswipe.theme.inc it ends up trying to resolve $node->EmptyString->view(), which results in badness.
It seems like there may be a more correct way to fix this, but this patch should resolve the issue gracefully and will put a warning in the Drupal Report Log.
Comment #4
Nikit CreditAttribution: Nikit commentedComment #5
Nikit CreditAttribution: Nikit commentedComment #6
NiklanThe patch from #3 is fixed the issue! Thank you.
Comment #7
Alezu CreditAttribution: Alezu commentedPatch works perfectly, thanks a lot!
Comment #8
geisel CreditAttribution: geisel as a volunteer commentedAnything I can do to help resolve the "Needs Review" status, or do we need one of the maintainers to do it?
Comment #9
Anybody@Geisel, could you please reroll the patch? It contains wrong (local!) paths. Before please try the latest dev, perhaps the issue is already solved.
Thanks!
Comment #11
AnybodyPlease retry with latest 8.x-2.x branch. Perhaps it works without the patch. Otherwise please reroll it.
Comment #12
AnybodyThank you geisel, I rerolled the branch and commited on the 8.x-2.x branch. Please test and report.