view · edit · sidebar · attach · print · history

Index>

20160414-ydim-html

Summary

  • Fix error in YDIM html

Commits

Index

Keep in Mind for work to do
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • I removed on May-27 tests for ix_registrationss, fix_sequences, fix_compositions, fix_packages from test/test_plugin/swissmedic.rb,as he could not find any references for them in the src code. Did I erroneously remove stuff when cleaning up the swissmedic import earlier?
  • The whole test for older/newer Packages must be adapted to xlsx. One must compare the rows (e.g. by creating csv files) and do the same stuff in xlsx!
  • creat gem: task: input=file with ean-codes, standard output show ean-codes + atc-code. Source is Swissmedic Packungen.xlsx or XML.
  • Import via data/medreg_companies.yaml
  • Fix problem with radioactivatum 99m-technetio when parsing Wirkstoffe
  • Fix galenic_forms when parsing swissmedic.xlsx
  • Cleanup generic_type. Replace it everywhere by sl_generic_type and adapt code accordingly.
  • Get updated ATC-codes from EPha for oddb.org, too.
  • Use refdatabase for oddb.org, too.
  • Check whether we should revert the part which touche src/plugin/text_info.rb of commit 17af82ba4d76a5838683411b260de265531f9e74. We should improve test/stub/oddbapp.rb to work similar for update/pointer as the real oddbapp. In this case we would have a good Stub for plugins. May we need a different stub when working with plugins (which create/modify/destroy ODDB-Objects), when in most other cases a very simple stub is sufficient.
  • When a logged in admin user changes an atc_code of a product, the corresponding atc_class must update its sequences, too.
  • Order of entering search type and value should not matter. Both should show long URL with search
  • Remove parser for minifi (but keep the minifi)
  • BSV-Plugin does not send mail. Is it sending two mails at once?
  • remove obsolete pdf_patinfo in model, admin/views

Fix error in YDIM html

Continuing work of yesterday to track down the RangeError. But now I cannot login and I see no error in ydim/ydim-html-output or the apache log. Okay. Fixed by stopping the services, as I let them run in a separate screen.

Now (after the login) I after pressing on the name of customer I get switched to https://ydim.oddb-ci2.dyndns.org/de/debitor/unique_id/3, but there only the list of customers appears. If I press on "Rechnung" I get switched to https://ydim.oddb-ci2.dyndns.org/de/invoices/. Creating a customer is okay, but the new customer is not displayed. After pressing logout or "Offene Rechnungen" the window is repeated. See

Redoing with -rdebug on the command line of ydim-html.

Added breakpoints in the Chromium Developer Tools. They are never reached. I think the dojo-lib is not correctly installed. I have no problem to open https://ydim.oddb-ci2.dyndns.org/resources/javascript/dojo.js. But why are the scripts never run?

I will try to add some debug output in the function sbsm_encode https://ydim.oddb-ci2.dyndns.org/resources/javascript/ydim.js, which contains the following I love to see in code (whether written by me or by other) this function provides an Encoding-Hack. But neither does appear the debug output in the console log in the javascript console nor can I break on it. Same stuff works fine oddb-ci2.dyndns.org. Therefore asking myself what the differences are between the two apache vhosts.

Fixed the link to the Commit-ID by replacing in lib/ydim/html/view/template.rb

-               link.href = 'http://scm.ywesee.com/?p=ydim-html;a=summary'
+               link.href = 'http://scm.ywesee.com/?p=ydim-html/.git;a=summary'

But after I created a new customer and switched to "Rechnungen" I see some output in the console log (for the actived XHR loadin). And I can now break into the javascript debugger in the function reload_list.

Wenn I try to save a customer with a Umlaut I see also a white page.

Tried to force the encoding in htmlgrid/component using string_in_utf8_encoding = Iconv.conv("UTF8", "ISO-8859-14", _to_html(context, @value).to_s) but got the error

==> /var/log/apache2/error_log <==
ydim-html Client Error: Accept-Charset encoding error
CGI::InvalidEncoding
/usr/lib64/ruby/1.9.1/cgi/core.rb:666:in `block (2 levels) in initialize_query'
/usr/lib64/ruby/1.9.1/cgi/core.rb:661:in `each'
/usr/lib64/ruby/1.9.1/cgi/core.rb:661:in `block in initialize_query'
/usr/lib64/ruby/1.9.1/cgi/core.rb:660:in `each'
/usr/lib64/ruby/1.9.1/cgi/core.rb:660:in `initialize_query'
/usr/lib64/ruby/1.9.1/cgi/core.rb:817:in `initialize'
/usr/local/lib64/ruby/gems/2.1.0/gems/sbsm-1.2.5/lib/sbsm/request.rb:41:in `new'
/usr/local/lib64/ruby/gems/2.1.0/gems/sbsm-1.2.5/lib/sbsm/request.rb:41:in `initialize'
/var/www/ydim.ywesee.com/doc/index.rbx:14:in `new'
/var/www/ydim.ywesee.com/doc/index.rbx:14:in `<top (required)>'
/usr/lib64/ruby/1.9.1/apache/ruby-debug.rb:54:in `load'
/usr/lib64/ruby/1.9.1/apache/ruby-debug.rb:54:in `handler'

It looks like we have a bit confusion about which gems we should use. Why is the locally built sbsm 1.2.5 for Ruby 2.1.0 used, when we want the /usr/lib/ruby/site_ruby/1.8/?

Removed manully everything under /usr/local/lib64/ruby/gems/2.1.0. Minimized my Apache confguration to load only oddb-ci2.dyndns.org and ydim.oddb-ci2.dyndns.org.

Cleaned up RubyAddPath declaration in apache2. Now I get the error

ydim-html Client Error: Accept-Charset encoding error
CGI::InvalidEncoding
/usr/lib64/ruby/1.9.1/cgi/core.rb:666:in `block (2 levels) in initialize_query'
/usr/lib64/ruby/1.9.1/cgi/core.rb:661:in `each'
/usr/lib64/ruby/1.9.1/cgi/core.rb:661:in `block in initialize_query'
/usr/lib64/ruby/1.9.1/cgi/core.rb:660:in `each'
/usr/lib64/ruby/1.9.1/cgi/core.rb:660:in `initialize_query'
/usr/lib64/ruby/1.9.1/cgi/core.rb:817:in `initialize'
/usr/lib64/ruby/site_ruby/1.8/sbsm/request.rb:41:in `new'
/usr/lib64/ruby/site_ruby/1.8/sbsm/request.rb:41:in `initialize'
/var/www/ydim.ywesee.com/doc/index.rbx:14:in `new'
/var/www/ydim.ywesee.com/doc/index.rbx:14:in `<top (required)>'
/usr/lib64/ruby/1.9.1/apache/ruby-debug.rb:54:in `load'
/usr/lib64/ruby/1.9.1/apache/ruby-debug.rb:54:in `handler'

Adding some debug outpuitn cgi/core.rb show me the following lines in the white window.

Accept-Charset encoding error
"M\xFCller"
Found: UTF-8

But why the hell does the ruby 1.8 class call the ruby 1.9 CGI? Tried adding a RubyRequire '/usr/lib64/ruby/1.8/cgi.rb' in the apache config for ydim. This did not work, as these require was made way to early in order to start the Ruby 1.9 session. Now hard coding the path into RubyRequire '/usr/lib64/ruby/1.8/cgi.rb'

Now I get the following output in the Chrome-Window when saving a client with an Umlaut

ERROR
/var/www/ydim.ywesee.com/doc/index.rbx:774: superclass mismatch for class Cookie
/usr/lib64/ruby/1.8/cgi.rb:274:in `<top (required)>'
/usr/lib64/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:53:in `require'
/usr/lib64/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:53:in `require'
/var/www/ydim.ywesee.com/doc/index.rbx:4:in `<top (required)>'
/usr/lib64/ruby/1.9.1/apache/ruby-debug.rb:54:in `load'
/usr/lib64/ruby/1.9.1/apache/ruby-debug.rb:54:in `handler'
CODE
#!/usr/bin/env ruby
# index.rbx -- ydim-html -- hwyss@ywesee.com

require '/usr/lib64/ruby/1.8/cgi.rb'
require 'sbsm/request'

#doc = File.expand_path('../../etc/config.rb', __FILE__).untaint
#load doc.untaint
load '/var/www/ydim.ywesee.com/etc/config.rb'

DRb.start_service('druby://localhost:0')

begin
	config = YDIM::Html::Util::CONFIG
	SBSM::Request.new(config.html_url).process
rescue Exception => e
	$stderr << "ydim-html Client Error: " << e.message << "\n"
	$stderr << e.class << "\n"
	$stderr << e.backtrace.join("\n") << "\n"
end
view · edit · sidebar · attach · print · history
Page last modified on April 14, 2016, at 05:04 PM