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
8243
Activity
Use NestedSets for category ?
You're welcome. ;-)
Comment by
WanWizard
September 2013
permalink
Sessions stopped working again! Need help setting up VirtualHost
Sessions should work out of the box, as long as you have a valid hostname. There is nothing you have to configure to make it work. Do you autoload (always_load) the Session class, or load it manually?
Comment by
WanWizard
September 2013
permalink
ORM Transactions
ORM doesn't have any built-in transaction methods, other then on save(), to put related updates into a transaction. You can wrap your ORM calls into a transaction manually using http://bin.fuelphp.com/snippet/view/oA
Comment by
WanWizard
September 2013
permalink
Views in Modules
If you're in a module controller that was routed to, that should work just fine.
Comment by
WanWizard
September 2013
permalink
Sessions not working!
Kool... eh... Cool! ;-)
Comment by
WanWizard
September 2013
permalink
Use NestedSets for category ?
Nested sets is a mechanism to store tree structures in a flat list, see http://en.wikipedia.org/wiki/Nested_set_model for an explanation. If your catagory structure is a tree (which it probably is), then the answer is yes.
Comment by
WanWizard
September 2013
permalink
Sessions not working!
localhost is an illegal hostname, as per RFC. You should never use it, as more and more browsers are becoming more RFC compliant and will reject the cookie. Ideally you should work with virtualhosts with a valid hostname, ending on ".local&quo…
Comment by
WanWizard
September 2013
permalink
Users
Thought so. Thanks for confirming it!
Comment by
WanWizard
September 2013
permalink
How to external validation rules
You could make it a lot simpler if you move those files out of /classes (they are not classes), and into /config/rules (for example). That would allow you to use the Config class to load and access them, instead of having custom code to load the fi…
Comment by
WanWizard
September 2013
permalink
Why is Fuel so popular in Japan?
Biggest problem on our side is time, so we absolutely welcome such initiatives. Let us know if you need any assistance.
Comment by
WanWizard
September 2013
permalink
Users
And did you have to do anything special to get it to work?
Comment by
WanWizard
September 2013
permalink
Ajax file upload session crash
Ok, thanks for the feedback.
Comment by
WanWizard
September 2013
permalink
How to external validation rules
An abstract class doesn't really help you, since you can't do anything with it. You need a validation instance, and you need to define rules on that instance. My example can be used like so: $val = \Validationrules::define(array('us…
Comment by
WanWizard
September 2013
permalink
How to external validation rules
Yes, then I misunderstood the question. You want to store your rules somewhere? Or you want a generic ruleset? You can do that in any ordinary class: class Validationrules { public static function define($fields = array(), $instance = null)…
Comment by
WanWizard
September 2013
permalink
How to external validation rules
This is documented here: http://docs.fuelphp.com/classes/validation/validation.html#extending_validation So there are two options: - extend the Validation class in your app/classes, and add your global validation rules to it - create a separate cla…
Comment by
WanWizard
September 2013
permalink
Ajax file upload session crash
It might be an issue with session key rotation. By default, as a security measure, the session key rotates every 5 minutes. The system has a recovery mechanism to recover from a just-expired key, but it can't look further back (that would def…
Comment by
WanWizard
September 2013
permalink
Can I create mock objects for use in my application?
Are you using Simpleauth or Ormauth? In case of Ormauth, the Auth package provides all required ORM modules. Ormauth also doesn't use the profile_fields column, it has a separate metadata table used as an EAV container, which means $object->…
Comment by
WanWizard
September 2013
permalink
Validation - unique value check
You can't really do that using a validation rule, since those rules validate a value in isolation. Solving this would require a hack, one way or another, because you need to pass DB or ORM info to it, and a PK if it's an existing record.…
Comment by
WanWizard
September 2013
permalink
Can I create mock objects for use in my application?
Assuming that User extends \Orm\Model, it requires a $_properties array that defines the column 'name'. If not, it will not be seen as a data property.
Comment by
WanWizard
September 2013
permalink
Get a route to module from app
Module routes are only loaded when the router routes a request to a controller in that module. So they are only available inside the module.
Comment by
WanWizard
September 2013
permalink
Auth -> changing email address
The Auth drivers only store the username used to login, and the login hash. If you change that, it's obvious that the login session is no longer valid. You can call force_login() using the users' id after the change to re-login with the n…
Comment by
WanWizard
September 2013
permalink
Ridiculous PHP errors
I'm clueless...
Comment by
WanWizard
September 2013
permalink
Ridiculous PHP errors
BTW, Fuel 1.6 doesn't have a Log package, so if you're on 1.6, and you have an active Log package, you're in for problems anyway. Delete the package, and remove any reference from it always_load. 1.6 uses Composer to install the Mon…
Comment by
WanWizard
September 2013
permalink
Ridiculous PHP errors
This is very weird, because the ORM caches all objects. So if you do a var_dump($foo, $bar), you'll see two identical objects (note the object reference number). Your stackoverflow post suggests that altough you get the error when you echo $…
Comment by
WanWizard
September 2013
permalink
Problems with soft delete
Which Fuel version? Could you upgrade the ORM package to 1.7/develop and see if it's still broken? There are quite a few bugs fixed since 1.6.
Comment by
WanWizard
September 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,389
Last Active
7:06PM
Roles
Administrator