[ic] 4.9.6 problem with content editing

Duncan McGreggor interchange-users@icdevgroup.org
Mon Jan 6 14:13:01 2003


I did a search on the list archives, but was unable to find anything; I 
can only guess that I've overlooked something...

Interchange is running on RedHat 7.3, perl 5.6.1.

Access to interchange is via another server running mod_proxy 
(server1/duncan/cgi-bin --> server2/cgi-bin).

When trying to edit content in several browsers on Linux, MacOS X, and 
Windows (Netscape 7, IE 5.5, IE 6), every time I hit "publish" or 
"preview" I am logged out and have to log back in. The changes never 
take. Other form operations, such as setting parameters in the admin 
prefs section took just fine.

The entry in the error.log file immediately after this occurs is:
/cgi-bin/pbsinteractive/process.html Runtime error: Must have type and 
name for save_store, args were:  at 
/usr/local/interchange/lib/UI/ContentEditor.pm line 108.

After logging in again, I get a 500 error, and cannot get in unless I 
discard the session info in the URL.

The apache error log shows this, but only infrequently (twice out of the 
many times I have attempted to publish):
File does not exist: 
/usr/local/apache/htdocs/interchange/en_US/[page_param ui_page_image]

Line 108 of ContentEditor.pm reads:
die("Must have type and name for save_store, args were: " . join(" ", @_))
                 unless $type and $name;

and is within the save_page sub. save_page seems to be called from 3 
other places, but I only checked one, in the sub page_editor.

vi +2715 /usr/local/interchange/lib/UI/ContentEditor.pm

I uncommented the '::logDebug' for the page edit in that sub, enabled 
debugging to the icdebug file, restarted ic, and duplicated the 
error-prone process. Here's the output:

UI::ContentEditor:debug: in page_editor, name=index.html

It seems to me that the vars that are claimed to be missing, aren't...?

I then returned to the save_store sub and added the following line right 
before the 'die':

::logDebug("This is from the save_store sub: type=$type, name=$name, 
value=$value");

which output the following:

UI::ContentEditor:debug: This is from the save_store sub: type=page, 
name=index.html, value=HASH(0x95cf170)

In straw-grasping, I set the perms on pages to 777, and all the dirs 
above it are either 755 or 777 (depseration), to no avail.

A note: these logDebugs fire off only when the page is selected (via 
clicking a link) to be edited. Once in the editor, they don't get hit. 
The form points back to this same page, content_editor.html and I don't 
know where to turn next. What follows is the xmp dump in case this is of 
use:

###### SESSION (content_edit) #####
(skipping html)...
      'ui_name' => 'index.html',
      'ui_scratchtype' => {
        'page_title' => 'tmp'
      },
      'ui_template' => 'Yes',
      'ui_source' => 'pages/index.html',
      'page_title' => {
        'label' => 'Page title',
        'width' => '50'
      },
      'ui_display_order' => [
        'page_title', 'members_only'
      ],
      'ui_template_name' => 'leftright'
    },
    'deliver.html' => {
      'ui_page_template' => 'none',
      'ui_page_picture' => undef,
      'ui_values' => {
        'authorized' => '
[userdb
            function=check_file_acl
            location="[scratch deliverable]"
            mode=expire
]'
      },
      'ui_slots' => [
        {}
      ],
      'ui_name' => 'deliver.html',
      'CONTENT' => '[seti authorized]
[userdb
            function=check_file_acl
            location="[scratch deliverable]"
            mode=expire
][/seti][perl products]
    my $auth = $Scratch->{authorized};
    if($auth !~ /1/) {
        Log("Not authorized for $Scratch->{deliverable}, 403");
        $Document->header(\'Status: 403 Not authorized\');
        $Document->hot(1);
        $Document->write(<{deliverable}. Buy it first, please.
EOF
        return;
    }
    my $type     = tag_data(\'products\', \'dl_type\', 
$Scratch->{deliverable});
    my $location = tag_data(\'products\', \'dl_location\', 
$Scratch->{deliverable});
    my $content = $Tag->file("$location"); my $len = length($content);
    if(! $len) {
        Log("Not found: $Scratch->{deliverable} type=$type at $location, 
404");
        $Document->header(\'Status: 404 not found\');
        $Document->hot(1);
        $Document->write(<{deliverable} not found.
EOF
        return;
    }
    $Document->header("Content-Type: $type\\nContent-Length: $len");
    $Document->hot(1);
    $Document->write($content);
    return;
[/perl]
',
      'ui_display_order' => [],
      'ui_template_layout' => [ 'UI_CONTENT'
      ],
      'ui_type' => 'page',
      'ui_scratchtype' => {
        'authorized' => 'seti'
      },
      'ui_source' => 'pages/deliver.html'
    }
  },
  'template' => {},
  'component' => {}
}

###### END SESSION    #####