view · edit · sidebar · attach · print · history

< Niklaus.20180213-doctor-Encoding-CompatibilityError | Index | Niklaus.20180207-lighthouse >>

20180212-changelog-problem

Summary

  • Fix PI Changelog no Method Error
  • Fix some layout issues
  • Refdata-Nat fix Error: Encoding::CompatibilityError
  • Keep in Mind

Commits

Index

Fix PI Changelog no Method Error

Seen when visiting https://ch.oddb.org/de/gcc/show/patinfo/57489/04/044/diff/. This seems very similar to other problems we fixed before, but has a different stack trace.

NoMethodError at /de/gcc/show/patinfo/57489/04/044/diff/
undefined method `package' for nil:NilClass
Ruby	/var/www/oddb.org/src/util/session.rb: in choosen_info_diff, line 292
Web	GET ch.oddb.org/de/gcc/show/patinfo/57489/04/044/diff/
Jump to:
GETPOSTCookiesENV
Traceback (innermost first)
/var/www/oddb.org/src/util/session.rb: in choosen_info_diff
        found = @app.registration(m[1]).sequence(m[2]).package(m[3])...
/var/www/oddb.org/src/state/global.rb: in show
        choosen = @session.choosen_info_diff...
/var/www/oddb.org/vendor/ruby/2.5.0/gems/sbsm-1.5.9/lib/sbsm/state.rb: in _trigger
      self.send(event)...

This should be fixed with commit Avoid nil when sequence or package is no longer valid

Reading http://andreasbovens.github.io/understanding-viewport/

Fix some layout issues

Not all snapback font sizes are equal. We need a single CSS-Style for all Snap-Back font size, also for iOS mobile. We used in this snapback the CSS-style "breadcrumb-2 bold", "breadrumb","breadcrubm-1". In the CSS files I found also a breadcrumb-3 style. Adjusting src code and CSS styles. Done with commit Using a single CSS style breadcrumb for snapbacks

Also we must shorten Patienteninformation to PI and Fachinformation to FI in snapbacks. Here we used the CSS-style th-pointersteps for addresses like http://i.ch.oddb.org/de/mobile/fachinfo/reg/31706, where wi display ch.oddb.org Suchresultat - Fachinformation zu Inderal®. Shortened with commit Shorten FI/PI in pointersteps

Pushed the following commits

Looking at why we have some additional space on the left at https://i.oddb-ci2.dyndns.org/de/mobile/compare/ean13/7680577870027.

We must not display PI for non-active sequences, as they are no longer useable, eg. nothing for sequence 04 and 05 in https://ch.oddb.org/de/gcc/search/zone/drugs/search_query/55297/search_type/st_registration? But on oddb-ci2 I have no error accessing http://localhost:8812/de/gcc/patinfo/reg/55297/seq/04.

Refdata-Nat fix Error: Encoding::CompatibilityError

Plugin: ODDB::Doctors::RefdataNatPlugin

Error: Encoding::CompatibilityError
Message: incompatible character encodings: UTF-8 and US-ASCII
Backtrace:
/var/www/oddb.org/src/plugin/refdata_nat.rb:247:in `block in store_doctor'
/var/www/oddb.org/src/plugin/refdata_nat.rb:242:in `each'
/var/www/oddb.org/src/plugin/refdata_nat.rb:242:in `store_doctor'
/var/www/oddb.org/src/plugin/refdata_nat.rb:345:in `block in parse_xml'
/var/www/oddb.org/src/plugin/refdata_nat.rb:299:in `each'
/var/www/oddb.org/src/plugin/refdata_nat.rb:299:in `each_with_index'
/var/www/oddb.org/src/plugin/refdata_nat.rb:299:in `parse_xml'
/var/www/oddb.org/src/plugin/refdata_nat.rb:112:in `update'
/var/www/oddb.org/src/util/updater.rb:271:in `block in update_refdata_nat'
/var/www/oddb.org/src/util/updater.rb:532:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:269:in `update_refdata_nat'
jobs/import_refdata_nat:14:in `block in <module:Util>'
/var/www/oddb.org/src/util/job.rb:40:in `run'
jobs/import_refdata_nat:12:in `<module:Util>'
jobs/import_refdata_nat:11:in `<module:ODDB>'
jobs/import_refdata_nat:10:in `<main>'

Why do we get this kind of error? Running sudo -u apache bundle-250 exec ruby-250 jobs/import_refdata_nat takes a long time and At item 100000 of 301401 I still have no error, which I wanted to catch with pry statement.

Found the following line on thinpower in /var/www/oddb.org/log/oddb/debug/2018/02.log

2018-02-11 20:03:44 CET RefdataNatPlugin store_doctor update 7601000064998 oid 3384 in database. pointer #<ODDB::Persistence::Pointer:0x00007f54a3bb0a90 @directions=[[:doctor, 3384]]> {"addresses"=>"-Michel Vouilloz,1941 Cries (Vollges),fon,fax\n+Monsieur le Docteur,Michel Vouilloz,Cabinet m\xC3\xA9dical,Le Yucca,1941 Cries (Voll\xC3\xA8ges),fon,027 723 25 00,fax\n"}

This should be enough to create a unit-test.

Thinpower throws the following encoding error when visiting https://ch.oddb.org/de/gcc/search/zone/doctors/search_query/7601000064998?

Encoding::CompatibilityError at /de/gcc/search/zone/doctors/search_query/7601000064998
incompatible character encodings: UTF-8 and US-ASCII
Ruby	/var/www/oddb.org/src/view/doctors/doctorlist.rb: in join, line 54
Web	GET ch.oddb.org/de/gcc/search/zone/doctors/search_query/7601000064998
Jump to:
GETPOSTCookiesENV
Traceback (innermost first)
/var/www/oddb.org/src/view/doctors/doctorlist.rb: in join
			(address.lines + emails).join("<br>")...
/var/www/oddb.org/src/view/doctors/doctorlist.rb: in praxis_address
			(address.lines + emails).join("<br>")...
/var/www/oddb.org/vendor/ruby/2.5.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb: in create
					self.send(component, *args)...
/var/www/oddb.org/vendor/ruby/2.5.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb: in compose_component
				comp = create(component, model)...

But oddb-ci2 displays for https://oddb-ci2.dyndns.org/de/gcc/search/zone/doctors/search_query/7601000064998?

Vouilloz	Michel	027 723 25 00	Monsieur le Docteur
Michel Vouilloz
Cabinet médical
Le Yucca
1941 Cries (Vollèges)

Why do we have this difference?

view · edit · sidebar · attach · print · history
Page last modified on February 12, 2018, at 05:06 PM