Problem

Can't insert image in CKEditor even if the editor plugin is available and enabled.

The media plugin is the plugin included with the CKEditor module. This plugin is to be removed as outdated :

#2140155: Remove media plugin

Proposed resolution

  • Enable Media WYSIWYG, in order to use the plugin provided by Media

Original report by @lanzs

After updating to 7.x-2.0-alpha3 I can`t add any images in body. I`m using wysiwyg with CKEditor 4.0.1 and when I`m trying to upload image - after page update (after selecting image and clicking "upload/next" button) nothing happans. I only see blank pop-up. Console shows this error: Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://example.com/media/111555/format-form?render=media-popup&fields=undefined
I have no ideas how to fix it, please help me with this.

CommentFileSizeAuthor
#21 CKEditor-support-2138953-21.patch1.78 KBtarekdj

Comments

philipz’s picture

I've just bumped into the same problem. Just wanted to let you know this is not an isolated problem ;) Unfotunately I have no idea yet what is the cause of this problem.

ParisLiakos’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

if it says status 500, then you should check your servers error logs and let us know what the error says

kiwad’s picture

Warning : require_once(.../media/includes/media.filter.inc): failed to open stream: No such file or directory dans menu_execute_active_handler() (line 515 in .../includes/menu.inc).

kiwad’s picture

Status: Postponed (maintainer needs more info) » Active
kiwad’s picture

Status: Active » Fixed
lanzs’s picture

I've got this error:

PHP Fatal error:  Call to undefined function  media_variable_get() in ~sites/all/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.module on line 99
lanzs’s picture

fixed this by manual creating 'media.variables.inc' inside 'includes' folder (http://drupalcontrib.org/api/drupal/contributions!media!includes!media.v...) and embedding this file in 'media.module' (require_once dirname(__FILE__) . '/includes/media.variables.inc';)

philipz’s picture

@lanzs I did the same though I'm pretty sure this couldn't be fixed by clearing caches only. The file was missing causing the error. After adding it back (from previous media release) I remebered I didn't clear caches after updating and then the file could be deleted and it worked without it.

Now in my case I get no error in apache logs. I'm getting a page with
Requested page "/media/13/format-form?render=media-popup&fields=undefined" could not be found.
I'm translating this back to english so it might vary a little :)

micbar’s picture

i experienced the same problem with coeditor module and current media dev. media_wysiwyg.filter.inc could not be included because the media_wysiwyg module has not been enabled.

Status: Fixed » Closed (fixed)

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

nuncium’s picture

After updating to media 7.x-2.x-dev i get this error: "The requested page "/media/178/format-form?render=media-popup&fields=undefined" could not be found. "

Still not able to upload image.

JennyGB’s picture

I don't use wysiwyg but ckeditor 7.x-1.15 (lib CKEditor 3.6.2) ; File entity 7.x-2.0-beta1 ; Media 7.x-2.0-alpha4
Don't have any video module.

I have the issue since File entity and Media upgrade (i upgraded both together).
Then I tried to lower (and even disabled) jQuery update -> same issue.
Tried to upgrade the ckeditor library (from 3.6.2 to latest): same issue.
Tried on an other pc to upgrade to 7.x-2.0-alpha4+4-dev: same issue.

When I try to add an image with media browser, I have 404 error while saving.

In log: Where http://mysite/media/ID/format-form?render=media-popup&fields=undefined
Message media/ID/format-form

Edit: on the test env, I tried to activate media_wysiwyg -> seemed to resolve the issue. Trying on prod (I'll come bach here later)
Edit 2: Yes, enabling media_wysiwyg resolved the issue (with Media 7.x-2.0-alpha4 and 7.x-2.0-alpha4+4-dev) even with no wysiwyg installed (but ckeditor alone)

rwilson0429’s picture

I was having the same problem ("the requested page "/media/77/format-form?render=media-popup&fields=undefined" could not be found.") using the Latest dev release of CKEditor 7.x-1.x-dev and the latest Media 7.x-2.x-dev (2014-Oct-08).

Enabling media_wysiwyg module as suggested by JennyGB in #12 resolved it for me too. Thanks JennyGB.

For added control of the media display, I also enabled Media_WYSIWYG_View_Mode module to allow users to select the view mode (default, teaser, full, etc) of the media being uploaded in the CkEditor.

dankh’s picture

Title: Can`t upload/insert images in wysiwyg after update » Can`t upload/insert images in wysiwyg
Issue summary: View changes
Status: Closed (fixed) » Closed (works as designed)
Related issues: +#2140155: Remove media plugin
dankh’s picture

Issue summary: View changes
dobie_gillis’s picture

The "Activate media_wysiwyg" fix isn't working for me. I've tried uninstalling and re-installing media_wysiwyg.

I'm running into this problem after updating the Media module to 7.x-2.0-alpha4, and I upgraded media_wysiwyg to 7.x-2.0-alpha4, too. I'm using CKEditor as well.

I have the media_wysiwyg module already enabled, and I've cleared the Drupal caches, but I'm still getting the 500 error, on the AJAX request to /media/browser?render=media-popup&plugins=undefined.

I also tried the dev version of Media.

The JavaScript error I'm getting is:

Uncaught TypeError: Cannot read property 'media' of undefined media.popups.js?v=7.x-2.0-alpha4+4-dev:98
parasolx’s picture

@dobie_gillis, what version of CKEditor module you use?

msemenov’s picture

I ve seen this issue, found that combination with Media: YouTube 7.x-2.0-rc4 was causing this problem

himanshupathak3’s picture

enabling media_wysiwyg resolved the issue
This module is is avaiable under media 7.x-2

khumbu’s picture

I can confirm that enabling media_wysiwyg soves the issue...

tarekdj’s picture

Title: Can`t upload/insert images in wysiwyg » Provide support for CKEditor module
Status: Closed (works as designed) » Needs review
StatusFileSize
new1.78 KB

This issue is related the standalone CKEditor module. I attached a patch that fixes this (I'm using ckeditor v3, needs tests on ckeditor v4).

Status: Needs review » Needs work

The last submitted patch, 21: CKEditor-support-2138953-21.patch, failed testing.

tarekdj’s picture

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

Status: Needs work » Needs review

dave reid’s picture

Component: User interface » Media WYSIWYG
Status: Needs review » Needs work

Any ckeditor module support specifically must go into media_ckeditor.

The last submitted patch, 21: CKEditor-support-2138953-21.patch, failed testing.

dave reid’s picture

Project: D7 Media » Media CKEditor
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: Media WYSIWYG » Code
dave reid’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
OnkelTem’s picture

I get this error: "The requested page "/media/31/format-form?render=media-popup&fields=undefined" could not be found. "
Can not upload image.

I didn't get "the proposed solution" regarding "Enable Media WYSIWYG" - what does it mean? I don't use "WYSIWYG", I use CKEditor + Media. Ideas?

devin carlson’s picture

Status: Needs work » Fixed

Make sure that you are using the appropriate version of Media CKEditor for the version of Media that you have installed. Each branch of Media CKEditor only works with the corresponding version of Media.

Status: Fixed » Closed (fixed)

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