فتحات العرب Joomla! • Index page: Joomla! 3.x Coding • Legacy Model returns 0 items in case of setting limit 0

Sunday, February 1, 2015

Joomla! 3.x Coding • Legacy Model returns 0 items in case of setting limit 0

Iam developing a component and after debugging a while I found a very strange phenomen.

In my frontend you can set a pagination limit to see a defined limit of items. Everything looks fine at the first seight.



Under several circumstances I got back cero items. Thats why I started debuging the code.

In the Legacy Model of Joomla \libraries\legacy\model\legacy.php there is a function '_getList($query, $limitstart = 0, $limit = 0), which is responsible for initiating the query and returning the results. And here is my problem:



if $limitstart has a value > 0 and $limit = 0, then no items will be returned. This problem arises when you switch with the pagination to the last site. The limit will be set to 0, because there is no limit any more. Only the last results should be shown, eg. $startlimit = 15 and $total = 18, but the mentioned function returns 0.



What's wrong here? Can anybody help?



Joomla Version 3.3.6

Statistics: Posted by Perino — Sun Feb 01, 2015 5:33 pm








via Joomla! http://ift.tt/1HF14l5

No comments:

Post a Comment