If you uncheck the box for "Add views row classes" under format settings, this module will not work. It needs the default views row classes and I believe it should work with less class clutter. The JS for this module could be better optimized for this. Just a heads up since I couldn't find this anywhere and I only figured it out by looking at the script. I'll submit a patch sometime I get some free time.
Comments
Comment #1
askibinski commentedI can confirm this issue.
If the checkbox is unchecked, a JS error will occur:
at views_infinite_scroll.js, line 51:
If this is by design, I think it should be mentioned on the project page and/or readme.
Comment #2
Pentacor commented+1 this breaks the module in my eyes as I'm doing a lot with themed views output so don't want the extra divs and guff the default output gives me. There surely must be a workaround?!
Comment #3
Pentacor commented+1 this breaks the module in my eyes as I'm doing a lot with themed views output so don't want the extra divs and guff the default output gives me. There surely must be a workaround?!
Comment #4
jibranComment #5
pxlr commentedI was going crazy trying to figure out what was wrong on my install, until I found this. I thought it was the jQuery Update module, or the autopager, or something else altogether. I'm using a custom row output in my tpl files to give the masonry-item divs a class based on author name (I needed to style them different colors based on author). All I did was add the class "views-row" manually into the "masonry-item" div and it's all working again.
Hope that helps someone else.
Comment #6
dooug commentedClosed a duplicate: #1983582: Allow default row classes to be disabled
I also had to manually add the
views-rowclass to my template for this to work.Comment #7
jamiehollernI'd like to add to this and say that the module won't work if the default view wrapper classes are disabled. I use Mothership as a base theme and it removes the "view-id-[id]" and the "view-display-id-[display]" classes from the wrapper which causes this module to break.
For example, if I have a view called "work" and I want to use infinite scroll on the display "page" the module looks for
div.view-id-work.view-display-id-page > div.view-content .views-row.filter(:last)Using the default Mothership settings, the first two classes are removed which causes this module to break.Comment #7.0
jamiehollernEDIT: Submitting patch sometime later
Comment #8
nlhnam commentedIf I put in field "Wrapper class" another class instead of default "item-list" like "item-list my-own-class" it won't work either. Too bad for a good module.
Comment #9
maxplus commentedHi,
I can confirm #8, I also have a custom wrapper class and de module indeed doesn't work...
Comment #10
jkirkby commented+ #8
This needs to be better documented that it will break if you change these classes
Comment #11
bigssam commentedin your views display settings, you must add Add views row classes to the dom of your views by chekin the property "Add views row classes"
Regards.
Comment #12
interestingaftermath commentedIn my case, I didn't want the div wrapper on my rows so I was able to just add "views-row" class to my row in the Global: Custom Text field.
Comment #13
vacilando commentedSolved without having to switch on "Add views row classes" simply by adding class "views-row" under "Row class" in the Format settings.
Comment #14
flyke commentedThanks for this thread. I could not figure out why my infinite scroll wasn't working. I was about to test a patch from this page: https://www.drupal.org/node/970870 when I ran into this thread and decided to first just try to check the option add views classes in my view. Now the infinite scroll works so i don't need any patch.
Comment #15
fbreckx commentedDoesn't work with Mothership / Semantic Views. Truly a shame ...
Will there be a new version any time soon?
Comment #16
pehka commentedStill doesn't work after adding the classes.
Edit:
- Format: HTML List
- Drupal 7.36, JQuery 1.10 , Views 3.1, Views Infinite Scroll 1.1
- no patches Applied yet
- Error: Uncaught TypeError: Cannot read property 'top' of undefined
Any ideas?
Comment #17
ean commentedMasonry API version = "7.x-3.0-beta1"
Views Infinite Scroll="7.x-1.2+1-dev"
Still doesn't work after adding the classes.
Error: Uncaught TypeError: Cannot read property 'top' of undefined
Comment #18
honza pobořil commented