view · edit · sidebar · attach · print · history

Index>

20140324-fix-ajax-search

Summary

  • Fix Ajax search on chrome and Internet explorer
  • Fix home_interactions without trailing slash

Commits

Index

Keep in Mind
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • Search nach Anwendung (indications), z.B. Konjunktivitis, does not report all occurrences in the section "Anwendung" of Fachinfo. Probably index is corrupted or not set up correctly.
  • Error: Patents with could not connect to www.swissreg.ch: #<Net::HTTPInternalServerError:0x007f8a7d69bb58>
  • vagrant-oddb.org: cleanup installation for yus with ruby 1.8, logrotate.conf and local vhosts for tests

---

Installation of some desktop programs

After adding the desktop flavour, I ran an emerge sync and installed the newest chromium, libreoffice and virtualbox packages.

Fix home_interactions without trailing slash

Zeno remarked that links like http://just-medical.oddb.org/de/just-medical/home_interactions don't go into interactions. Problem was, that we expected a match with "home_interactions/" instead of "home_interactions". Fixed locally.

See

Fix Ajax search on chrome and Internet explorer

When running the spec/rezepte_and_instantsearch_spec.rb with chrome I get the following error msg

  2) ch.oddb.org should have a working instant search
     Failure/Error: inhalt = @browser.text
     Selenium::WebDriver::Error::StaleElementReferenceError:
       stale element reference: element is not attached to the page document
         (Session info: chrome=32.0.1700.123)
         (Driver info: chromedriver=2.9.248304,platform=Linux 3.12-0.bpo.1-amd64 x86_64)
     # ./spec/rezept_and_instantsearch_spec.rb:121:in `block (2 levels) in <top (required)>'

Does this have a relation with my last change to reload the top frame?

Looked around with google to find results for my problem and found http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready.

First try to use domReady! did not change. Single-stepping the watir tests I remark, that (when adding a medicament) after pressing :enter in the interaction_searchbar I get the following error output via bin/oddbd

error in SBSM::Session#process: /de/gcc/ajax_add_drug/state_id/69962037656740/ean/7680626300048
NoMethodError
undefined method `request_path' for #<Hash:0x007f429cc64068>
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:365:in `process'
/var/www/oddb.org/src/util/session.rb:125:in `process'
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:172:in `block in drb_process'
<internal:prelude>:10:in `synchronize'
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:171:in `drb_process'

I must rethink how the state and the URL coexist. I think adding a new medicament should not change the state-id, but should change the URL. How to accomplish this?

After struggling a lot with regular expressions in ruby/javascript, generating javascript I have a state where URL starting with rezept/ and home_interaction work fine. However the main instant search does not work anymore. Also I still get errors in the drb like

Prescription.init ean13  path ist /de/gcc/rezept/7680517950680,7680586430045
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:367:in `process'
/var/www/oddb.org/src/util/session.rb:128:in `process'
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:172:in `block in drb_process'
<internal:prelude>:10:in `synchronize'
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:171:in `drb_process'
/usr/lib64/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
/usr/lib64/ruby/1.9.1/drb/drb.rb:1508:in `perform'
/usr/lib64/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
/usr/lib64/ruby/1.9.1/drb/drb.rb:1582:in `loop'
/usr/lib64/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'

Maybe I should revert changing rezept/ean URL to rezept. In any case I switch to a different branch to be able to create smaller commits.

view · edit · sidebar · attach · print · history
Page last modified on March 25, 2014, at 07:47 AM