Cannot read property 'limitstart' of undefined

For Joomla! 2.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Note: All 1.6, 1.7 and 3.5 releases have reached end of life and should be updated to 3.x.

Moderator: ooffick

Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Locked
jmpro
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Nov 17, 2010 2:13 pm

Cannot read property 'limitstart' of undefined

Post by jmpro » Mon Nov 28, 2011 2:26 pm

Hi,

Currently, im still new to the joomla development. i try step by step to create joomla component.

when i'm in step to create list at back end, i got a problem with pagination. the pagination is displayed well, but not functioning.

when i see the inspection console, this error message is come out when i click on any pagination button.
Uncaught TypeError: Cannot read property 'limitstart' of undefined (anonymous function)index.php:274 onclick
this is my code
/admin/com_test/models/activities.php

Code: Select all

<?php
jimport('joomla.application.component.modellist');

class TestModelActivities extends JModelList{
	
	public function getListQuery(){
		$query = parent::getListQuery();
		
		$query->select('*')
			  ->from('#__test_activities');
		
		return $query;
	}
	
}
/admin/com_test/views/activities/view.html.php

Code: Select all

<?php
jimport('joomla.application.component.view');

class TestViewActivities extends JView{
	protected $items;
	protected $pagination;
	
	public function display($tpl = null){
		
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		
		parent::display($tpl);
}
and in my default view, i already put the $this->pagination->getListFooter() function in the table footer.

i still dont get what the problem really is..

JeyC
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sun Jul 06, 2014 5:47 am

Re: Cannot read property 'limitstart' of undefined

Post by JeyC » Mon Jul 07, 2014 10:39 am

The same problem here. And I can't debug it because my error shows on line 1 in my index.php page.

I think you should output the pagination in a form tag. If you look in the html output of the pagination you will see the onclick event with the following :

Code: Select all

document.adminForm.limitstart.value=10; Joomla.submitform();return false;
.

Joomla tries too add to a form the value 10 (in my case) for limitstart in the adminForm object, but there is no form to add it so it returns:

Code: Select all

 Cannot read property 'limitstart' of undefined
The undefined variable being the adminForm object.


Locked

Return to “Joomla! 2.5 Coding”