< Niklaus.20180130-migel-dateformat | Index | Niklaus.20180123-oddb-fixes >>
But first I must fix an error when rebuilding the indices when calling sudo -u apache bundle-240 exec ruby-240 jobs/update_migel_products_with_report
. Added break statements to finish the long lasting loop (4h) early.
Had investigated in my free time the possibility to port odba to use the Ruby gem sequel. After investing around 5 hours I identified a few problems and pushed a preliminary port in https://github.com/ngiger/odba/tree/sequel. Leave the idea for a moment.
Can reproduce the problem on the oddb.org admin command line like this
ch.oddb> search_migel_products('Binde', 'de').first.name -> Bandes élastiques, cohésives ch.oddb> search_migel_products('Binde', 'de').first.name.de -> Elastische Binden, kohäsiv ch.oddb> search_migel_products('Binde', 'de').first.date -> -4712-01-01 ch.oddb> search_migel_products('Binde', 'de').first.name.de -> Elastische Binden, kohäsiv ch.oddb> search_migel_products('34.21.03.01.1', 'de').first.migel_code -> 34.21.03.01.1 ch.oddb> search_migel_products('34.21.03.01.1', 'de').first.name.de -> Elastische Binden, kohäsiv
Now trying to see the same Migel ID via bin/admin of migel
migel> migelids['34.21.03.01.1'].date -> -4712-01-01 migel> migelids['34.21.03.01.1'].name.de -> Elastische Binden, kohäsiv
Looks like we have a problem in the import. Adding a pry statement when setting a date with a year < 0
Pushed two commits Updated to use ydbi 0.5.6. Bumped version to 1.1.6 and Updated test dependencies to get rid of the warnings.
But I see now
NOTICE: table "migel_fulltext_index_de" does not exist, skipping NOTICE: table "migel_fulltext_index_fr" does not exist, skipping NOTICE: table "migel_product_fulltext_index_de" does not exist, skipping NOTICE: table "migel_product_fulltext_index_fr" does not exist, skipping
Why?
Found a procedure
# this ran on Ruby 1.8.6 to get dates from the old database def output_migel_code_and_date(file = 'migelcode_date.dat')
in the server.rb. This outputs a file 'migelcode_date.dat' where all the years are -4712. Now running the other procedure
# this ran on Ruby 1.9.3 to update dates in the new database def update_migelid_date(file = 'migelcode_date.dat')
But I suspect, that we just never called odba_store. Relaunching the importer with a smaller xls file. This seems to work as I get now the correct year for a newly imported id.
migel> migelids['34.21.03.01.1'].date -> -4712-01-01 migel> migelids['34.60.01.00.1'].date -> 2013-01-01
I suspect that our migel import did not work correctly for a long time, as eg. https://ch.oddb.org/de/gcc/migel_search/migel_product/346001001 does not contain the text Verschreibung nur durch Fachärzte für Pädiatrie, Dermatologie und Allergologie
which is present in https://oddb-ci2.dyndns.org/de/gcc/migel_search/migel_product/346001001 and the downloaded CSV/XLS file.
Will evaluate the success of the run tomorrow, as the whole import takes many hours.
We have the following two problems:
As I had experienced problems that no publicity was displayed at all, I will add for testing an additional field "Werbung", which will require no javascript.
The missing right alignment can be fixed via the CSS class welcomeright by adding "float: right" element.
When looking at JavaScript console I find the following error while visiting https://ch.oddb.org/de/gcc/home_migel/
xc message : "adsbygoogle.push() error: No slot size for availableWidth=8" name : "TagError" stack : ""TagError: adsbygoogle.push() error: No slot size for availableWidth=8↵ at sd (https://pagead2.googlesyndication.com/pagead/show_ads.js:1:21130)↵ at td (https://pagead2.googlesyndication.com/pagead/show_ads.js:1:20635)↵ at Xe (https://pagead2.googlesyndication.com/pagead/show_ads.js:1:41677)↵ at https://pagead2.googlesyndication.com/pagead/show_ads.js:1:48452↵ at vc (https://pagead2.googlesyndication.com/pagead/show_ads.js:1:12922)↵ at zc (https://pagead2.googlesyndication.com/pagead/show_ads.js:1:15691)↵ at https://pagead2.googlesyndication.com/pagead/show_ads.js:1:47812↵ at https://pagead2.googlesyndication.com/pagead/show_ads.js:1:48802" __proto__ : Error constructor : ƒ (a) __proto__ : Object
Pushed commit Align right adsense to the right
This was a bad commit. We should not float, but only align to the right. Fixed with commit Fix aligment of welcome left/center/right