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