Hello,

I don't know if a colorbox related issue but I get this error message after install insert, image_resize_filter and than colorbox during try to add new content.
Fatal error: Call to undefined function imagecache_create_path() in /<PATH>/sites/all/modules/colorbox/colorbox.theme.inc on line 118

Comments

JohnnyX’s picture

I found a issue with a pointer:
http://drupal.org/node/972884

frjo’s picture

Title: Fatal error: Call to undefined function imagecache_create_path() » Update the Insert module integration for D7
Assigned: Unassigned » frjo
Category: bug » task
Status: Active » Postponed

The Insert module is not ready for D7 yet but if you apply a number of patches from the issue queue it can be made to work.

I have just committed some fixes for Insert integration to 7-dev. Please try it out if you feel adventures :-).

Will do more when Insert is ready for D7.

JohnnyX’s picture

I have patched insert and it works so far. Insert with image resize filter an colorbox is really a great combination :)

I've tested dev version today but error still there. Looks good so far but doesn_t work for me. Image upload is ok, but no colorbox/ lighbox effect works because of the posted error.

Didn't changed imagecache_create_path() after added to the D7 core? See link at #1.

frjo’s picture

Dit you get the code from CVS or did you just download the tarball?

Tarballs for dev releases is only rebuilt every 12 hours or something like that.

JohnnyX’s picture

I just downloaded the zip file. I haven't use CVS so far but will take a look.

JohnnyX’s picture

Haven't installed a CVS client and tired after a long day... I'll try it tomorrow.

frjo’s picture

The dev release has now been rebuilt with the latest changes so just go ahed and download it again. You can see on the date how resent the release is.

JohnnyX’s picture

I get no error messages after update but colorbox doesn't show...
The link put me to a new page with the original image but rel="lightbox" (second try: rel="colorbox") found at the source code.

I'll do a clean installation and test it again ;)

JohnnyX’s picture

Mh, strange...

I tested colorbox with D6 (correct version jquery_update is installed) but colorbox doesn't work. A image (uploaded with insert, resized with image resize filter in tinymce/wysiwyg) works fine with lightbox2 but not with colorbox.

Any pointer what I do wrong?! I tried "lightbox" and "colorbox" as rel value in image resize filter...
I think my problem is not dependent on D6 or D7 but rather the user (at the moment I *g*) is the problem?!

Best regards

frjo’s picture

Colorbox is activated by a class value of "colorbox" not a rel value. (Colorbox only use the rel value to decide which images should be grouped into galleries.)

Colorbox has built in integration with the Insert module so there is no need to add anything manually. Just pink one of the Colorbox styles in the insert popup and klick the insert button. Insert styles need to be activated on each image field.

Have never uses the "image resize filter" so that part I can't comment on.

JohnnyX’s picture

Ok, that helps...

I disabled the image resize filter option Link to the original: and lost the link to the original image! Seems insert and colorbox don't set the link?!

However, I activated Link to the original: again and set:
class=colorbox
rel=slideshow

It Works!

Maybe insert and colorbox doesn't work with installed image resize filter, but if third module is configured correct it works! Great combination!

frjo’s picture

You seem do thing a lot more complicated than necessary, or I'm misunderstanding you.

Go to your node types field administration, Administration -> Structure -> Content types -> manage fields.

Click edit on your image field and in the insert settings there you activate the Colorbox styles, and any other styles you want.

After that you just pick one of the Colorbox styles from the insert popup and click the insert button on a node edit/add page.

Click "Save" and you are done. There is no need to add or change things manually.

JohnnyX’s picture

That was my first try but doesn't work for me. I get a new white page with only the original image if I follow the generated link...

Image resize filter works fine for me.

frjo’s picture

You should get something like the HTML code below when inserting using a Colorbox style. It works well when I test it on a local Drupal 7.0 site.

<a href="http://example.com/sites/default/files/styles/large/public/imagefield_kHEA5b.jpg" title="Eros ludus occuro tego venio." class="colorbox colorbox-insert-image" rel="gallery-insert-all"><img src="http://example.com/sites/default/files/styles/thumbnail/public/imagefield_kHEA5b.jpg" alt="Appellatio aptent capto haero huic pala plaga quibus tum." title="Eros ludus occuro tego venio." class="imagecache imagecache-thumbnail" /></a>
hswong3i’s picture

Category: task » bug
Status: Postponed » Needs work

To update that insert-7.x-1.0 is out (http://drupal.org/node/1034606). I just give a try with it and it is functioning with Drupal 7.x core image fields, imagecache and WYSIWYG + TinyMCE. BTW, when combo with colorbox setup in admin/structure/types/manage/article/fields/field_image, the node edit page goes WSOD.

fmms’s picture

imagecache_create_path() is now image_style_url(). I learned that from swentel on IRC.

BenK’s picture

I just tested Colorbox 7.x-1.0-beta2 with Insert 7.x-1.0. Unfortunately, this combination isn't working for me. Insert doesn't seem to be inserting any colorbox related code when it adds an image. So when using the Insert module, images are not display in a modal overlay.

All other Colorbox features are working great...

I see the Insert related settings on the Colorbox config page, but no special setting that would suddenly enable this functionality for the Insert module. So I'm assuming this is just supposed to work out of the box if you have both modules installed.

Any ideas?

Thanks,
Ben

frjo’s picture

BenK, have you activated the Colorbox insert styles on the image field setting page?

Administration » Structure » Content types » [Your content type] » Manage fields » [Your image field]

frjo’s picture

Status: Needs work » Closed (fixed)