view · edit · sidebar · attach · print · history

20120223-update-mail_order_price-debug-errors-oddb_org-update-grid_rb-htmlgrid

<< Masa.20120224-fix-migel-view-atc-overview-oddb_org-drop-crawler-request-sbsm | Index | Masa.20120222-fix-grid_rg-htmlgrid-update-readme-ydpm >>


  1. Fix grid.rb htmlgrid
  2. Debug oddb.org
  3. Check all views with grid.rb
  4. Debug ATC-‹bersicht list

Commits
  1. Added Rose logo pictures in doc/resources/zurrose directory (oddb.org)
  2. Changed default logo directory from doc/resources/logos to doc/resources/zurrose and fixed to add new mail_order_price (oddb.org)
  3. Fix Composite#compose method for grid.rb to work correctly (htmlgrid)
  4. Added th_pathinfo in lookandfeelbase.rb to fix subheader style when grid.rb is used (oddb.org)
  5. Added th_percent_exfactory, th_percet_public in lookandfeelbase.rb for price_history view with grid.rb (oddb.org)
  6. Fix Grid#set_row_attributes method. Debugged ArgumentError: wrong number of arguments (3 for 2) when grid.rb is used (htmlgrid)
  7. Fix Recycle Object Error when home-admin is clicked from Benuter view (oddb.org)
  8. Fix Grid#set_colspan for nil argument (htmlgrid)
  9. Fix lookandfeelbase.rb for grid.rb to work correctly in admin/galenic_group view (oddb.org)

Fix grid.rb htmlgrid

Check

  • fix Grid#add_style

Problem (z.B.)

 module ODDB
   module View
     module Admin
 class LoginForm < HtmlGrid::Form
   COMPONENTS = {
    [0,0]   =>  :email,
    #[0,1]   =>  :pass,
    #[1,2,0] =>  :remember_me,
    #[1,2,1] =>  'remember_me',
    #[1,3]   =>  :submit,
    #[1,4]  =>  :password_lost,
   }
   CSS_MAP = {
    [0,0,2,5] =>  'list',
  • If the 3rd and 4th values of CSS_MAP is added, the CSS_MAP will not be applied.
  • The following looks going well, but the second field of the grid (HtmlGird::Input) does not have 'class'= list' attribute
   CSS_MAP = {
    [0,0] =>  'list',
  • This results in the a little bit narrower look and feel

Commit

Error (with grid.rb)

error in SBSM::Session#to_html: /de/gcc/patinfos/range/a
ArgumentError
wrong number of arguments (3 for 2)
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/grid.rb:288:in `set_row_attributes'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/list.rb:72:in `block in compose_list'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/list.rb:65:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/list.rb:65:in `each_with_index'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/list.rb:65:in `compose_list'

Commit

Debug oddb.org

  • Debugging during checking all the view with grid.rb

Error (both grid.c, grid.rb)

error in SBSM::Session#to_html: /de/gcc/addresses/
NoMethodError
undefined method `time' for #<Array:0x00000007289388>
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:113:in `method_missing'
/home/masa/ywesee/oddb.org/src/view/admin/addresses.rb:46:in `time'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:68:in `create'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:283:in `compose_component'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:212:in `block in compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:205:in `each'

Check data type

  • bin/admin
ch.oddb> address_suggestions.values.map{|ad| ad.class}.uniq
-> [ODDB::AddressSuggestion, Array]
ch.oddb> address_suggestions.values.select{|ad| ad.is_a?(Array)}.length
-> 1
ch.oddb> address_suggestions.values.select{|ad| ad.is_a?(Array)}.first.class
-> Array
ch.oddb> address_suggestions.values.select{|ad| ad.is_a?(Array)}.first.odba_id
-> 28237279
ch.oddb> address_suggestion(28237279).class
-> Array
ch.oddb> delete_address_suggestion(28237279)
-> Array
ch.oddb> address_suggestions.values.select{|ad| ad.is_a?(Array)}.length
-> 0

Note

  • No need to fix source code

Error

  1. login http://oddb.masa.org/de/gcc/login_form/
  2. click Admin->Benuter http://oddb.masa.org/de/gcc/users/
  3. click Admin-Home http://oddb.masa.org/de/gcc/home_admin/
error in SBSM::Session#to_html: /de/gcc/home_admin/
RangeError
0x3fa81888dc90 is recycled object
(drbssl://localhost:9997) /usr/lib64/ruby/1.8/drb/drb.rb:375:in `_id2ref'
(drbssl://localhost:9997) /usr/lib64/ruby/1.8/drb/drb.rb:375:in `to_obj'
(drbssl://localhost:9997) /usr/lib64/ruby/site_ruby/1.8/odba/drbwrapper.rb:70:in `to_obj'
(drbssl://localhost:9997) /usr/lib64/ruby/1.8/drb/drb.rb:1402:in `to_obj'
(drbssl://localhost:9997) /usr/lib64/ruby/1.8/drb/drb.rb:1704:in `to_obj'
...

Commit

Note (for development)

  • methods of View class need two argument, model and session
  • The first arugment, model, comes from the model that is used when the View is created
  • View@model is set generally in the corresponding State class
  • But it seems that the @model of View::PayPalForm comes from the last state class
  • When we go to Benuter view then the State@model is set as DRbObject
  • Sometimes DRbObject causes Recycle Object error when the object is garbage collected from the DRb server.
  • Sometimes @model as the second argument of HtmlGrid object is used but in this case it looks that the @model is not used critically, so I set it as 'nil'

Check all views with grid.rb

  1. Admin
    1. Addressen - pointer url in Datum column
    2. Benuter
    3. Galenik - galenic_group subheader color http://oddb.masa.org/de/gcc/galenic_group/oid/890150
    4. Handelsformen
    5. Indikationen - Error
    6. Patinfo Stat
    7. Sponsor
  2. Arzt
  3. Interaktionen
  4. Medikamente
  5. MiGel
  6. Services
  7. Spital
  8. Zulassungsinhaber
  • Indikationen Error
error in SBSM::Session#to_html: /de/gcc/indications/
TypeError
nil can't be coerced into Fixnum
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/grid.rb:285:in `+'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/grid.rb:285:in `set_colspan'
/home/masa/ywesee/oddb.org/src/view/alphaheader.rb:25:in `compose_header'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/list.rb:49:in `compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:57:in `init'

Commit

Note (to check Ruby load path)

 ruby -e "p $:"

Debug ATC-‹bersicht list

Problem

  • ATC list is not enough

z.B

Note

  • It looks that only the ATC codes of the first page are shown
view · edit · sidebar · attach · print · history
Page last modified on February 24, 2012, at 07:13 AM