Inserting assets (pdf) into body field creates a link to the thumbnail image, but not a link to download the file. #341

Closed
hadiS opened this Issue Aug 30, 2012 · 10 comments

Comments

Projects
None yet
3 participants
@hadiS

hadiS commented Aug 30, 2012

Is this intended behaviour?

@saturnflyer

This comment has been minimized.

Show comment Hide comment
@saturnflyer

saturnflyer Aug 30, 2012

Owner

Would you please elaborate?
What code is there in the body?

Owner

saturnflyer commented Aug 30, 2012

Would you please elaborate?
What code is there in the body?

@hadiS

This comment has been minimized.

Show comment Hide comment
@hadiS

hadiS Aug 30, 2012

There is no code at all in the body. Just content text. I tried this locally and also on the radiant demo site http://radiantcms.org/demo/ .
I uploaded a pdf in the assets section and on a page I insert the asset/pdf in the body content.
This is what gets inserted
<r:asset:link size="normal" id="2" />

Now when I view the site I see a link, but the link redirects me to an image instead to the actual pdf.
I hope I was clear enough.

hadiS commented Aug 30, 2012

There is no code at all in the body. Just content text. I tried this locally and also on the radiant demo site http://radiantcms.org/demo/ .
I uploaded a pdf in the assets section and on a page I insert the asset/pdf in the body content.
This is what gets inserted
<r:asset:link size="normal" id="2" />

Now when I view the site I see a link, but the link redirects me to an image instead to the actual pdf.
I hope I was clear enough.

@SamWhited

This comment has been minimized.

Show comment Hide comment
@SamWhited

SamWhited Aug 30, 2012

Member

On Thu, Aug 30, 2012 at 8:55 AM, Hadi S. notifications@github.com wrote:

There is no code at all in the body. Just content text.

What Radius tag did you use to include the PDF?
This: `<r:asset:link name="name">text/r:asset:link' should render a
link to the actual PDF.

EDIT: Oops, didn't see that you already posted the radius tag above.

Member

SamWhited commented Aug 30, 2012

On Thu, Aug 30, 2012 at 8:55 AM, Hadi S. notifications@github.com wrote:

There is no code at all in the body. Just content text.

What Radius tag did you use to include the PDF?
This: `<r:asset:link name="name">text/r:asset:link' should render a
link to the actual PDF.

EDIT: Oops, didn't see that you already posted the radius tag above.

@hadiS

This comment has been minimized.

Show comment Hide comment
@hadiS

hadiS Aug 31, 2012

I used the 'insert' link which Radiant 1.0 provides. It automatically adds <r:asset:link size="normal" id="x" /> , but it is not a link to the pdf itself, but the link to an image.

hadiS commented Aug 31, 2012

I used the 'insert' link which Radiant 1.0 provides. It automatically adds <r:asset:link size="normal" id="x" /> , but it is not a link to the pdf itself, but the link to an image.

@saturnflyer

This comment has been minimized.

Show comment Hide comment
@saturnflyer

saturnflyer Aug 31, 2012

Owner

Can you tell us what the HTML output of that is? And have you verified that what has been uploaded is a PDF and not an image?
Have you checked the generated files to see if there is some error with them?
Have you tried changing it to size="original" or just removing the size to see how that affects it?

With more information, we'll be able to determine if this is an actual bug.

Owner

saturnflyer commented Aug 31, 2012

Can you tell us what the HTML output of that is? And have you verified that what has been uploaded is a PDF and not an image?
Have you checked the generated files to see if there is some error with them?
Have you tried changing it to size="original" or just removing the size to see how that affects it?

With more information, we'll be able to determine if this is an actual bug.

@SamWhited

This comment has been minimized.

Show comment Hide comment
@SamWhited

SamWhited Aug 31, 2012

Member

On Fri, Aug 31, 2012 at 10:16 AM, Jim Gay notifications@github.com wrote:

Have you tried changing it to size="original" or just removing the size to
see how that affects it?

I've run into this before (but assumed it was expected behavior).
Setting the size to anything other than original will render a png.
Removing the size attribute (or setting it to `original') will cause
it to link to the PDF instead of one of the thumbnails Radiant
generates.

Member

SamWhited commented Aug 31, 2012

On Fri, Aug 31, 2012 at 10:16 AM, Jim Gay notifications@github.com wrote:

Have you tried changing it to size="original" or just removing the size to
see how that affects it?

I've run into this before (but assumed it was expected behavior).
Setting the size to anything other than original will render a png.
Removing the size attribute (or setting it to `original') will cause
it to link to the PDF instead of one of the thumbnails Radiant
generates.

@hadiS

This comment has been minimized.

Show comment Hide comment
@hadiS

hadiS Aug 31, 2012

@saturnflyer @SamWhited Yes, removing the size attribute helped. Should radiant not detect the file type automatically and hence add the radius tag without/with the size attribute respectively when using 'insert' ?

Thanks for the help.

hadiS commented Aug 31, 2012

@saturnflyer @SamWhited Yes, removing the size attribute helped. Should radiant not detect the file type automatically and hence add the radius tag without/with the size attribute respectively when using 'insert' ?

Thanks for the help.

@saturnflyer

This comment has been minimized.

Show comment Hide comment
@saturnflyer

saturnflyer Aug 31, 2012

Owner

That's probably a good idea. I haven't worked on this code, but let's leave the issue open to address that.

Owner

saturnflyer commented Aug 31, 2012

That's probably a good idea. I haven't worked on this code, but let's leave the issue open to address that.

@SamWhited

This comment has been minimized.

Show comment Hide comment
@SamWhited

SamWhited Sep 1, 2012

Member

This is more of an issue with the Clipped extension; would it be better to open a bug report there?

EDIT: Something simple like this might solve the problem – https://github.com/SamWhited/radiant-clipped-extension/commit/496585601d515c567b347f20253de554222a2260

Member

SamWhited commented Sep 1, 2012

This is more of an issue with the Clipped extension; would it be better to open a bug report there?

EDIT: Something simple like this might solve the problem – https://github.com/SamWhited/radiant-clipped-extension/commit/496585601d515c567b347f20253de554222a2260

@SamWhited SamWhited referenced this issue in radiant/radiant-clipped-extension Sep 3, 2013

Open

Ignore default size for non-image when inserting asset #67

@SamWhited

This comment has been minimized.

Show comment Hide comment
@SamWhited

SamWhited Sep 3, 2013

Member

Closing this issue since it's 'solved' as far as Radiant is concerned. I made a new issue against the Clipped extension here: radiant/radiant-clipped-extension#67

Member

SamWhited commented Sep 3, 2013

Closing this issue since it's 'solved' as far as Radiant is concerned. I made a new issue against the Clipped extension here: radiant/radiant-clipped-extension#67

@SamWhited SamWhited closed this Sep 3, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment