Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blog tab not working after page 5 #3676

Closed
steviepubliclab opened this issue Oct 11, 2018 · 8 comments
Closed

blog tab not working after page 5 #3676

steviepubliclab opened this issue Oct 11, 2018 · 8 comments
Assignees
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed in progress

Comments

@steviepubliclab
Copy link
Contributor

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.

screen shot 2018-10-11 at 4 31 51 pm

@publiclab/mentors here's another bug that might be made into a good issue :)

@quinn-codes-synthesis
Copy link
Contributor

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':"

@grvsachdeva
Copy link
Member

grvsachdeva commented Oct 13, 2018

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!

@steviepubliclab
Copy link
Contributor Author

Oh no sorry, there are a lot more blog entries than that. Should go back about 3 years. (at least)

Best,
Stevie

@shubhangi-chauhan
Copy link
Contributor

@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. ⭐

@grvsachdeva
Copy link
Member

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 👍 .
Thanks!

@jywarren
Copy link
Member

jywarren commented Oct 22, 2018 via email

@shubhangi-chauhan
Copy link
Contributor

Quoting @gauravano ,

Anyways, @steviepubliclab @jywarren so we want to increase the nodes limit or display all the blog nodes?

@jywarren
Copy link
Member

jywarren commented Oct 26, 2018 via email

@grvsachdeva grvsachdeva added bug the issue is regarding one of our programs which faces problems when a certain task is executed in progress labels Feb 13, 2019
@grvsachdeva grvsachdeva self-assigned this Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed in progress
Projects
None yet
Development

No branches or pull requests

5 participants