Code Monkey home page Code Monkey logo

Comments (9)

erikao avatar erikao commented on August 28, 2024

Oh, same goes for the Ice code listing on the NYT organization page. (I created these a while ago and wasn't sure about publishing them. Should decide on that, but also raises workflow/display issue generally.)

from source.

ryanpitts avatar ryanpitts commented on August 28, 2024

Ooh, totally a bug. Only stories marked "display on site" should show in lists. I'll take a look, but pretty sure I know what's wrong.

On Friday, October 12, 2012 at 5:56 AM, erikao wrote:

I think that is why I encountered a page not found error. On this page: https://source-dev.mozillalabs.com/en-US/organizations/new-york-times/ If I try to access "New York Times' Ice" as an article at the bottom, it gives a 404 error. That article IS in the admin site, but it's not checked off as "display on site." https://source-dev.mozillalabs.com/admin/articles/article/15/
This might be more of a workflow thing (i.e. don't save unpublishable articles into django), but it could also be a display thing, such as to add "live on site" as a criteria for listing an article.


Reply to this email directly or view it on GitHub (#76).

from source.

dansinker avatar dansinker commented on August 28, 2024

Bam. Go team.

On Fri, Oct 12, 2012 at 9:11 AM, Ryan Pitts [email protected]:

Ooh, totally a bug. Only stories marked "display on site" should show in
lists. I'll take a look, but pretty sure I know what's wrong.

On Friday, October 12, 2012 at 5:56 AM, erikao wrote:

I think that is why I encountered a page not found error. On this page:
https://source-dev.mozillalabs.com/en-US/organizations/new-york-times/ If
I try to access "New York Times' Ice" as an article at the bottom, it gives
a 404 error. That article IS in the admin site, but it's not checked off as
"display on site."
https://source-dev.mozillalabs.com/admin/articles/article/15/
This might be more of a workflow thing (i.e. don't save unpublishable
articles into django), but it could also be a display thing, such as to add
"live on site" as a criteria for listing an article.


Reply to this email directly or view it on GitHub (
#76).


Reply to this email directly or view it on GitHubhttps://github.com//issues/76#issuecomment-9377776.

from source.

ryanpitts avatar ryanpitts commented on August 28, 2024

Great catch. This wasn't happening on any of the primary article lists, but only on the person/org/code pages that called in their own related article lists. There's a live_objects filter that wasn't being applied on those pages, and I hadn't run into an instance like this and noticed it. Fix is pushed, and pull request opened. Thanks!

from source.

rossbruniges avatar rossbruniges commented on August 28, 2024

Give it 15 minutes and Ryan's fix will hopefully be up on live...

from source.

erikao avatar erikao commented on August 28, 2024

Awesome. Just to follow up...on the NYT page the article now no longer shows up, but the code entry is still there. It's only been 20 minutes so maybe that change hasn't populated yet, but just wanted to point it out since one thing disappeared and one stayed.

from source.

ryanpitts avatar ryanpitts commented on August 28, 2024

Grr. Missed that one. On it.

from source.

ryanpitts avatar ryanpitts commented on August 28, 2024

Erika, I'm really glad you spotted this. Django has a nice shortcut for calling related objects onto a template -- e.g. given a person, I can call person.organizations.all() and get a list. But this is just a straight database query, and doesn't have any way to know it should respect that "show on site" checkbox.

This is fixed now, via model methods along the lines of person.get_live_organization_set() that do take into account the filtering we need to do to ensure that something actually should be public.

And this bug ended up having its tendrils in a lot of places -- search indexes, for instance. So again, really glad you caught this ;)

from source.

ryanpitts avatar ryanpitts commented on August 28, 2024

This fix is now live, and I do not see "Ice" listed on the the New York Times page any more: https://source-dev.mozillalabs.com/en-US/organizations/new-york-times/

I think we're all good, but by all means poke at this!

from source.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.