From: Gustaf N. <ne...@wu...> - 2014-06-19 15:13:36
|
Dear all, i've done some more cleanup, added regression tests for ns_adp_parse, and put version 4.90.6b2 to sourceforge. all the best -gustaf neumann Am 18.06.14 13:14, schrieb Gustaf Neumann: > Dear Andrei, > > many thanks for the report. There was indeed a bug in the code > handling the "-file" flag of ns_adp_parse, and surprisingly, there is > no test case for this in the regression test. Furthermore, OpenACS > uses its own template management using effectively just the string > variant of ns_adp_parse, so we did not notice this. > > Please test the fixes, that i've just committed to bitbucket, these > should solve the problem. I'll add some tests to the regression test > and look into some border cases in the next available time slots. > > best regards > -gustaf neumann > > Am 18.06.14 08:30, schrieb Clinciu Andrei: >> >> Hi, >> >> First of all I want to thank you for providing updates, bugfixes and >> advancing this wonderful web server that supports TCL. It's one of >> the many webservers out there that uses tcl but almost the single who >> is so beautiful and powerful. >> >> For some months (when time allows it), I've been working on a >> specific web framework for naviserver. But now I've stumbled upon a >> sinister error. I had this a while ago with the 4.99.5 server but >> solved it quite quickly. While installing the newest version from >> Sourceforge (I also tried it from bitbucket). >> I get the following rather annoying "parsed/cached TCL /ADP code": >> <%if {[info proc >> adp:/opt/ns/www/176.56.238.107/lostmvc/modules/School/views/clasa/index.adp] >> == {}} { proc >> adp:/opt/ns/www/176.56.238.107/lostmvc/modules/School/views/clasa/index.adp >> {} { uplevel [for { <% set title [mc "Index of %s" [mc Clasa]] dict >> set pageinfo title $title dict set pageinfo breadcrumb " {-url 1 {[mc >> Home]} #} {-active 1 {[mc Clasa]} } " dict set pageinfo menu " { -url >> 1 {[mc Create] [mc Clasa]} [my getUrl create]} { -url 1 -show 0 {[mc >> Admin] [mc Clasa]} [my getUrl admin]} " ns_puts [$bhtml htmltag h1 >> $title] #TODO select only from a specific school -where [list [list >> scoala_id 2]] ns_puts [$bhtml gridView -toSelect [list id an nume >> scoala ] $model [list -relations 1 ] ] %> } {0} {} {}]}} >> adp:/opt/ns/www/176.56.238.107/lostmvc/modules/School/views/clasa/index.adp >> %> >> >> On every page where I use an ns_adp_parse -file >> >> However, the server settings are the same as with my working 4.99.5 >> server. >> >> The following code snippet didn't seem to be the problem earlier, but >> now it just won't work. >> append page [ns_adp_parse -file >> ../views/$controller/$view.adp {*}$vars ] >> ns_adp_include ../views/$layout.adp -pageinfo $pageinfo >> -bhtml $bhtml $page >> >> I had the same problem when both >> ns_param cache true and ns_param enabletclpages >> true (which is now false) were enabled. >> >> A logical next step would be to disable caching OR surround the >> ns_adp_parse with another ns_adp_parse.. and the following happens: >> >> ** >> invalid command name "<%" >> while executing >> "<%" >> (procedure "adp:/opt/ns/www/176.56.238.107/lostmvc/views/user/login.adp" line 2) >> **Is there something wrong with ns_adp_parse that it doesn't do it's >> job right anymore? This means I should remove the <% %> but why? >> The same error seems to occur also when the code is surrounded by an >> ns_adp_eval. >> >> No current workaround found:(. This is really bugging me... >> >> Code seems to work without any problems in the previous version of >> the webserver, what gives? >> >> Any ideas how to fix this? >> >> Should I stick to the old version instead? >> >> Thanks again for the great support! >> >> With regards, >> Clinciu Andrei George >> >> >> "Vorba buna, zambetul si fapta binefacatoare sunt raze ale soarelui >> rasfrante in sufletul omului." >> "A good word, a smile and a good deed are just like rays of the sun >> reflected in man's soul." by Nicolae Iorga >> >> |