Closed (fixed)
Project:
Views Load More
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2012 at 07:25 UTC
Updated:
9 May 2016 at 11:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ericduran commentedI'm pretty sure this is fixed in the 7.x version.
Comment #2
ericduran commentedSeems like is still a bug. It should be noted, you need to enabled ajax in the views module in order for this to work.
Without it it throws the error, but I think it might be better to keep throwing the error so is obvious that views doesn't have Ajax enabled.
Comment #3
agalitsyn commentedHmm, If I didn't enable ajax in view, pager will work without ajax. That's how I see that I didn't enabled it, not by js error in console.
Just imagine that I have page with view+views_load_more pager without ajax pagination. I have an js error in the console. At the same time I have button, which on click renders form in fancybox, and this form have ajax submit. This submit will not work because of error.
So I think this error shouldn't appear anyway. Pagination behaviour told us it's type (ajax/non-ajax)
Comment #4
ericduran commented@agalitsyn it is type ajax/non-ajax. That being said using the views_load_more pager without ajax wouldn't be very good since the behavior would be that of a regular pager. It wouldn't be very performant to keep making the sql query render more and more data in a single call.
That being said this ajax error should still be fixed.
Also the idea behind non-ajax support is for when a user doesn't have JS enbled, the pager would still work as expected instead of not doing anything.
Comment #5
alarez commentedProposed patch to avoid to declare viewsLoadMoreAppend function if Drupal.Ajax is not available. Error with JavaScript aggregation.
Comment #6
-enzo- commentedTested with js aggregated and without aggregation
Comment #7
socialnicheguru commentedthis works for me too
Comment #8
askibinski commentedI had a similar js aggregation/ajax problem in a custom module. Solved it by using:
This way, ajax is included AND aggregation is fine. Before, I had it in hook_init or hook_node_view but that doesn't work. I think the js aggregator handles libraries differentyl in bundles.
Comment #9
ericduran commentedNeither of these fixes are correct for this module.
I'll just put up a patch soon to fix this issue. That being said this is only an issue if you're using it wrong. If you don't have ajax enable then the module isn't going to work as expected.
But yes this should be fixed.
Comment #10
oknateTo keep it within the module, I added the library in the theme function.
This seems to fix the issue for me.
Comment #11
socialnicheguru commented#9 eridduran, on the homepage it says the following: "Provide ajax/no-ajax views load more".
So shouldn't the module work even if the view is not ajax enabled?
Comment #12
attila.fekete commentedAttached patch to avoid undefined ajax error. views_load_more.js is only included if ajax is enabled.
Comment #13
pwolanin commentedThis looks like a pretty simple fix
Comment #14
attila.fekete commentedPatch #12 commited to 7.x-1.x-dev.
http://drupalcode.org/project/views_load_more.git/commit/a3f8362
Comment #15
K_Gonzalez commentedHello,
I used the version 7.x-1.2 of Views Load More and i have the same error ( with firebug). The patch of #12 it's already in the code. Many people have this problem ?
EDIT : if the line 16 var targetList = response.targetList || ''; is comment this resolve the error but is not a good solution
Sorry if my english it's bad.
Cordially
Comment #17
m4oliveiLooks like this was resolved and commited.
@K_Gonzalez if your still having an issue. Please detail it including steps to reproduce in a new issue.
Comment #18
gambryYou probably want to have a look at #2721591: Drupal.ajax is undefined and see if the same issue would apply to views_load_more and/or if the improved condition will be beneficial.