when I click on edit button there is no images in editable text area, and after saving the content all images that I had uploaded before, get removed. I need to fix it, because of this bug, I can't give users the Edit permission.

Comments

garamani’s picture

Version: 7.x-1.7 » 7.x-1.5
MulleG’s picture

Having the exact same problem. Running Drupal 7.26, WYSIWYG module 7.22 CKEditor 4.3.3 (full version) and OCUpload 7.17.

Morten

xandeadx’s picture

What for "edit button"? Write spet-by-step test case.

MulleG’s picture

The insertion of pictures works as it should. But when you edit the node or comment you have inserted the image in the image disappears.

I have reproduced this issue both on a server installation of Drupal and a clean install on a desktop. When I downgrade to CKEditor 3.6.6.1 the problem disappears (but not for version 4.2.3). Also, it seems to be working correct when using the dedicated CKEditor drupal wrapper module instead of the WYSIWYG module. Unfortunately I can't used the latter because I run another plug-in which doesn't work with the CKEditor module.

Please let me know if I can be of any help. The OCUpload is by far the most user friendly upload module there is.

Morten

garamani’s picture

As Morten said, the problem is not related to "edit button"; It just happens when you want to edit a content.
1.you add and insert images by clicking on OCUpload button with no problem.
2. Now, when you want to edit that content, the images that you've uploaded via OCUpload are gone (they no longer exist in textarea).
3. after saving the content (clicking on save button), the content will be saved without the pictures you had uploaded before.

NOTE:
1. I Use CKEditor module 7.x-1.13 not the WYSIWYG module. So, It doesn't work with dedicated CKEditor module either.
2. when I upgrade the OCUpload module from 7.x-1.5 to 7.x-1.7, The module doesn't work at all!!

  • I click on ocupload button
  • I choose an image and click on open
  • The swfupload blue label appears at the right bottom of page BUT the image doesn't appear in text area!
xandeadx’s picture

2. Now, when you want to edit that content, the images that you've uploaded via OCUpload are gone (they no longer exist in textarea).

OCUpload only upload files and insert template in ckeditor. More he does nothing. The problem is clearly not in the OCUpload.

garamani’s picture

Thank you xandeadx for your quick answer,
So... I should not expect to have images when I'm editing the contents?! or Is it the CkEditor module duty, to keep templates when someone needs to edit contents? Otherwise, who's responsible of keeping images??

xandeadx’s picture

OCUpload insert code in CKEditor.
CKEditor update drupal field input.
Drupal save text in database.

MulleG’s picture

Weird! It seems that when I add the Image button to the editor (the default image insert from CKEditor) alongside with the OCUpload button it works as it should - also when inserting with OCUpload.

garamani: Does this work for you?

Morten

garamani’s picture

@ Morton:
I just realized when I am at edit page, CKEditor strips all html tags, So not only I cant' see any kind of media (images, video, etc) the whole content is messed up.

It's good to know that everything is working for you except ocupload stuffs.
have you tried ckeditor module?

There is a solution in this link which didn't work for me but may solve your problem.

By the way, It seems the problem is related to CKEditor itself which strips the HTML tags. I would share the solution here as soon as find any, and you inform me as well.

garamani’s picture

well, I solved the problem this way:

1. I use the CKEditor module 7.x-1.13.

2. Upgrade CKEditor Plugin( My last version was 4.1.2). Download the latest version from here

3. add this line: config.allowedContent = true; here:
Configuration>Content Authoring>CKEditor>Your CKEditor profile>Advanced Options>Custom JavaScript configuration

4.Flush all Caches

xandeadx’s picture

Priority: Major » Normal
Status: Active » Closed (won't fix)
MulleG’s picture

It seems that both of our problems are caused by the Advanced Content Filter in CKEditor 4.1 and later. In a non-drupal setting I believe that the plugin should allow its own content (by adding allowedContent) but with the use of the CKEditor or WYSIWYG modules I am not sure it is possible (yet).

Using the CKEditor module the config.allowedContent = true; in custom js seems to be the solution. Using the WYSIWYG module I couldn't disable ACF but I found this patch Link which worked like a charm. It seems that they are implementing it in the next release.

Morten

syastrov’s picture

Another way to fix is to add "img[*]" to Extra allowed content underneath Advanced Content Filter.

andreak’s picture

config.allowedContent = true;