[Catalyst] IE6 shows page cannot be displayed
Ascii King
tech at swattermatter.com
Wed Oct 14 15:35:09 GMT 2009
I am having a problem with IE6 not displaying the page after a form has
been submitted. I can call up a form, fill it out, no problem. When I
submit it, I get 'Page cannot be displayed". This works fine in
Firefox, but not IE6. Also, the form data does get written to the
database in both browsers.
I don't have any choice but to use IE6.
It is calling the proper link and it looks like it is supposed to work.
Here is the output from the console. The sub that loads the form is
/prior/new_prior and the page that should load after the form is
submitted is /prior/list_prior
| return_date | 2009-October-17
| return_time | 3:30 am
| submitted | Submit
'-------------------------------------+------------------------------------
[debug] "POST" request for "prior/new_prior" from "127.0.0.1"
[debug] Found sessionid "a4035af645732ec0374b0c6de0cb235a012c4b4d" in cooki
[debug] Restored session "a4035af645732ec0374b0c6de0cb235a012c4b4d"
[debug] Path is "prior/new_prior"
[debug] Catalyst::Controller::HTML::FormFu::Action::FormConfig loading conf
le 'prior/new_prior.yml'
[debug] Redirecting to "http://localhost:3000/prior/list_prior"
[info] Request took 6.334302s (0.158/s)
.------------------------------------------------------------+-----------.
| Action | Time |
+------------------------------------------------------------+-----------+
| /auto | 0.002467s |
| /prior/new_prior | 6.282058s |
| /end | 0.000742s |
'------------------------------------------------------------+-----------'
So, it seems to redirect the page to the list_prior as it is supposed to
but then for some reason, the new_prior is reloaded instead and I get a
page cannot be displayed error.
Here is my code, in case it matters.
=head2 new_prior
Create a Prior Approval application
=cut
sub new_prior : Local FormConfig('prior/new_prior.yml') {
my ($self, $c) = @_;
# load the new record object into the stash
$c->stash->{object} = $c->model('DB::Prior')->new_result({});
# Check permissions
$c->detach('/error_noperms')
unless $c->stash->{object}->create_allowed_by($c->user->get_object);
# Clicked the submit button and the form passed error checking
if ($c->stash->{form}->submitted_and_valid) {
# Force the username into the 'submitted_by' field
$c->stash->{form}->add_valid('submitted_by', $c->user->username);
# Force the status_id to 1
$c->stash->{form}->add_valid('status_id', 1);
# Write the record to the resultset
$c->stash->{form}->model->update($c->stash->{object});
# Update the status message
$c->flash->{status_msg} = 'Record created';
# Redirect to the list_prior page
$c->response->redirect($c->uri_for('list_prior'));
# Escape this subroutine
$c->detach;
# First load or form is reloaded due to failing error checking
} else {
# Re-evaluate the form
$c->stash->{form}->process();
}
# Run the code necessary to rename the repeatable elements to be
compatible with wforms.js
OMTSWeb::Controller::WForm::handle_repeat($c->stash->{form});
# Necessary to handle the hints that work work with wforms.js
OMTSWeb::Controller::WForm::handle_hints($c->stash->{form});
# Set the logo
$c->stash->{given_logo} = '/static/images/library.png';
# Set the title
$c->stash->{given_title} = 'Prior Approval';
# Set the page template that is used
$c->stash->{template} = 'prior/edit_prior.tt2';
}
Someone else seemed to have a similair problem a while back, but there
isn't a resolution.
http://www.mail-archive.com/catalyst@lists.rawmode.org/msg04157.html
More information about the Catalyst
mailing list