apeisa Posted May 22, 2012 Share Posted May 22, 2012 (edited) Not sure if I am dreaming here, but was'n page creating in API working with just title at some point (it created name automatically from title). I just updated one project to latest and my "used to work nicely" code now cries: Error Uncaught exception 'WireException' with message 'Can't save page 0: /asiasanat//: It has an empty 'name' field' in /data/www/testi.potilaanlaakarilehti.fi/doc/wire/core/Pages.php:463 Code that used to work and now doesn't is: $t = new Page(); $t->template = $templates->get("tag"); $t->parent = $pages->get(1011); // 1011 => /asiasanat/ $t->title = $tag; $t->save(); Fix is of course simple, but I used to like this shorter way to create pages... EDIT: Never mind, it does work. It doesn't work if your $tag is actually empty string... Edited May 22, 2012 by apeisa 2 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