Pete Posted June 1, 2012 Share Posted June 1, 2012 I've been noticing this message come up recently at random - sometimes several at a time and sometimes spread out a lot. I updated the wire directory and it still happens, however I was wondering if anyone could shed some light on what it actually means, or suggest a way to determine where the problem is? 2012-05-31 03:36:51 guest http://www.mysite.co.uk/?/ Error Exception: Can't save page 0: : Pages of type NullPage are not saveable (in /home/strategy/public_html/wire/core/Pages.php line 463) It's almost certainly an issue with something I've coded, but for the life of me I can't think where to look and I can't reproduce it myself whether I'm logged in or not. Link to comment Share on other sites More sharing options...
Soma Posted June 2, 2012 Share Posted June 2, 2012 That's a IHNI error. (I Have No Idea) Just guessing. You'r doing some ajax on the page? Comments saving for guests, Poll, ... ? I always wondered where the questionmark comes from "?". Link to comment Share on other sites More sharing options...
Pete Posted June 2, 2012 Author Share Posted June 2, 2012 I found it. Well, the troublesome script at least. I changed this line in wire/core/ProcessWire.php: $logMessage = "Page: $path\nUser: $userName\n\n" . str_replace(" ", "\n", $message); to this: $logMessage = "Request: " . $_SERVER['REQUEST_URI'] . "\nPage: $path\nUser: $userName\n\n" . str_replace(" ", "\n", $message); @ ryan, looking again at the error code in that file, wouldn't it be better if this: $path = ($config ? $config->httpHost : '') . ($page ? $page->url : '/?/'); was actually this: $path = ($config ? $config->httpHost : '') . ($page ? $page->url : $_SERVER['REQUEST_URI']); to potentially give a bit more info, or is there a reason why the fallback is set to /?/? Link to comment Share on other sites More sharing options...
ryan Posted June 4, 2012 Share Posted June 4, 2012 to potentially give a bit more info, or is there a reason why the fallback is set to /?/? $_SERVER['REQUEST_URI'] isn't filtered, at least I don't think it is. Just trying to protect against any possible request injection into the logs. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now