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

News and opinion pages broken #497

Open
J16053 opened this issue Apr 6, 2019 · 10 comments
Open

News and opinion pages broken #497

J16053 opened this issue Apr 6, 2019 · 10 comments
Labels

Comments

@J16053
Copy link
Contributor

J16053 commented Apr 6, 2019

Expected Behavior

Visiting these pages should not show a blank page. Where are the articles?

Current Behavior

Visiting these pages shows a blank page.

Possible Solution

A quick look leads me to believe that there might be a problem with one of the issues in each of those categories in the database, making the Falcor fetch fail and preventing the page from being displayed. To start, I would suggest sourcing the database dump for 2019-03-28, running The Gazelle locally, and tracing through the console errors to see if a database error can be found.

Maybe this bug will be less visible once enough new articles have been added to push the buggy article off the list of articles fetched, but it'd be best if we can figure out what's going on ASAP because if the problem is with an article it's sure to have affected other pages and links.

Steps to Reproduce (for bugs)

https://www.thegazelle.org/category/news
https://www.thegazelle.org/category/opinion

@J16053
Copy link
Contributor Author

J16053 commented Apr 7, 2019

No longer a problem for this week's issue: would still be good to check out what was happening last week though

@nurpeiis
Copy link
Contributor

nurpeiis commented Apr 7, 2019

The problem is not with articles from issue 155, it is with News category article of previous publications, simple "solution" would be putting articles length to be 8 in CategoryController.jsx, since the problem is with 9th article

@J16053
Copy link
Contributor Author

J16053 commented Apr 8, 2019

Thanks for looking into this! Changing the articles length would just be a band-aid solution: if the problematic article ever showed up anywhere else, it would likely still cause errors. Could you maybe find the name/slug/id of the 9th article so we can take a closer look at what's wrong and fix the problem at its root? Same goes for the problematic article in the opinion category that showed up that week.

@nurpeiis
Copy link
Contributor

Screen Shot 2019-04-10 at 11 14 12 AM

I unpublished 3 articles, one of them is problematic, as when I unpublished 3 of them at the same time page started working. Now I am planning to publish each article one by one to see which one is problematic. Do you know how to publish back unpublished articles or do we have to create a new article? If it is creating new article, then we can have one new feature for admin page: have a button that will enable us to publish back unpublished articles

@J16053
Copy link
Contributor Author

J16053 commented Apr 10, 2019

An article can be published by adding it to a published issue, although playing with this myself just now I realized there are aspects of it that are kind of buggy. If you go to the Issues tab, select the issue you would like to have the article published in, select Articles, and then add the unpublished article to main articles, it should show up again. Make sure to remove an article from the issue it was published in before unpublishing it though.

@nurpeiis
Copy link
Contributor

I have noticed that the article in News section that had issue ("Intense Basketball Game...") was without any tags. I believe that might be a reason of why article has "undefined" value

@J16053
Copy link
Contributor Author

J16053 commented Apr 11, 2019

Was that the article that was breaking the page? I don't think an article without tags would cause this since articles don't need to have tags to be published, but it is a possibility. I would suggest trying to trace the falcor call in CategoryController.jsx (hint: first step would be to look in lib/falcor/routes/categories/by-slug.js) to see what exactly is being fetched, then checking the database in that place to see why the query returns undefined.

@navyasuri
Copy link
Member

Update - this problem just resurfaced (don't know if it went away for an issue/multiple issues in between though)

@navyasuri
Copy link
Member

My bad, I just checked real quick and this is broken for ALL issues

@J16053
Copy link
Contributor Author

J16053 commented Sep 24, 2019

As discussed with @navyasuri , there appears to be a bigger underlying issue that deals with inconsistencies when creating/editing an article/issue that results in articles not having entries in the issues_articles_order table. Perhaps there's some edge case in the updateIssueArticles() function in db.js that fails to re-add entries to the table once they've been removed? I'll try and make a quick temporary fix today that gets the pages working again, but this is definitely something we'll have to look into more deeply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants