6

Resolved

Media Library - AlternateText is null in frontend

description

Using clean instaled latest 1.x
When i add image in Media Library, press Edit button and input AlternateText - all is good - Alt showing in Admin view and saved ok.
But in Frontend my Image AltText showing null. Checked with ShapeTracing: MediaPart/AlternateText = null

comments

Timbioz wrote Jul 27, 2013 at 12:05 PM

Correction

In the admin view of the Image Edit AlternateText do not saved!!
But if i input Caption field and then press Save, text from the Capton duplicates in Alt field and saved ok

Timbioz wrote Jul 27, 2013 at 12:09 PM

But in the frontend whatever AltText is null .....

psenechal wrote Aug 18, 2013 at 11:06 PM

Confirmed in 1.7 for me too.

Problem appears to be in Views\EditorTemplates\Parts.Media.Edit.cshtml

Changed
<fieldset>
    @Html.LabelFor(m => m.Caption, T("Alternate Text"))
    @Html.TextBoxFor(m => m.Caption, new { @class = "large text"})
    <span class="hint">@T("The alternate text is used when the media can't be rendered in a browser.")</span>
</fieldset>
to
<fieldset>
    @Html.LabelFor(m => m.AlternateText, T("Alternate Text"))
    @Html.TextBoxFor(m => m.AlternateText, new { @class = "large text"})
    <span class="hint">@T("The alternate text is used when the media can't be rendered in a browser.")</span>
</fieldset>
which resolved the problem.

agriffard wrote Aug 30, 2013 at 10:10 AM

Fixed in changeset 3fbf4042a390bac5d35da7f9b5af45de023a6e3b