Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

500 Error -- Remove team member from project team

#91

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.

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

State: resolved
Milestone: none
Assigned to: nobody

Activity

  1. greenbuildingbrain
    greenbuildingbrain
    • State changed from new to open

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

    ActionController::Session::CookieStore::CookieOverflow

    August 13th, 2009 @ 03:03 PM

  2. greenbuildingbrain
    greenbuildingbrain

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

    August 13th, 2009 @ 03:16 PM

  3. greenbuildingbrain
    greenbuildingbrain

    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.

    August 13th, 2009 @ 04:32 PM

  4. greenbuildingbrain
    greenbuildingbrain

    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!

    August 13th, 2009 @ 05:12 PM

  5. greenbuildingbrain
    greenbuildingbrain

    It seems this bug also existed in certifications.

    August 13th, 2009 @ 05:32 PM

  6. greenbuildingbrain

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.