Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyperlink with Empty Link Text getting generated for General Link Field that has a Media Link with an Empty Link Description #335

Open
milanjt opened this issue Dec 12, 2017 · 0 comments

Comments

@milanjt
Copy link

milanjt commented Dec 12, 2017

I've a General Link field. Using 'Insert media link' I have it pointed to a Media Item under the Media Library.

When the page is rendered in the Experience Editor Mode, Link correctly display the Media Item Name and you can get the usual control above it to modify the Link. However in the preview mode it generates an empty Link Text.

If I use the Sitecore Field renderer for the same field, it correctly shows the Media Item name as the Link text.

Here's the code used in the control -

<br />
<%=Editable(x=> x.ReadMore )%>
<br />
<sc:Link runat="server" Field="ReadMore" />

Here's the HTML output I get in the preview mode for both -

<br>
<a href="http://sc81u3.local/-/media/Files/SomePDF.ashx"></a>
<br>
<a href="http://sc81u3.local/-/media/Files/SomePDF.ashx">SomePDF</a>

If I insert a Link using the "Insert link" option available on a General Link field, this is not a problem.

Question: Is this a bug or am I missing something here?

Glass Mapper Version: V4
Sitecore Version: 8.1 update 3

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant