Hi,

I am having an issue with getting multiple links when using the External Link module, and I'm hoping someone can help. This is an issue that was happening on a larger site for a client, and I was able to replicate the issue by taking the following steps.

1) I created a fresh Drupal 7.53 site and installed the following modules:
External Links 7.x-1.18
Media 7.x-2.0-rc5
File Entity 7.x-2.0-beta3
Wysiwig 7.x-2.3

2) I also added ckeditor library 4.5.11.

When I add an image to the body of a piece of content, right click on the image, and use image properties to add an external link, when I go back to view my page, multiple external links are created that all go to the same external URL.

Thanks

CommentFileSizeAuthor
#4 Screen Shot 2017-04-06 at 10.53.07 PM.png311.89 KBvj

Comments

granger created an issue. See original summary.

chrisgross’s picture

I am having this problem, too. An external link gets created around the image with no icon, which is desired, but then a separate external link, with an icon and no text, gets generated above the image.

chrisgross’s picture

Actually, this looks like a problem with the media module. If I disable extlink, media still creates an empty link above the linked image, so it seems that extlink is doing its job properly.

vj’s picture

StatusFileSize
new311.89 KB

@chrisgross,

I have faced similar issue when i was trying to add link to image from ckeditor.
Here is the solution that worked for me

  1. Go to admin/config/media/browser
  2. Change the "How should file entities be rendered within a text field?"

Hope this helps.

chrisgross’s picture

@Vj, yes the legacy rendering does solve this for basic use cases. However, if you are displaying additional fields on the file entity, a similar problem occurs even when legacy rendering is used. The solution I've found that covers both scenarios is to also enable "Ensure that embedded Media tags are not contained in paragraphs" on your text formats.

elachlan’s picture

Status: Active » Closed (outdated)

Closing due to the issue being in the media module.