Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
WanWizard
a.k.a. WanWizard
Discussions
4
Comments
8242
Activity
Unescaping whole ORM object.
You pass it with 'false' as third argument, so the View class will not encode the entire object. So something else must be modifying it.
Comment by
WanWizard
June 2013
permalink
Disable sessions
The Session class initializes upon load. If you don't autoload it (in always_load in the config) but for example load it in the base controller of your backend, then there's no session in the frontend.
Comment by
WanWizard
June 2013
permalink
2 Questions for Ormauth
In Simpleauth, you only have two levels of permissions, so you can check for "blog.read" or "comments.[read,write]". Ormauth adds an extra level to that, while maintaining compatibility with Simpleauth. In our applications, &qu…
Comment by
WanWizard
June 2013
permalink
Problem removing /public/index.php
The default installation requires your webserver docroot to point to the public directory. The issue here is that you've installed FuelPHP inside the docroot, which makes /public part of the path. http://fuelphp.com/docs/installation/instruct…
Comment by
WanWizard
June 2013
permalink
Ormauth : Example permission ?
\Cache::delete_all() deletes an entire tree.
Comment by
WanWizard
June 2013
permalink
Can Session Retain Object?
Storing custom objects in the session is quite complicated. You get "PHP_Incomplete_Class Object" if you try to deserialize an object, but the class isn't know (isn't loaded). So you need to load Model_Object before the sessio…
Comment by
WanWizard
June 2013
permalink
routing - backend/module
In the end, everything is php, including your routes.php config file. So what you could do is add a config file called 'globalroutes.php' to every module. Then in your global routes.php, get the list of loaded modules, loop over them, inc…
Comment by
WanWizard
June 2013
permalink
Disable sessions
What do you mean by "disable sessions"? If you call the Session class, it will be used. What you can do is disable the session cookie from being created on the response. If you want to do that per request, you need to call set_config(…
Comment by
WanWizard
June 2013
permalink
Can not create a user 'unknown column group_id'
It's a bug. There's a typo at line 257 in auth/classes/auth/login.php, it should say 'group' there instead of 'group_id'. I've pushed a fix for this to 1.7/develop. You can just change this locally.
Comment by
WanWizard
June 2013
permalink
Using composer packages with FuelPHP
Correct.
Comment by
WanWizard
June 2013
permalink
My model doesn't want save related
Ah, ok. All I can suggest then is to see if you can switch to 1.6.1 for the core and all packages, and see if that solves it. Only alternative is to dive into the code of the save() method of orm/classes/manymany.php, and see if you can determine…
Comment by
WanWizard
June 2013
permalink
Log Levels
It was designed like that over two years ago, and can't be changed now without breaking existing applications that use this order. And it's a very common order, we've switched to Monolog as our logging engine per v1.5, and that defin…
Comment by
WanWizard
June 2013
permalink
Ormauth : Example permission ?
actions is a serialized indexed array with zero or more actions, so it should contain serialize(array('read')) Just tested it here, and tested a user with a Super Admin role, and I get full access? Does this user have a permission assign…
Comment by
WanWizard
June 2013
permalink
My model doesn't want save related
Is there something top-secret to what you do? If not, you can zip your entire install (and a database schema dump if you don't use migrations), and mail it to me (or a link where I can download it), wanwizardfuelphp.com. If I can't repro…
Comment by
WanWizard
June 2013
permalink
My model doesn't want save related
hmm... Tried that here too, but with both cascades set to false, it still inserts the junction record.
Comment by
WanWizard
June 2013
permalink
Validation of some fields
You can just add the field to the validation object. As long as you don't add the rule "required", it will pass if the value isn't posted. If you have more complex forms, it's worth looking at fieldsets, which allows you to…
Comment by
WanWizard
June 2013
permalink
routing - backend/module
That line in the documentation refers to module level routing. It says that if you define a config/routes.php in your page module, all URI's you want to match (the left-hand side) must start with 'page'. If not, the initial request…
Comment by
WanWizard
June 2013
permalink
Validation of some fields
Assuming you're used hand-coded forms, and only use a validation object, you can do it like this. But the if isn't really needed, as long as you don't put a required rule on it, it's ok if the value isn't there.
Comment by
WanWizard
June 2013
permalink
Using composer packages with FuelPHP
Ah, you're making wrong assumptions. Composer packages !== FuelPHP Packages. A composer package (I prefer the name library) is just a directory structure, containing classes in a folder, and composer provides an autoloader to be able to load t…
Comment by
WanWizard
June 2013
permalink
My model doesn't want save related
One last straw to hold on to: couldn't it be that because of the fact that you have two existing objects, none of which has any changes, the "cascade_save = false" on your Posts->Tags relation causes it to skip the entire save op…
Comment by
WanWizard
June 2013
permalink
My model doesn't want save related
Absolutely weird. I can not explain it. Your code works here. You're sure Input::post('tag') returns something useful? The last thing I can think of...
Comment by
WanWizard
June 2013
permalink
My model doesn't want save related
I tried this exact code here (using my two test models), and the result is a success, the junction record is inserted on save without problems. How about the relation definition in Model_Tag? Is that there, and correct? Relations have to be defined…
Comment by
WanWizard
June 2013
permalink
My model doesn't want save related
One other thought: is the ORM package you use also v1.5? Or maybe older?
Comment by
WanWizard
June 2013
permalink
My model doesn't want save related
Which is exactly like the test code I posted above, and which works fine here? Is this an existing application? Is upgrading to 1.6.1. an option (or at least test that bit of code in 1.6.1. to see if you still have it)? I'm still puzzled, and…
Comment by
WanWizard
June 2013
permalink
Introducting PDF Package for Fuel.
Maybe the html conversion has an isue with page overflow? I personally don't know, I always generate PDF's by hand, I don't use the HTML conversion.
Comment by
WanWizard
June 2013
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
WanWizard
Joined
January 2011
Visits
2,368
Last Active
11:45PM
Roles
Administrator