[PageOneX] [dev] Problems after commits about #67 (multiple area selection)
Edward Platt
elplatt at media.mit.edu
Wed Mar 13 10:33:16 EDT 2013
Hi All,
This should be fixed now. This is what was happening:
$('#codes').attr('value') gives the default value of an element and
$('#codes').val() gives the current value. The default value was empty, so
none of the codes were getting assigned when the user selected a value.
-Ed
On Wed, Mar 13, 2013 at 9:18 AM, pablo rey <pablo at basurama.org> wrote:
> Hi everyone,
> Great to see that we are moving forward with the multiple area selection!
> I share with you some bugs, to see if you can reproduce them.
>
> After I updated Ed's yesterday commits, I get the following errors. [I
> dumped the old data base and started from scratch].
>
> I could create a thread. I coded, and although the areas were created,
> they were transparent. After saving and display I got:
>
>
> *ActiveRecord::RecordNotFound in
> CodingController#process_highlighted_areas*
>
> Couldn't find Code with id=
>
> Rails.root: /home/pablo/sites/pageonex
> Application Trace<http://localhost:3000/pablo/qwer_qwer_qwer/process_highlighted_areas#>
> | Framework Trace<http://localhost:3000/pablo/qwer_qwer_qwer/process_highlighted_areas#>
> | Full Trace<http://localhost:3000/pablo/qwer_qwer_qwer/process_highlighted_areas#>
>
> app/controllers/coding_controller.rb:50:in `block in process_highlighted_areas'
> app/controllers/coding_controller.rb:46:in `each'
> app/controllers/coding_controller.rb:46:in `process_highlighted_areas'
>
>
> In the parameters (I highlight in yellow):
>
> ... "ha_name"=>["manila_standard_today-01-03-2013_1"],
> "img_id_manila_standard_today-01-03-2013_1"=>"manila_standard_today-01-03-2013",
> "id_manila_standard_today-01-03-2013_1"=>"0", "code_id_manila_standard_today-01-03-2013_1"=>"",
> "x1_manila_standard_today-01-03-2013_1"=>"164",
> "y1_manila_standard_today-01-03-2013_1"=>"152",
> "x2_manila_standard_today-01-03-2013_1"=>"494",
> "y2_manila_standard_today-01-03-2013_1"=>"481",
> "width_manila_standard_today-01-03-2013_1"=>"330",
> "height_manila_standard_today-01-03-2013_1"=>"329", "deleted_manila_standard_today-01-03-2013_1"=>"",
> "commit"=>"Save and Display",
> "username"=>"pablo",
> "thread_name"=>"zxvc"}
>
>
>
> -----------------
>
> From the thread index, when I open a thread I get:
>
> *NoMethodError in CodingController#display*
>
> undefined method `<<' for nil:NilClass
>
> Rails.root: /home/pablo/sites/pageonex
> Application Trace <http://localhost:3000/pablo/qwer_qwer_qwer/#> | Framework
> Trace <http://localhost:3000/pablo/qwer_qwer_qwer/#> | Full Trace<http://localhost:3000/pablo/qwer_qwer_qwer/#>
>
> app/controllers/coding_controller.rb:154:in `block in display'
> app/controllers/coding_controller.rb:148:in `each'
> app/controllers/coding_controller.rb:148:in `display'
>
> Request
>
> *Parameters*:
>
> {"username"=>"pablo",
> "thread_name"=>"qwer_qwer_qwer"}
>
>
>
> _______________________________________________
> Pageonexdev mailing list
> Pageonexdev at mit.edu
> http://mailman.mit.edu/mailman/listinfo/pageonexdev
>
>
--
Edward L. Platt
Civic Technology Programmer
MIT Center for Civic Media
E15-348
http://civic.mit.edu
http://elplatt.com
@EdwardLPlatt <http://twitter.com/edwardlplatt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/pageonexdev/attachments/20130313/ff78a87c/attachment.htm
More information about the Pageonexdev
mailing list