While experimenting with Masonry and Views, I created a view, styled it with Display Suite views, and then loaded the page. At that point, Masonry does not work. Everything appears to load fine, there are no JS errors, when I type "Drupal.settings" in Chrome's console, it displays the masonry object just fine. Yet masonry never gets to work.

I tried creating another view without using DisplaySuite and that works just fine.

Thanks for any help on this issue.

Comments

Diane Bryan’s picture

Issue summary: View changes

2 years later, and I'm having trouble getting any kind of Masonry display. Yes, Display Suite is on, but I'm just making a views block and placing the block in a region, Drupal-style. Not using Display Suite to lay out the nodes in masonry.

I'm getting this error:
Notice: Undefined index: cardinality in masonry_fields_formatter_supported() (line 108 of /srv/bindings/(long-string)/code/sites/all/modules/masonry_fields/masonry_fields.module).

and a whole lot more such errors.

I've installed the library, the masonry API module, masonry fields, masonry views, and field formatter settings module, which is a requirement, though not listed as such.

Since I'm not going to be getting rid of Display Suite, is there any hope of using Masonry?

Diane Bryan’s picture

I didn't mention: I'm using Adaptive Theme for D7 and I have Flex Slideshow Views Slider working as well as Responsive Menus (yeah--needed better dropdowns than superfish was giving).

dman’s picture

I got Masonry, Views, Display Suite, as well as Media Gallery working over at http://www.niwa.co.nz/gallery/coasts-oceans a while back.
I don't recall any specific problems - though I did have to do some overrides to un-do the Media Gallery grid layout first.

In other places there we have masonry working both *on* on Node Panels panes and on views embedded inside them. Also with Display Suite hanging around the outside of that.
In those cases I had to supply a special panels view (unformatted) that did not insert the Panels divider div, or add a class to the panels display options explicitly to trigger the Masonry behaviour. But it was al do-able.

For your troubleshooting, it's probably helpful to start isolating the issue.
See what happens if you render the same output in Stark theme, and without the additional javascripts. That will at least start to provide clues.
Could be a jquery_update conflict? just guessing.

'undefined index' issues can *sometimes* be fixed by going into the appropriate settings page and re-saving all the options. Adding tweaks modules later, after setting up your fields, can sometimes mean the system assumes values are set when they really are not yet. That is a module bug that should be fixed, but sometimes this work-around makes t go away so you can track down the real issues.

Diane Bryan’s picture

Thanks... good suggestions. I'll see what I can do.

edit: I have it in Stark now. No joy. I've got jquery 1.8 going right now... I think it was bumped up for jquery UI filter/tabs.

In config for Jquery Update I had jquery CDN set to "none"... changed it to "jquery", then "Google" and still no joy. All the other jquery stuff is still working.

(this is my first inherited Drupal project. Fun-fun!)

kyleheney’s picture

I also cannot make my Masonry view work at all. I also have jquery 1.8 and still no go. I don't use Display Suite and have only configured a few settings in my css file for the column width, etc. I've tried removing all my css to see if that was causing a conflict, but still no go.

Dom.’s picture

Status: Active » Closed (outdated)