Download & Extend

Javascript error, breaks links in edit view on nodes

Project:Colorbox
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:frjo
Status:closed (fixed)

Issue Summary

The fieldset links on any node/*/edit page are broken (no links shown) and I get the following js error:

Uncaught TypeError: Cannot read property 'transition' of undefined [url]/sites/all/modules/features/colorbox/js/colorbox_inline.js?p:17

I uninstalled colorbox (using modules/uninstall) and installed it again, but still the same problem.

Comments

#1

Correction: it only breaks the fieldset links on my "node/photos/edit" page, the only page with colorbox activated.

#2

The file colorbox_inline.js is loaded in colorbox_handler_field_colorbox.inc and should only load when on a view with a Colorbox trigger.

Do you have some Views that displays on the node edit pages?

#3

Yes, I believe there are some views on the node edit pages:

Default Node view: admin_content
Title: Content
Path: admin/content/node2
View, edit and delete your site's content.

Default Node view: img_assist_browser
Title: Image assist thumbnail browser
This view is used by Image assist for its thumbnail browser.

Default Node view: nodereference_explorer_default
Path: nodereference_explorer/menu_display_table
Generic nodereference explorer view including three default displays (table, thumbnails and list

I also use a view with colorbox trigger on my "photos" page.

edit: only the view that displays my image nodes on the photos-page use colorbox trigger.

#4

Are you using something like Views attach or Views field to include a View with a Colorbox trigger field in the node itself?

Trying to figure out when this happens so I can come up with a decent solution.

#5

Yes, a view field on my gallery content type. That view has the colorbox trigger. Then in my node-gallery.tpl.php I do

<?php
print $node->field_gallery[0]["view"];
?>

#6

But on the node type "photos", where you experience this bug, you don't have any views stuff attached?

#7

Ok, summary:

- My page "photos" is of Gallery node type.
- It has a View field which includes a view also called Gallery which has a colorbox trigger.
- The view displays nodes of type Image (created by the Image module).

The "photos" page works fine in "view"-mode, no js errors or any other kind of errors. The js error occurs when I click "Edit" on the page. All the hide/close links on the fieldsets for the different settings are gone (see attachement) and I get the js error posted in #1.

AttachmentSize
Screen shot 2010-06-01 at 8.54.02 AM.png 14.46 KB

#8

Version:6.x-1.0-beta4» 6.x-1.x-dev
Assigned to:Anonymous» frjo
Status:active» needs review

Please try out this patch, it adds a if (_colorbox_active()) check for the colorbox_inline.js inclusion.

AttachmentSize
colorbox_active_ 813990_8.patch 910 bytes

#9

It worked perfectly. Awesome job! :)

#10

Status:needs review» fixed

Committed to 6-dev. Thanks for testing it.

#11

Status:fixed» closed (fixed)

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

nobody click here