1

I'm using Drupal 8 latest stable version: 8.5.x

I have 2 blocks (Upcoming events and Past events).

On Past events views infinite scroll is working with a button enabled providing the user ability to view more. It has many items and the module works as designed.

Same structure Upcoming events block returning only one upcoming event. When user clicks view more button the page is returning nothing and even the one item listed get disappeared.

Ajax is enabled on both views, the only difference is that upcoming events is returning only one result.

How can i solve this?

1 Answer 1

1

Why don't you duplicate the view that works and just reconfigure the filter criteria to met your requirements?

5
  • Because the module is not working when there is only one result Apr 5, 2018 at 18:54
  • But then the purpose of the module is not to "manage" a single result view, right? Apr 5, 2018 at 18:58
  • Right, but in case if there is only one result os still loads the view more button, and clicking it will do nothimg. In my case it is returning blank page and the one result is disappearing. Apr 5, 2018 at 19:08
  • Beyond my current knowledge of Drupal, but I would try to take over the template and hide the button with a conditional statement based on the number of items of the view or build a different view Apr 5, 2018 at 19:28
  • Overriding template file is the last thing I want to do. Anyway thank you for your time. Apr 5, 2018 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.