Uncaught TypeError: Object function (j,s){return new b.fn.init(j,s)} has no method 'Callbacks'

dd

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

How did you arrive on this screen? Did you pick a layout earlier?

rogical’s picture

Yeah, I picked the responsive layout.

I'm using D7.15
dd

Gábor Hojtsy’s picture

Status: Active » Postponed (maintainer needs more info)
FileSize
98.95 KB

I can reproduce it not working correctly as in the layout editor shows up in the content pane instead of it allowing you to actually add content :) But I cannot reproduce this error with the current dev version. Do you have jquery_update properly installed? Can you try with the dev version?

mypage.png

jessebeach’s picture

@rogical, can you run this command in the Google Chrome console and tell me what version of jQuery you're running when the error occurs?

jQuery().jquery

rogical’s picture

I'm using default with Drupal 7.15, does this module needs jquery update?

rogical’s picture

Finally it works jquery update with jquey 1.7, 1.5 not working. We should add dependency for it.

But it seems the width adjustment is not working well.

jessebeach’s picture

@rogical, right, the $.Callbacks object was added to jQuery in 1.6. The Spark build should set the jquery_update module to 1.7.1. What do you think the best way to add a dependency would be? hook_requirements?

Large-size layouts are overflowing the layout designer on small screens. I'm not sure how to deal with this yet. Scrolling? Maybe set the zoom CSS property? What do you think?

lslinnet’s picture

using jQuery 1.7.1 on a Drupal 7 project seems very error prone to me, take the Views module it doesn't work properly with jQuery 1.7 (http://drupal.org/node/1494860).

Is there a way to make this compatible with the version that is shipped with Drupal 7 or the one that comes by default with jquery_update?

rogical’s picture

-

rogical’s picture

For the dependency we just can setup in .info file for jquery_update, and note the requirement of jQuery 1.7 in readme and project page.

hook_requirements is also very good if you want to do it.

I also have no idea about the overflowing issue, but I prefer #1703138: Responsive layout builder should show up in same flow as Flexible layout builder if possible.

Gábor Hojtsy’s picture

Added the jquery_update requirement: http://drupalcode.org/project/layout.git/commitdiff/e336d68b876a1e4119b4... - the spark make file has this as well for jquery_update:

  // Set the jQuery version to 1.7.
  variable_set('jquery_update_compression_type', 'min');
  variable_set('jquery_update_jquery_cdn', 'none');
  variable_set('jquery_update_jquery_version', '1.7');

Should we enforce this somehow in layout module? hook_requiements as @jessebeach suggested? It is a pretty hard requirement that the module works with Views, etc. so if it cannot be made to work (by fixing bugs there), then we'll need to make do with an earlier jquery_update. @jessebeach added this version requirement, so I'd defer to her on this.

@jessebeach: How is the overflow issue related?

jessebeach’s picture

The overflow issue is captured in this screenshot.

https://skitch.com/jesse.beach/epcr6/screen-shot-2012-08-18-at-4.59.19-pm

When the screen isn't large enough for the layout, it flows outside the container.

jessebeach’s picture

I think we need a hard requirement for jQuery 1.7.x in the layout module. It makes no sense to build a cutting edge app on a 2+ year old version of jQuery. The updates that have been made since 1.4.4 are significant.

We need to declare hook_requirements and hook_libraries_info from the libraries module.

fox_01’s picture

Whats about an implementation of the jqmulti Module? The js of layout module needs to be a library and to this library you can attach a spcific jquery version with jqmulti Module. All other functions of the sites works as before because this is an island that is created.