---
I still don't get a CSV-file when trying to download the CSV export for Desiting. Tried http://oddb-ci2.dyndns.org/de/gcc/export_csv/zone/drugs/search_query/Desitin/search_type/st_company. Asking myself again. Why the hell don't I get a clear error message from somewhere?
Added more debug statement. But still don't know what is happening.
Debug output looks like this at the moment
Session::active_state ODDB::State::Drugs::Result Session::active_state @persistent_user_input changed to {:flavor=>"gcc", :language=>"de", :drugs=>{}, :search_form=>"plus", :search_query=>"inderal", :search_type=>"st_sequence"} util.session process request /de/gcc/export_csv/zone/drugs/search_query/inderal/search_type/st_sequence Session::active_state ODDB::State::Drugs::Result State::Drugs::Result export_csv creditable? true util.session process request /de/gcc/ajax_swissmedic_cat/reg/31706/seq/02/pack/033 Session::active_state ODDB::State::Drugs::PaymentMethod util.session process request /de/gcc/ajax_swissmedic_cat/reg/31706/seq/02/pack/122 Session::active_state ODDB::State::Drugs::PaymentMethod util.session process request /de/gcc Session::active_state ODDB::State::Drugs::PaymentMethod util.session process request /de/gcc Session::active_state ODDB::State::Drugs::RegisterInvoicedDownload in appdown.html waiting long time util.session process request / Session::active_state ODDB::State::Drugs::RegisterInvoicedDownload
Will continue tomorrow.
Zeno remarked that granting a user download right does not work again. It worked fine till about two weeks ago. Running the command grant_download 'user@example.com', 'oddb2.csv', 17, Time.local(2015,9,30)
worked fine in bin/admin, but the resulting link does not work
http://ch.oddb.org/de/gcc/download/invoice/id/email/user@example.com/filename/oddb2.csv@@.
With my commit https://github.com/ngiger/oddb.org/commit/d8f6383bd0256bfbf2f0a33265231283ad52b06d Fix ajax search from September 15 I changed various stuff on how the persistent user input is maintained. I suspect this to break things like a grant download. Therefore I will try the following steps:
But first I delete some no longer used local and remote branches. Created new branch grant_download and added all newer watir tests. Running them. They pass.
When testing locally under oddb-ci2 with bin/admin
ch.oddb> grant_download 'email@domain.com', 'oddb.csv', 17 -> http://ch.oddb.apache.org/de/gcc/download/invoice/32356772/email/email@domain.com/filename/oddb.csv
I see that the command returns a wrong URL with ch.oddb.apache.org instead of http://oddb-ci2.dyndns.org/de/gcc/download/invoice/32356772/email/email@domain.com/filename/oddb.csv. When using the corrected URL http://oddb-ci2.dyndns.org/de/gcc/download/invoice/32356772/email/email@domain.com/filename/oddb.csv the download worked. Now creating a watir tests is a little bit more complicated as it involves a bin/admin
command. Adding a helper function for this in spec/spec_helper.ch. Added new file spec/download_spec.rb which runs fine.
Now cherry-picking spec/download_spec.rb and running spec/download_spec.rb again. Running spec/download_spec.rb is still without failures. Testing it manually (with oddb.csv) works, too.
Okay. I suspected the wrong commit. The next suspicious commit is https://github.com/ngiger/oddb.org/commit/ee60861a788e88dc15aa4c5b87889cccb3d7d779#diff-6. Cherry-picking and testing it, too. And now running the new watir tests fails! Great! Now must find a way on how to able to checkout via paypal and granting via bin/admin to work. Fix the part of above mentioned patch to make spec/download_spec.rb pass. Running all watir tests to look for side effects. I can explain all of the 7 failing tests with either (in branch master but not yet in branch grant_download) or broken in master.
Therefore I am switchting back to master and cherry-picking the changes from grant_download. Pushed commits:
Pulled the changes on thinpower. Restarted ch.oddb and the link works fine again.