Forum OpenACS Q&A: Edit-This-Page within a subsite, Tcl install

I have two related questions.

First, I have a server that has a private subsite, let's say at http://serverroot.org/mysubsite. Only members of a particular group can access the subsite.

If I put a new edit-this-page instance within this subsite (say, /mysubsite/myetpinstance), it has the strange behavior that I can't create sub-folders---trying to do so results in one of those ubiquitous "Query was not a statement returning rows" errors. Actually, it will create the sub-folder, and that will show up in the site-map. But it won't show up from .../myetpinstance until I then make an external link to it. And, when you select the link to .../myetpinstance, it gives you the same sort of DB error. (I'll put the full text of that error at the end of this message.)

The only work-around seems to be that I have to make subsites for every spot where I want to have a sub-folder. I would rather reserve the subsite package for a bonafide subsite (with its own groups, permissions, themes, etc.), and inside it to use the ETP package exclusively.

The other piece of information that might or might not be relevant is that I've got cloaked forwarding from my registrar, since I'm sharing the IP with another server.

So, first question: Is this a bug?

Second question: When I built AOLserver, I also built Tcl from scratch, using the Tcl sources from www.tcl.tk. Recently I read in the AOLserver documents that I should instead use the Tcl that is bundled with AOLserver. I haven't attempted to make the change. Question: Are errors such as what I described above attributable to my use of the wrong Tcl? Or, why kinds of errors _could_ arise from using the wrong Tcl?

Thanks for your help. Below is the full DB error. The subsite is "serverroot.org/asubsite". The etp instance is "/asubsite/docs". I am trying to create the subfolder "/asubsite/docs/procedures".

Shawn Harrison

Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR:  -20000: This folder does not allow subfolders to be created

SQL:
select content_folder__new('procedures', 'Editorial Procedures', '', coalesce(etp__get_folder_id('699'), NULL));

    while executing
"ns_pg_bind 0or1row nsdb0 {
select content_folder__new(:name, :title, '', coalesce(etp__get_folder_id(:parent_package_id), NULL));
}"
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql"
    invoked from within
"db_exec 0or1row $db $full_statement_name $sql"
    invoked from within
"if {[regexp -nocase -- {^\s*select} $test_sql match]} {
            ns_log Debug "PLPGSQL: bypassed anon function"
            set selection [db_exec ..."
    ("uplevel" body line 6)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle db {
        # plsql calls that are simple selects bypass the plpgsql
        # mechanism for creating anonymous functions (OpenACS - ..."
    (procedure "db_exec_plsql" line 13)
    invoked from within
"db_exec_plsql create_folder """
    invoked from within
"set folder_id [db_exec_plsql create_folder ""]"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $transaction_code "
    (procedure "db_transaction" line 39)
    invoked from within
"db_transaction {
    set folder_id [db_exec_plsql create_folder ""]
    db_dml set_folder_package ""
    etp::make_page "index" $title
    }"
    invoked from within
"if { $site_node_url == "/" } {
    # -100 is the magic number for the "root folder".
    set folder_id -100
    db_transaction {
    db_dml set_folder_pa..."
    ("uplevel" body line 22)
    invoked from within
"uplevel {
          # /packages/edit-this-page/www/etp-setup-2.tcl

ad_page_contract {
    @author Luke Pond (mailto:dlpond@pobox.com)
    @creation-date 2001-0..."
    (procedure "code::tcl::/web/edittoolsnet/packages/edit-this-page/www/etp..." line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
    $handler
      } ad_script_abort val {
    # do nothing
      }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
    rp_serve_abstract_file "$root/$path"
    set tcl_url2file([ad_conn url]) [ad_conn file]
    set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..."

Collapse
Posted by Sean Harrison on
One more thing: I realized that I didn't specify my OpenACS. I'm using 4-6-3 with PSQL 7.2.4.

Shawn

Collapse
Posted by Brad Ford on
Hi Shawn,

I had the same problem with the same situation but I have a static ip and pretty much a normal install of 4.6.3 with pg 7.3.2 (or is it 7.3.3...). I haven't gotten around to posting about it or digging into the error but I can at least say that there's no mention of it in bugtracker or in the forums as far as I can tell - just the problem where mounting at a folder called etp craps out. Not much help but at least verifies your problem.