The core issue #2349775: Remove classes from Views templates added a slight change to class names. Rather than pager__items the class on the ul tag will need to be js-pager__items.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom’s picture

Status: Active » Needs review
FileSize
623 bytes
jhedstrom’s picture

FileSize
868 bytes
1.46 KB

There was one more instance of a class name change needed.

hctom’s picture

Status: Needs review » Reviewed & tested by the community

The patch from #2 worked like a charm and applies without error, thanks ;) I tested it with Drupal 8.0.1.

nicholasThompson’s picture

This has applied cleanly for me, however none of my views have the .view-content wrapper around the rows which this requires. This means the JS fails to replace my conent as it cannot find anything in the new_content response.

My solution was:

1) Override views-view.html.twig for my view to add a <div class="view-content"></div> wrapper around {{ rows }} {{ empty }}
2) Change my view to look for .view-content instead of > .view-content

KarenS’s picture

After lots of wondering why .view-content sometimes is there and sometimes is not, it turns out that wrapper is added in the classy theme. So if you use classy or a classy sub-theme you'll see a wrapper with .view-content . If you don't, you won't. So it's not safe to add it to the module because for many people it will be there. If it's missing you need to add a copy of the views-view template to your theme, using the one in the classy theme as your example. My guess is that other views modules will break without all the usual views wrappers added by the classy template as well, so it would be best to be sure it's there.

Grimreaper’s picture

Hello,

Thanks, it works well with the patch.

I also encountered a problem with the class .view-content not present because I used the HTML/CSS provided by non-Drupal mock-ups. But thanks to the possibility to configure the targeted element, it works.

Arne Slabbinck’s picture

I had an issue that Drupal wouldn't use ajax at all for loading more nodes, patch #2 fixes that, thanks!

jaxxed’s picture

Still using this patch

aschiwi’s picture

Any plans to commit this? We are also using the patch.

zalak.addweb’s picture

Issue tags: +views load more
DiDebru’s picture

Thx for the patch :)

DiDebru’s picture

joekers’s picture

Thanks for the patch - the module is working well with it.

dddbbb’s picture

1.5 years later, patch #2 still works and is still required. Commit?

loopduplicate’s picture

Status: Reviewed & tested by the community » Fixed

Looks like this has been implemented already. Moving the status to Fixed.

Status: Fixed » Closed (fixed)

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

volkerk’s picture

I am sorry, but I can not make out where this would be implemented? We are still using this patch.

@loopduplicate: Could you please point that out to me?

joekers’s picture

I can't spot it but it's not possible to make the issue active again, only a maintainer can do this.