Verifying the problem via bin/admin
ch.oddb> registration('43788').sequence('01').packages.keys -> ["019", "027", "035", "051", "078", "086"] ch.oddb> registration('43788').sequence('01').active_packages.collect{|x| x.ikscd} -> ["019", "027", "035", "051", "078", "086"] ch.oddb> registration('43788').sequence('01').active_packages.collect{|x| x.patinfo} -> [nil, nil, nil, nil, nil, nil] ch.oddb> registration('43788').sequence('01').active_packages.collect{|x| x.pdf_patinfo}[3..-1] -> ["43788_01_1450447469.4481595.pdf", "43788_01_1450447469.4481595.pdf", "43788_01_1450447469.4481595.pdf"] ch.oddb> registration('43788').sequence('01').active_packages.collect{|x| x.pdf_patinfo}.sort.uniq -> ["43788_01_019_1411463987.7279027.pdf", "43788_01_027_1411464368.464347.pdf", "43788_01_035_1411464413.2460468.pdf", "43788_01_1450447469.4481595.pdf"] ch.oddb> packages.find_all{|x| x.iksnr if x.pdf_patinfo}.uniq.collect{|x| x.iksnr}.sort.uniq.size -> 793 ch.oddb> packages.find_all{|x| x.iksnr if x.pdf_patinfo}.uniq.collect{|x| x.iksnr}.sort.uniq.first -> 00274 ch.oddb> packages.find_all{|x| x.iksnr if x.pdf_patinfo}.uniq.collect{|x| x.iksnr}.sort.uniq.last -> 62517
Okay. We have 1 sequence, and 4 different pdf_patinfos. Looking whether we found any entries about this IKSNR in the logs.
/var/www/oddb.org $ grep -w 43788 log/oddb/debug/2015/12.log 7680437880197: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/019 7680437880272: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/027 7680437880197: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/019 7680437880272: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/027 7680437880197: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/019 7680437880272: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/027 2015-12-11 11:12:56 +0100: deactivate_not_found_package check "43788". 1 @deletes_packages 7680437880197: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/019 7680437880272: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/027
Looking at which pdf_patinfos we have for this IKSNR I found
ls -lrt doc/resources/patinfo/43788_01_* -rw-r--r-- 1 apache users 183894 6. Jun 2013 doc/resources/patinfo/43788_01_019_1370512259.7614565.pdf -rw-r--r-- 1 apache users 183894 6. Jun 2013 doc/resources/patinfo/43788_01_027_1370512300.0050821.pdf -rw-r--r-- 1 apache users 183894 6. Jun 2013 doc/resources/patinfo/43788_01_035_1370512331.042756.pdf -rw-r--r-- 1 apache users 183894 6. Jun 2013 doc/resources/patinfo/43788_01_043_1370512363.2697334.pdf -rw-r--r-- 1 apache users 183894 6. Jun 2013 doc/resources/patinfo/43788_01_019_1370512775.971024.pdf -rw-r--r-- 1 apache users 905396 23. Sep 2014 doc/resources/patinfo/43788_01_019_1411463987.7279027.pdf -rw-r--r-- 1 apache users 905396 23. Sep 2014 doc/resources/patinfo/43788_01_027_1411464368.464347.pdf -rw-r--r-- 1 apache users 905396 23. Sep 2014 doc/resources/patinfo/43788_01_035_1411464413.2460468.pdf -rw-r--r-- 1 apache users 905396 23. Sep 2014 doc/resources/patinfo/43788_01_043_1411464448.9976964.pdf -rw-r--r-- 1 apache apache 112962 18. Dez 15:01 doc/resources/patinfo/43788_01_1450447279.6197457.pdf -rw-r--r-- 1 apache apache 112962 18. Dez 15:04 doc/resources/patinfo/43788_01_1450447469.4481595.pdf diff doc/resources/patinfo/43788_01_1450447279.6197457.pdf doc/resources/patinfo/43788_01_1450447469.4481595.pdf
The last two documents are correct. There it looks like the admin page which updates these links does not work correctly. Looking for the reason.
de/gcc/search/zone/drugs/search_query/43788/search_type/st_registration?#best_result only offers a Fachinfo-Upload and to a Patinfo-Upload. Why?
Also I look as I had this problem already once see 20140923-add-tramal-pi. Looking at the watir tests. It only checks, that we could upload a patinfo (which was also the case here), but it does not check, whether all packages got the same PDF. Improving the watir tests to make it fail. Done. The error is clearly shown.
I just fixed the problem with a bin/admin script, as uploading a PDF-Info seems to work only for some sequences. Verified that it worked after a restart too (only on oddb-ci2)
ch.oddb> registration('43788').packages.each{|x| x.pdf_patinfo = '43788_01_019_1450704759.3112497.pdf'; x.odba_isolated_store} -> Array ch.oddb> registration('43788').packages.collect{|x| x.pdf_patinfo}.uniq -> druby://localhost:10000 - #<Errno::ECONNREFUSED: Connection refused - connect(2)> ch.oddb> registration('43788').packages.collect{|x| x.pdf_patinfo}.uniq -> ["43788_01_019_1450704759.3112497.pdf"]
To minimize the displayed amount we don't emit the full FI, only point to the link. This looks like an easy task. Made a small change. Now running obs/update_textinfo_swissmedicinfo --target=fi
before looking at /de/gcc/rss/channel/fachinfo.rss
again.
Fixed with commit Minimize fi-rss-feed
Zeno noticed that the checkout for a power user did not work correctly for de.oddb.org. After some bin/admin commands his problems vanished. The commands were
503 sudo -u apache ruby -rubygems /usr/bin/yus_show demouser@gmail.com 516 sudo -u apache ruby -rubygems /usr/bin/yus_grant demouser@gmail.com login org.oddb.de.PowerUser 522 sudo -u apache ruby -rubygems /usr/bin/yus_grant demouser@gmail.com view org.oddb.de 523 sudo -u apache ruby -rubygems /usr/bin/yus_show demouser@gmail.com ["demouser@gmail.com", ["login", [["org.oddb.de.PowerUser"]]], ["set_password", [["demouser@gmail.com"]]], ["view", [["org.oddb"], ["org.oddb.de"], ["org.oddb.de.PowerUser"]]], ["CompanyUser", "PowerUser"]]
Looking at our watir test whether the checks are correct or not.
But first I want to be able to run all unit tests of oddb.org under Ruby 2.x. There is a problem, that removing the LEGACY_INTERFACE = true from lib/htmlgrid/template.rb broke a lot of unit tests for views under oddb.org. Therefore reverting to use it agains.
Must remove references to rpdf2txt and support for parsing ydocx