That's right. When I click on load more, the content doesn't append to the bottom of the page, the next page items just load as a fresh new page. Is this a problem?

CommentFileSizeAuthor
#9 lastpage.jpg126.72 KBmdroste

Comments

vimalramaka’s picture

Title: Items doesn't append to the bottom of the page, instead the load as a fresh new page » Items doesn't append to the bottom of the page, instead they load as a fresh new page
ranx’s picture

It seems that it is so by design. When Views own "Use AJAX" option is turned off the old content is replaced by the new one. With the option turned on though new content is added to the end of the old content.

vimalramaka’s picture

I tried that way too. Nothing happens when I click on Load More when AJAX is on. It doesn't work at all.

ericduran’s picture

This is indeed by design. You need to have javascript enabled and the "Use AJAX" options must be enabled for the views that contains the load more.

If you have javascript enabled and the user ajax enabled feel free to drop an export of your views (if is not private) and I can see what the issue is.

ericduran’s picture

@vimalramaka I'm going to update the module to use #1220498: Missing hook_views_ajax_data_alter which will make this a lot easier and probably get rid of the issues you're having.

ericduran’s picture

Status: Active » Fixed

Any possible errors you where having should now be fixed with http://drupal.org/node/1234644

You will need to wait at least 12 hours so it can be packages on the new -dev version. Also you'll need to use the latest views version which will also be package in at least 12 hours.

Thanks.

Status: Fixed » Closed (fixed)

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

Fabito’s picture

Version: 7.x-1.x-dev » 7.x-1.1

Hi,
I've searched the solution here, but It seem not work for me.

I have the same problem, when I click on "load more",
my block refresh himself, my new contents are not added after the older.

I use views 7.x-3.0-rc1...
It is about this release ?
Can I solve my problem with the release candidate ? or must I use the -dev...

Thanks in advance,
Fabien

mdroste’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Component: User interface » Code
StatusFileSize
new126.72 KB

Same problem for me. The new content replace the old content, but is not appended. This is the same behavior as the normal views pager with ajax.
The attached screenshot shows the last page, after one clicked several times the load more link.

mdroste’s picture

Status: Closed (fixed) » Active
khan2ims’s picture

Hi,

I am having the same issue. When I click on more link, it doesn't scroll the page down to show more. Instead go to the next page display.

Please help.

ericduran’s picture

Ok, this seems to pop up again. I'll do some testing with the latest version of views. :-/ things keep changing.

khan2ims’s picture

Hi,

Any idea when can this be fixed? I need this feature on a website that needs to go live soon.

Thanks in advance!

blackandcode’s picture

I got the same problem. The ajax appned to the bottom only if We put the Pager ID=1, If we put any other than it doesn't work. Any solution for this??

mdroste’s picture

Also with a pager id = 1 it doesn't work for me.

blackandcode’s picture

Any news about this bug?

victoriachan’s picture

I'm having this same problem too. The new items are loaded as a new list (with Ajax on) as if a 'next page' button has been pressed.

What I am after is for the new items to append to the current list of items, and so the list will get longer when the 'Load more' button is clicked yet again.

Is this not the design of this module? It is unclear what this module is supposed to do. Is there a working example?

Thank you,
Victoria

BrockBoland’s picture

I haven't seen the problem reported here, but was having this issue that may well be related: #1322642: Full page reload on 2nd click of load more. (works the first time).

The first time I clicked the "Load more" button it worked, loading more content over Ajax. Clicking it a second time would result in a new page load.

This bug is in the latest stable release, 7.x-1.1. I am now using 7.x-1.x-dev and it's working.

BrockBoland’s picture

Also: has anyone seeing this bug checked the console in their browser to see if any JS errors are reported on page load?

ericduran’s picture

Thanks BrockBoland, Does this mean this issue is fixed in dev? I know views at some point changed the way it process the ajax so we had to update this module. We might need to do it again. I need to do some test.

Any and all info are welcome :)

BrockBoland’s picture

No, I'm not sure if it's fixed, just saying that it might be related to the other issue that is. I was never able to replicate the bug reported here, so I can't say whether it's fixed in -dev.

ericduran’s picture

Status: Active » Postponed (maintainer needs more info)

Ok, I've tested this with the latest dev and I'm not having this problem.

Has everywhere here tested with the latest dev of this module?

victoriachan’s picture

I suspect it might be because I was using this with a child theme of Mothership's. It seems Mothership strips out quite a lot of the default css classes and id, and wrapper divs etc, which could break the JavaScript selector used here.

I've tried with the dev version, and was still having the same problem. This could possibly be overcomed by configuring the correct selector using the admin panel. But it didn't work for me when I tried that. It could be because I didn't set the right selector. It was unclear what selector this should be.

Also another factor which could be related is that I'm using this on a viewfield field.

Anyway in the end because of time constraint, I ended up writing a custom javascript to transform the default mini pager to a 'Show more items' button, using ajax to load the href from the mini pager's 'next' button, and it was actually quite straightforward (about an hour's coding).

Hope this information helps someone.

jernej.c’s picture

Could you paste your code? I'm having the same problem.

EDIT:
I have a custom display and the ".view-content" wrapper was missing in my .tpl file. Once I added that back, everything is working fine.

sarath.rajan’s picture

Still getting this issue.

Also getting script error in this line
Drupal.ajax.prototype.commands.viewsLoadMoreAppend = function (ajax, response, status) {

Is there a stable version for this module?

urbanbricks’s picture

I was having the same issue. I can confirm @jernej.c's report that the .view-content wrapper class is required to allow the 'Load More' link to append the results. If this isn't included in your theme by default, you should be able to include the class manually via the Views UI. When editing your view:

- Under the heading for 'Format', click 'Settings' (appears next to your chosen format, Grid, HTML List, etc.)
- Under 'Wrapper Class' enter in to the text field, "view-content" (do not use the quotes)
- Apply and Save.

Results may not work in the Preview. Refresh the page that contains your view and test. Should work.

ericduran’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Fixed

Also it should be noted, The views load more has an "Advance setting" form which you can select the class.

So if you change your div/class around you can just select the class you gave the content div.

So you can use what ever class you want.

Status: Fixed » Closed (fixed)

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

brandy.brown’s picture

I can confirm this is still an issue for me with 7x 1.2. I have the view-content wrapper and have ajax enabled in my view. I have used this module before without problems.

---- EDIT ----
My issue lies in the fact that I am embedding my view using a tpl.

MahmoodZidan’s picture

Issue summary: View changes

This issue is not fixed yet.