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.
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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.
Could you show us your php, and template code for this section? Without some details it makes it pretty much impossible to troubleshoot.
Hi there,
what the file name of template which you need I show to you.
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');
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,
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
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?
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