Jump to content

new page problem


benbyf
 Share

Recommended Posts

I would love processwire to work for me but i continuously has problems - the latest is adding a child page of 'home' it gives me an odd error after filling in the name form

- Can't save page 0: /0/: It has an empty 'name' field

I'm running on 34sp.com servers - installation passed most of teh checks other than not being able to determine server type and finding mod_rewrite on.

Any ideas would be great, thanks.

Link to comment
Share on other sites

Are you doing this from the admin or from the API? If from the API, what it's telling you is that you need to populate $page->name before saving it.

But it sounds like you are in the admin, so it is a strange error to see when adding a page in the admin.  What is the name you trying to give the page? The only instance I can think of where you might get this error is if the page name you are trying to use is a reserved word. Also you mentioned some other problems - Can you describe them further?  If there is something environment specific, the more we know, the better chance we can track down what's going in in this environment. Since the installer couldn't detect the server type or mod_rewrite, that indicates potential incompatibility. A link to phpinfo may be helpful too (feel free to PM it to me if you prefer).

Thanks,

Ryan

Link to comment
Share on other sites

your right, it was in the admin section. the page was 'Latest News' and the name field was filled in automatically as 'latest-news'. But as I mentioned I seem to get errors alot, but I'll put them up when incounted again.

thanks

Link to comment
Share on other sites

Definitely not a reserved-word problem with a name like "latest-news". I think we must be running into some kind of incompatibility with your server or it's version of PHP. Do you know what version of PHP is running on the server? One thing you can do is upload a file called phpinfo.php with nothing in it but this:

<?php phpinfo();

Then load the URL you uploaded that file to in your browser, and PM me the link or send a PDF/screenshot of the result to me.

Link to comment
Share on other sites

I went to create a new page with the name "0" (zero). You are right that PW didn't like it. Though the error I got was different than the one previously posted here (see screenshot). But the problem is in how PW checks to see if it has a value:

if(!$page->name) $this->error("missing the name field");

I'm changing it to:

if(!strlen($page->name)) $this->error("missing the name field");

This is fixed in the latest commit: https://github.com/ryancramerdesign/ProcessWire/commits/

Thanks,

Ryan

post-1-132614277353_thumb.png

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...