#91 ✓resolved
greenbuildingbrain

500 Error -- Remove team member from project team

Reported by greenbuildingbrain | July 9th, 2009 @ 11:32 PM

This project had a preliminary study conducted that involved additional architecture offices and engineers. I accidentally added them as project architect. Can't remove them from list. Also, can't remove an image I added that is pixelated.

Comments and changes to this ticket

  • greenbuildingbrain

    greenbuildingbrain August 13th, 2009 @ 03:03 PM

    • State changed from “new” to “open”

    Iteresting.
    This error seems to be reporting as a 'cookie overflow'

    ActionController::Session::CookieStore::CookieOverflow

  • greenbuildingbrain

    greenbuildingbrain August 13th, 2009 @ 03:16 PM

    So, I'm still not sure what the error was initially but we got a 500 error because we were pushing flash[:notice] with params.to_yaml, which exceeded the 4k cookie size, or so I assume.

    -- Here are the params, I'm gonna see if i can break stuff with them.

    Completed in 20ms (View: 0, DB: 0) | 200 OK http://greenbuildingbrain.org/items/Mount_Angel_Abbey_Center_For_Th...

    Parameters: { "commit"=>"Update",

                "id"=>"Mount_Angel_Abbey_Center_For_Theological_Studies",
                "reason"=>"",
                "building"=>{
                    "project_team_members_attributes"=>{
                        "0"=>{"_delete"=>"0", 
                              "id"=>"434", 
                              "value"=>"SRG Partnership", 
                              "key"=>"Architect"}, 
                        "1"=>{"_delete"=>"0", 
                              "id"=>"435", 
                              "value"=>"James Graham and Associates", 
                              "key"=>"Mechanical, Electrical and Energy Engineer"}, 
                        "2"=>{"_delete"=>"0", 
                              "id"=>"436", 
                              "value"=>"Energy Studies in Building Laboratory, University of Oregon", 
                              "key"=>"Building Energy Design"}, 
                        "3"=>{"_delete"=>"0", 
                              "id"=>"437", 
                              "value"=>"", 
                              "key"=>""}, 
                        "4"=>{"_delete"=>"0", 
                              "value"=>"", 
                              "key"=>""}
                     }
                 }, "element"=>"project_team"}
    

    http://greenbuildingbrain.org/buildings/Mount_Angel_Abbey_Center_Fo...

  • greenbuildingbrain

    greenbuildingbrain August 13th, 2009 @ 04:32 PM

    oh awesome! I can break it! the bug has been replicated!
    It exceeded the 4k limit because it was dumping the users params into the mix as well, and the user had a decent amount of bio data.

    Seems we were punishing them for this.

    The submit was failing because project team was validating for presence of key, and the user was (rather cleverly) nulling both fields and expecting it to delete the entry!
    This should be allowed.

  • greenbuildingbrain

    greenbuildingbrain August 13th, 2009 @ 05:12 PM

    Allright bugfans! This one is a LOCK!

    We have successfully included the key piece of functionality that the brain needed to run like clockwork!

    Here's the deal with how it works now

    If you delete a project team member by deleting their key-value pairs, it goes ahead and deletes them.
    Just like that!
    It's smooth, effective, and predictable.
    Unpredictable behaviors? Yes! We still have them! If you have a value, with no key, it gets deleted and no messages are passsed.
    Gotta keep everyone on their toes!

    Commiting now!

  • greenbuildingbrain

    greenbuildingbrain August 13th, 2009 @ 05:32 PM

    It seems this bug also existed in certifications.

  • greenbuildingbrain

    greenbuildingbrain August 13th, 2009 @ 05:34 PM

    • State changed from “open” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Green Building Brain is an open source and open content tool for collaboration and resource sharing between green building professionals and amateurs.

People watching this ticket

Pages