Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Only show 6 records


Go to End
Reply


21 Posts   1361 Views

Avatar
alex123

Community Member, 18 Posts

1 February 2013 at 9:35pm

Dear All,

When I upgrade from 2.4.2 to 3.0.2. On the admin of news -> I add a lot of page but It only shows 6 records. I don't know why.

http://www.neutrog.com.au/news/

Avatar
copernican

Community Member, 189 Posts

2 February 2013 at 2:39am

Could you show us your php, and template code for this section? Without some details it makes it pretty much impossible to troubleshoot.

Avatar
alex123

Community Member, 18 Posts

2 February 2013 at 2:53am

Hi there,

what the file name of template which you need I show to you.

Avatar
copernican

Community Member, 189 Posts

2 February 2013 at 3:24am

Edited: 02/02/2013 3:25am

I think it would be NewsPageHolder.ss

By the way, it looks like you have dev mode enabled on your site. I would recommend you turn it off as it can present a security risk. If you are unsure of how to do this, you would add the following to your _config.php in the mysite/code folder.

Director::set_environment_type('live');

Avatar
alex123

Community Member, 18 Posts

2 February 2013 at 5:18am

Thanks you reply.

This is a page NewsPageHolder.ss which I rename NewsPageHolder.txt

When I check my config file I don't see any line Director::set_environment_type('live');

Do I add new line on config file.

Thanks,

Attached Files
Avatar
alex123

Community Member, 18 Posts

2 February 2013 at 5:51am

If I delete one file \framework\core\PaginatedList.php . I see this site is still work. I think I also problem with PaginatedList.php

I find another solution It shows random page - Only limit 6 records. I check how can I change this value. But It doesn't work still now

Avatar
copernican

Community Member, 189 Posts

2 February 2013 at 5:59am

Edited: 02/02/2013 6:17am

Hey Alex,

yes you would add the new line to _config.php for Director::set_environment_type('live');

I'd like to make sure I am understanding the problem correctly. you said "I add a lot of page but It only shows 6 records". For the 6 records are you referring to the " Neutrog Fertiliser Explained", " Rocket Fuel Lands At Kitchen Garden Schools", "Graham Ross Honoured With Prestigious Award" etc items on the /news page?

if you are, in your mysite/code folder is there a .php file called NewsPageHolder.php? If there is, can you check if there is a function that looks like

function getArticles(){
*bunch of code*
}

or

function Articles(){
*bunch of code*
}

If a function like that exists, could you copy/paste it here?

Avatar
alex123

Community Member, 18 Posts

2 February 2013 at 6:06am

I check on my ftp It doesn't show any file NewsPageHolder.php

I also check with Edit Plus I don't see any function function Articles(). It means I need create NewspageHolder.php.

If I create NewsPageHolder.php where I put this file on my site and how about information in this file

Go to Top