Jump to content

404 Page Not Found Error When Saving Edits to an Existing Page


srbobc
 Share

Recommended Posts

The page is live; it shows in the Page list.  When attempting to save edits to the page, instead of getting the pw success message, I get the 404 page not found page. 

This page in question cannot be deleted, moved, edited...nada.

Page edit takes me to: http://www.mydomain.com/processwire/page/edit/?id=5772

When I attempt to save the edits the address bar still says:

http://www.mydomain.com/processwire/page/edit/?id=5772 but it displays the 404 Page Not Found page and changes are not saved.

I am able to edit all other pages on the site.  This is the only one that cannot be edited or deleted.  Is this strange?  Any ideas?

Link to comment
Share on other sites

This is one I've not heard of before, but I'm guessing some error is occurring that's getting thrown by PageEdit and then misinterpreted by PageRender.

Which version of ProcessWire? 2.0 or 2.1? The following applies regardless of version, but this might help me to determine the source of the problem.

Can you edit /site/config.php and find the line with $config->debug = false, and set it to true.

Try to perform the page save again and see if you get any other error messages. If there's anything revealing post here. Otherwise, edit one of your site's existing template files and add this temporarily at the top:

<?php
echo "<pre>";
$p = $pages->get(5772);
if($p->id) {
    echo "\n{$p->path}\n{$p->status}\n{$p->template}"; 
    $p->setOutputFormatting(false); 
    $p->status = Page::statusOn; 
    $p->title = $p->title . " (test)";
    $p->save();
    echo "\nSaved page\n";
} else {
    echo "\nUnable to load page\n";
} 
return;

Now view the page using the template where you pasted that. What does it say? If it appears to have saved the page successfully, try and edit again in the admin and see if you still run into the 404 error?

Thanks,

Ryan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...