Pagination partially rendering ( appears as a select list )

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
moqbel
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Jul 29, 2016 3:57 pm

Pagination partially rendering ( appears as a select list )

Post by moqbel » Fri Jul 29, 2016 4:13 pm

Using Joomla 3.5.1. Want to view a list of items with pagination. So I used $this->get('Pagination') in the display function : view.html.php then echo $this->pagination->getListFooter() in the deafualt.php file. However, I get a partially rendered pagination bar that looks like this Image. Its a select list with the numbers 5,10,20 ... etc up to 100 as options and when you click on one option nothing happens except the page reloads.

Can anyone help please, right now the page floods with so many items. I have tried everything I could possibly do. I included the behavior tool library to make sure its there although I have used pagination with Joomla 3.4 the same way with no problem what so ever. Also changed the template, I though it might be template related. But with out any luck.
You do not have the required permissions to view the files attached to this post.
Last edited by imanickam on Sat Jul 30, 2016 2:59 am, edited 1 time in total.
Reason: Moved the topic from the forum Extensions for Joomla! 3.x to the forum Joomla! 3.x Coding

User avatar
astridx
Joomla! Intern
Joomla! Intern
Posts: 91
Joined: Wed Mar 25, 2015 8:56 am
Location: Germany
Contact:

Re: Pagination partially rendering ( appears as a select list )

Post by astridx » Mon Aug 01, 2016 7:44 am

Perhaps there is a problem fetching the data in the model? You provided not much information.
I like this tutorial: https://www.yireo.com/tutorials/joomla/ ... pagination
---
https://blog.astrid-guenther.de/
---
Don't push the river ... it flows by itself ...

moqbel
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Jul 29, 2016 3:57 pm

Re: Pagination partially rendering ( appears as a select list )

Post by moqbel » Sun Aug 07, 2016 8:45 pm

Thank you so much for replying astridx . Almost lost hope that no one would comment :D :D. I will view the link you suggested and get back. However, meanwhile what do you mean by perhaps there is a problem fetching the data? Do you mean the records are not being loaded into the page to start with. But the records load fine, actually all records load and thats part of the problem because browser is trying to contain page with a hug list :D. Unless you meant something else with what you said.

moqbel
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Jul 29, 2016 3:57 pm

Re: Pagination partially rendering ( appears as a select list )

Post by moqbel » Fri Sep 16, 2016 2:57 pm

Well finally I figured it out. So I forgot to add this line ------ parent::populateState('a.id', 'desc') ------ in the following function in the model class

protected function populateState($ordering = null, $direction = null)
{
$search = $this->getUserStateFromRequest($this->context.'.filter.search', 'filter_search');
$this->setState('filter.search', $search);
parent::populateState('a.id', 'desc'); // This line was missing
}

And my bad on the other part; I misinterpreted the issue. What was rendering was the limit box of pagination ( as a drop down ) but the pagination bar it self never really rendered because there was no need to since all items where fetched anyways. So no limit was enforced due to the missing line.


Locked

Return to “Joomla! 3.x Coding”