I am displaying images and image titles in views using masonry. The grid layout looks fine for admin user but for anonymous user, everything displays in one column only. Not sure if this is a bug or an incorrect configuration.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cmwelding created an issue. See original summary.

Dom.’s picture

Status: Active » Needs work

Acknowledged, I will have a look.

shevatvb’s picture

Same issue here.
I'm getting this error from console

Uncaught TypeError: $container.once is not a function masonry.js?o4unuz:94

Dom.’s picture

Status: Needs work » Needs review
FileSize
828 bytes

Hi!

Very nice catch: this is a stupid problem ! (~50 sites uses the D8 version, you are the first to report it !). The Jquery Once library is used so widely in core and on contrib modules that the chance to not use another module that loads it is low. I guess that's why no-one noticed it. (also proof that my dev environment has too much modules now ^^)

A patch is attached; one line correction: declare the dependency on jquery once !

After patch, you need to clean cache to take effect, or to run update.php: the patch contains an update method that will clean it for your.

Dom.’s picture

Better comment on update.php method !

shevatvb’s picture

Hi Dom!
Thank you so much!
It works now! You were super fast!
Thanks again!

Dom.’s picture

Status: Needs review » Fixed

Commited on dev-branch

Dom.’s picture

Project: Masonry Views » Masonry API

Status: Fixed » Closed (fixed)

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

cancerian7’s picture

Not fixed in latest dev. I have to implement this patch manually.

gemalm’s picture

This patch works for me in Drupal 8.

dadderley’s picture

I am having the same issue as the original poster.
Also I cannot get the patch to work.

Strangely enough I have another Drupal 8.8.4 site where this problem does not happen.
Really odd.

joshuautley’s picture

#5 worked for me using Drupal Version 8.9.1

Thank you!

fabiana_matos’s picture

I am having the same issue as drupal 9.1.0 and Masonry 8.x-1.2
I implemented the patch manually and it didn't work