Using CKEditor 3.6.6.1.7696 when I upload and insert a document through the media browser all I get is the document icon. In the source it doesn't even reference the link to the file.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Rob C’s picture

Isn't this related to the display mode you select? What happens if you select preview? (if you can)

Toby Wild’s picture

I have inherited a website where this issue is also occurring.

Various document types (doc, docx, txt, etc...).

Images work fine though.

Anyone have any ideas?

jerrylow’s picture

Toby it turns out my issue was that some of the core media JS files were overwritten in a custom module. Upon updating to 2.x the js files became outdated.

Devin Carlson’s picture

Category: Bug report » Support request
Status: Active » Fixed

This is fixed per #3

Status: Fixed » Closed (fixed)

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

JuliaKoelsch’s picture

Status: Closed (fixed) » Active

I have this problem too, and I don't have any custom modules that would override the media js files. In fact, I spun up a test site and only installed the following:

ckeditor 7.x-1.x-dev
ctools 7.x-1.4
file_entity 7.x-2.x-dev
media 7.x-2.x-dev
views 7.x-3.7

When I insert a PDF via the "media' button in a wysiwyg window, only the PDF icon is added to the wysiwyg window. This happens no matter which display type I use. Images work without issue.

JuliaKoelsch’s picture

Update: I uninstalled the dev versions of media and file entity, and then installed the alpha versions of each module. This did not help.

Then I uninstalled the CKEditor module and installed the dev WYSIWYG module, and that fixed the issue.

So, there appears to be something about the CKEditor integration. Perhaps I didn't configure it correctly?

sheldonkreger’s picture

Spry_Julia:

Can you insert a document, turn off rich text, and post the media tag here, please?

Also, please note any differences you see when you save the node as opposed to what is posted in the WYSIWYG before you click save. This helps isolate bugs in input filters, which may not be configured correctly.

JuliaKoelsch’s picture

When I turn off rich text, there is no media tag. Only this:

<p>
	<img alt="" class="attr__format__default file-icon img__fid__31 img__view_mode__default media-image" src="/modules/file/icons/application-pdf.png" title="application/pdf" />
</p>

When I save the node, and then look at what's in the wysiwyg, there is no change, either as what is displayed as rich text, or as the html source.

sheldonkreger’s picture

Spry_Julia:

Good info. It looks like the tags are not being generated at all, which is definitely going to cause a problem.

Have you enabled media_wysiwyg module? What about media_wysiwyg_view_mode module? These are now submodules of Media in 7.x-2.x-dev.

JuliaKoelsch’s picture

Sorry for the delay. I was originally confused because I didn't see a media_wysiwyg module. But I found that it's not in the alpha version of the Media module, only the dev version. So I upgraded Media (and FIle Entity), turned on and configured the media_wysiwyg and media_wysiwyg_view_mode modules. However, same result occurs.

I found this thread, and this comment specifically: https://www.drupal.org/node/1504696#comment-8311375 Makes it seem like there are lots of issues with CKEditor and Media.

The WYSIWYG module (using CKEditor library) works great, so I'm just going with that for now. I'll keep looking at my test site to see if I can find what's causing this issue.

sheldonkreger’s picture

I'd not be surprised if this was a bug with Wysiwyg module, Ckeditor, and Media.

steinmb’s picture

Status: Active » Fixed

Think we can close this, not sure what benefit we should have to keep this open? Any testing like this prob. should be done against latest dev. on all three modules. Latest alpha is getting a bit long in the tooth.

JuliaKoelsch’s picture

FWIW, I was testing with the latest versions of dev of all modules. I mentioned the alpha version because I started with that version, ran into issues, and moved to the dev version.

I've run into this issue on a few sites now, where I've had to update the Media module because we need functionality in the more recent version. In every case, I remove CKEditor and use just WYSIWYG to work around the issue.

But if I'm the only one running into this issue, I must not be configuring one of the three modules correctly. I just don't know what I'm doing wrong.

Status: Fixed » Closed (fixed)

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

supradhan’s picture

Same issue here. Is there any working patch? Is using wysiwyg is the only option for now?

zafir’s picture

I am facing same issue, when i upload pdf file it just show pdf icon and link to pdf is removed or not showing.

zafir’s picture

Status: Closed (fixed) » Active
FileSize
30.43 KB
AndyD328’s picture

Same issue here

bneil’s picture

Version: 7.x-2.0-alpha3 » 7.x-2.x-dev

I tested on our environment and do not have this issue using File entity 2.x dev, Media 2.x dev, Ckeditor library 3.6.6.1 and WYSIWYG module 7.x-2.2.

steinmb’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

Strictfx’s picture

Status: Closed (fixed) » Active

I don't think, that issue had to be closed (fixed). The problem always exists with the CKEditor module. For people who need to work with the CKEditor module, this is not a solution in my opinion. Is there someone who find a solution for this problem?

Thank for any advice

steinmb’s picture

@Strictfx Have you tested the latest versions mention in #20? If not, please do.

Strictfx’s picture

Status: Active » Fixed

Hi steinmb!

Thanks for your help. I try 7.x-2.0-beta1 and it works for this problem but cause others like https://www.drupal.org/node/1974774 for example but the initial one is solved.

;)

Status: Fixed » Closed (fixed)

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

commonpike’s picture

.. would however still be good to know what caused the issue. upgrading is not always an option, especially with the wysiwyg stuff..

kadiiski’s picture

I hope there will be solution any time soon. :D
I've been reading about this problem for 7 hours now.. No solvation.