I was exploring some older posts on the blog (www.publiclab.org/blog) when I noticed I couldn't tab back more than the 4 pages that show on the bottom of the blog. If you try to hit "next" once you're on page 4 nothing happens.
@publiclab/mentors here's another bug that might be made into a good issue :)
Hi! Is it possible that there are not enough blog entries to populate a 5th page? I ask because when I try to navigate to https://publiclab.org/blog?page=5 I get "No results found; try searching for 'blog':"
You are right @quinn-codes-synthesis, as seen from the above image too, the Next button is disabled after arriving at Page 4 as there is no 5th page. @steviepubliclab do you think, this issue can be closed now? Thanks!
Oh no sorry, there are a lot more blog entries than that. Should go back about 3 years. (at least)
Best,
Stevie
@steviepubliclab as you've already figured out, it's not due to number of blogs that the blog tab is not working after page 4*.
This is really because in file :
/plots2/app/controllers/tag_controller.rb
#code-snipet
def blog
nids = Tag.find_nodes_by_type(params[:id], 'note', 20).collect(&:nid)
@notes = Node.paginate(page: params[:page], per_page: 6)
#code-snipet
You'd notice we're passing a limit of 20 blogs to the model, and there are 6 blogs on each of page 1, 2, 3 and remaining 2 on page 4, which make all of it.
I'm not sure why this has been implemented in such a way, I'd like @publiclab/mentors to explain it better. :star:
Nice catch @shubhangi-chauhan! I am really confused why is there limit placed on blog nodes at first place. Anyways, @steviepubliclab @jywarren so we want to increase the nodes limit or display all the blog nodes?
@shubhangi-chauhan you can solve this issue if you want as soon as any @publiclab/community-reps gives :+1: .
Thanks!
Yes let's increase the total! Awesome find!!!
On Sun, Oct 21, 2018, 2:24 PM Gaurav Sachdeva <[email protected]
wrote:
Nice catch @shubhangi-chauhan https://github.com/shubhangi-chauhan! I
am really confused why is there limit placed on blog nodes at first place.
Anyways, @steviepubliclab https://github.com/steviepubliclab @jywarren
https://github.com/jywarren so we want to increase the nodes limit or
display all the blog nodes?@shubhangi-chauhan https://github.com/shubhangi-chauhan you can solve
this issue if you want as soon as any @publiclab/community-reps
https://github.com/orgs/publiclab/teams/community-reps gives 👍 .
Thanks!—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/3676#issuecomment-431691858,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ3gmqR1vylq47edI0BuZQqJ8Csm-ks5unLu7gaJpZM4XYUT4
.
Quoting @gauravano ,
Anyways, @steviepubliclab @jywarren so we want to increase the nodes limit or display all the blog nodes?
Let's increase the limit, but still show the same # per page. Make sense?
On Wed, Oct 24, 2018 at 11:32 PM Shubhangi Chauhan notifications@github.com
wrote:
Quoting @gauravano https://github.com/gauravano ,
Anyways, @steviepubliclab https://github.com/steviepubliclab @jywarren
https://github.com/jywarren so we want to increase the nodes limit or
display all the blog nodes?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/3676#issuecomment-432902518,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ6tM4chTIcRKoyw3pyGYF9N_FXDrks5uoTC-gaJpZM4XYUT4
.
Most helpful comment
@steviepubliclab as you've already figured out, it's not due to number of blogs that the blog tab is not working after page 4*.
This is really because in file :
/plots2/app/controllers/tag_controller.rb
You'd notice we're passing a limit of 20 blogs to the model, and there are 6 blogs on each of page 1, 2, 3 and remaining 2 on page 4, which make all of it.
I'm not sure why this has been implemented in such a way, I'd like @publiclab/mentors to explain it better. :star: