This showed up after the latest upgrade, it seems to happen when the select list is being populated.

Maybe because my custom image styles are set to scale width and have a blank height?

When the page is re-edited it goes away and adding a new image or editing the page does not show the error again.

I thought it might be the dev version of node columns but removed that and switched to panels and it did not help.

Any thoughts?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tommann’s picture

I did some more testing and it is any time a colorbox image is allowed to be inserted on the content type. This error is returned for each image style set:

Notice: Undefined index: width in template_preprocess_colorbox_insert_image() (line 158 of /home/ /public_html/ /sites/all/modules/colorbox/colorbox.theme.inc).
Notice: Undefined index: height in template_preprocess_colorbox_insert_image() (line 159 of /home/ /public_html/ /sites/all/modules/colorbox/colorbox.theme.inc).

tommann’s picture

I rolled back to the 7.x-2.4 version of Colorbox and the errors are gone

frjo’s picture

Committed a fix to 7.x-2.x branch that makes sure width and height are set. Please try it out and report back here.

tommann’s picture

Perfect! That works with no error message. Thank you.

frjo’s picture

Assigned: Unassigned » frjo
Status: Active » Fixed

Will be part of a future 7.x-2.6 release.

Roland-D50’s picture

CB 7.x-2.x-dev in combination with Insert does not work together with CKEditor for WYSIWYG Module.

By using Full-HTML texformat nothing happens, when I klick the insert button. I have to switch to Filtered-HTML and klick insert and then the images will be insertet in CKEditor. Then I can switch to Full-HTML to redesign the text and the alignment of the images.

On an other installation I use CKEditor - WYSIWYG HTML editor with CB and Insert. There the CB 7.x-2.x-dev works perfectly.

Both installations worked fine with CB 7.24 and show now the aforementioned bug with 7.25.

For help, I would be grateful.

Update: Now I can specify the problem: If the image-button of the CKEditor´s toolbar is activated in the WYSIWYG-profile, then the insert-button doesn´t work. Only colorbox styles are affected.

Roland-D50’s picture

Status: Fixed » Needs work
FileSize
79.76 KB
frjo’s picture

So the insert button works with all the non Colorbox options?

And when you select a Colorbox option the button does nothing?

Roland-D50’s picture

Yes exactly, even "link to file (with icon)" and all the other image-styles (e.g. "medium") are working as they should.

But if I want to use a colorbox-style (e.g. "colorbox medium") the insert-button doesn't work. I can klick on it and it will change the color of the button and the cursor in the CKEditor field will stop blinking, but no image would be inserted.

This happens, if the image-button of the CKEditor´s toolbar is activated in the WYSIWYG-profile (see #7). If this button is disabled, the insert-botton also works with colorbox-styles.

frjo’s picture

Title: Undefined index error when load insert select » Conflict withColorbox insert integration and image-button on CKEditor
Version: 7.x-2.5 » 7.x-2.x-dev
Assigned: frjo » Unassigned
Issue tags: +ckeditor

Thanks for tracking it down!

For me this is not a hight priority (I never use WYSIWYG editors myself). I will try to get around to take a look but lets hope we get some nice patch submitted to fix this.

frjo’s picture

Title: Conflict withColorbox insert integration and image-button on CKEditor » Conflict with Colorbox insert integration and image-button on CKEditor
davidneedham’s picture

I can confirm that this is broken in 7.x-2.5 and 7.x-2.x-dev, but seems to work just fine on 7.x-2.4.

Leeteq’s picture

For reference; @davidneedham's comment (#13) in the Libraries 2.2 version queue:
#1855918: Load integration files after library files have been loaded

nicxvan’s picture

Roland-d50 I found the opposite, insert doesn't work if I don't have the image button enabled. If I enable it insert works as expected.

Roland-D50’s picture

Please note: I wrote: CB 7.x-2.x-dev in combination with Insert does not work together with "CKEditor for WYSIWYG" module. You can find this module there: https://drupal.org/project/wysiwyg_ckeditor. This version of ckeditor should be the built in editor of drupal 8.

It does not affect the "CKEditor - WYSIWYG HTML editor" module (https://drupal.org/project/ckeditor)!

What kind of ckeditor-module did you use when testing it?

In my case also the newest version of colorbox-dev (7.x-2.5+8-dev) doesn´t work with CKEditor for WYSIWYG and Insert, when the image button ist enabled - unfortunately.

davidneedham’s picture

I'm also using CKEditor for WYSIWYG (wysiwyg_ckeditor).

deanflory’s picture

I too am getting these when attempting to upload a test image to a test article. These errors were from using the default upload on an image field.

Notice: Undefined index: width in template_preprocess_colorbox_insert_image() (line 158 of /.../sites/all/modules/colorbox/colorbox.theme.inc).
Notice: Undefined index: height in template_preprocess_colorbox_insert_image() (line 159 of /.../sites/all/modules/colorbox/colorbox.theme.inc

(errors repeat 12 times each for just 1 image upload, a mess)

I am not using WYSIWYG, but I do have the ckeditor module enabled and set-up. In CKEditor I have most of the toolbar buttons enabled, but in this test I had not changed the text format dropdown to one that enables ckeditor.

uno’s picture

Have the same issue, Colorbox 7.x-2.5 (1.4.33), Drupal core 7.26 on php 5.4.25.

Have CKE as a Wysiwyg profile, but this happens while using colorbox insert on full html.

The image is uploaded to the files directory, but not visible in the field, also all other fields are emptied upon save - text, taxonomy ... all of them.

Location: http://example.com/file/ajax/field_imgtxt/und/form-d0ZqcAi9AapSxMZJFl7D3...
Message: Notice: Undefined index: width in template_preprocess_colorbox_insert_image() (line 158 of /home/example/public_html/sites/all/modules/colorbox/colorbox.theme.inc).

In my case, image has to be manually removed from the directory and renamed in order to be uploaded without being a copy of a previous one. All other fields have to be repopulated manually.

This does not happen always, but only from time to time, so I cannot reproduce.

arx-e’s picture

I was on Colorbox 7.x-2.5 and CKEditor (standalone module not via WYSIWYG) and I met this issue.
Upgraded to 7.x-2.5+8-dev and I can confirm: the problem is gone - no error messages and the system works as expected.

dev16’s picture

I accidentally found that problem is gone after update of the CKEditor library to 4.3.4.40 version (from 4.1.*). It solved issue even for Colorbox 7.x-2.5. It can be the solution for some developers, I did only basic testing.

claudiuv’s picture

I am confirming the error is there with ckeditor 4.4

javier-franco’s picture

I'll try updating all the modules and core, and it fixed:
- Drupal 7.28
- Colorbox 7.x-2.5
- Insert 7.x-1.3
- Libraries 7.x-2.2
- CKEditor 7.x-1.14 and Library 4.4.1
The problem is gone.

davidneedham’s picture

FWIW, I continued to have these problems with the latest version of colorbox + wysiwyg_ckeditor. I created a separate issue for that, since it seems like a unique issue: #2532472: Conflict with ckeditor.js (wysiwyg_ckeditor).

Neslee Canil Pinto’s picture

Status: Needs work » Closed (won't fix)