If you have a Spotlight which uses an image, where the file entity of that image has a value for the title field, it'll overwrite whatever you put in the slide title on the Spotlight widget.

The image title on the file entity isn't written with the intent of ever appearing on a spotlight, so I think we just need to undo this magic in the spotlight widget somehow.

Comments

dsnopek created an issue. See original summary.

dsnopek’s picture

Status: Active » Needs review
StatusFileSize
new2.48 KB

While working on a patch, I realized this also affects 'alt', the 'title' and 'alt' displayed on the widget edit form. Looking at how to affect the widget edit form, I did end up coming up with a way to fix this that's a little clever: during hook_field_load() we can stash the original values for later!

This fix replaces an earlier fix we had for image_field_load() messing up the title. And, I made sure not to change the values expected by the theme function, so that it'll continue to work with themes that customized the spotlight display (like Radix, or custom themes).

dsnopek’s picture

StatusFileSize
new2.92 KB
new626 bytes

In some real world testing, there were some sites where saving the Panels display in the IPE on a Panelizer page would cause the field values on a spotlight widget to get overwritten by the file entity values. Strangely, this only appears to happen on some sites? I'm not sure how that could be, but this change fixes it on the problem sites.

cboyden’s picture

Status: Needs review » Reviewed & tested by the community

We've been using the latest patch for a month and it's been working for us.

  • dsnopek committed 6d209d4 on 7.x-1.x
    Update Panopoly Widgets for Issue #2995003 by dsnopek, cboyden: File...
dsnopek’s picture

Status: Reviewed & tested by the community » Fixed

Committed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.