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
Random Session Destructions
Thanks. If there is a bug we need to fix it, sessions are essential to most applications.
Comment by
WanWizard
April 2013
permalink
Routing fails with UPPERCASE characters
FuelPHP routing is case sensitive by default, TOKEN !== token. You can make routing case insensitive in your application config file, in the routing section. See fuel/core/config/config.php if you don't have this section in your app config, an…
Comment by
WanWizard
April 2013
permalink
Order_By Not Working in a Task
Since it's a join, I assume you want them ordered on photo.order PER inventory item? If so, you need to add an order on inventory id too, otherwise it will order all order == 1's, regardless of the inventory item...
Comment by
WanWizard
April 2013
permalink
Simple ORM Relationship Query - "bookings", "customers", "customers_type"
I don't know Cake, so I don't know what you mean by "Recursion". You will have to setup the relation definition in your models, otherwise the ORM doesn't know how they are related. So Model_Booking requires a belongs_to t…
Comment by
WanWizard
April 2013
permalink
Order_By Not Working in a Task
Odd, there is no difference between a task and a controller. So I'm clueless...
Comment by
WanWizard
April 2013
permalink
Random Session Destructions
Odd. You only get there when your session cookie contains a session id that can't be found (either on session id or previous id).
Comment by
WanWizard
April 2013
permalink
Random Session Destructions
I never use localhost, or 127.0.0.1. I create hosts file entries like "website.laptopname.local" for every virtualhost I create. These are all aliases for 127.0.0.1. Also, my local apache doesn't listen on IPv6, so I don't have t…
Comment by
WanWizard
April 2013
permalink
Best way to avoid invalid XML formatting in API output?
Yes, please.
Comment by
WanWizard
April 2013
permalink
Best way to avoid invalid XML formatting in API output?
What might be an option is to move the preg_replace() after that if, to before the if. That would change "70:12" to "7012", which is numeric, and would trigger the if without additional processing needed.
Comment by
WanWizard
April 2013
permalink
Best way to avoid invalid XML formatting in API output?
That means that on every row a very expensive regex is run, while the chance that you need it is very small. So I'm not in favour of it, it would slow things down unnecessary for everyone.
Comment by
WanWizard
April 2013
permalink
Best way to avoid invalid XML formatting in API output?
to_xml() can't check. Well. it could check, but would be forced to throw an exception on a violation. And that would not help you one single bit. Any code to "fix" it in to_xml() would be application specific (your fix might differ f…
Comment by
WanWizard
April 2013
permalink
Search Form
Then you'll have to answer my "what exactly do you want" question first. Your question is so generic and vague that I can't give an answer. Even if I reply with a completely coded search application it might not be what you want.…
Comment by
WanWizard
April 2013
permalink
Best way to avoid invalid XML formatting in API output?
Either construct an array that contains valid XML data server side, or tell the iOS developer that XML is so 20th century, and have him (her?) switch to JSON.
Comment by
WanWizard
April 2013
permalink
Session flash message isn't shown after redirect
lol, recorded for eternity ;)
Comment by
WanWizard
April 2013
permalink
How do i order an orm query by a relationship?
Cool! You're welcome.
Comment by
WanWizard
April 2013
permalink
How do i order an orm query by a relationship?
You need a count query for that, which you can't do with ORM, it's not a query builder. What you could try is something like: $result = DB::select(DB::expr('*'), DB::expr('COUNT(*) as count'))->from('votes'…
Comment by
WanWizard
April 2013
permalink
How to get "root" path using Router::get()?
You can't to that, because there no 'path' attached to the root route. The root route is used when there is no URI to route (where there are no URI segments), i.e. when the request URI is equal to Uri::base().
Comment by
WanWizard
April 2013
permalink
Unit Tests with Visual PHPUnit
Care to share how you did it? Perhaps add it to the documentation, or write a blog post about it?
Comment by
WanWizard
April 2013
permalink
raw html as fieldset row
No, the answer is: "No, you can not". If you want to generate more complex forms, but still retain the functionality of the fieldset, you can do so: echo Form::open(); echo $fieldset->field('fieldA')->build(); echo '…
Comment by
WanWizard
April 2013
permalink
raw html as fieldset row
Have you tried it?
Comment by
WanWizard
April 2013
permalink
how to accessing the generated fieldset (in the view) from the controller
Don't generate the fieldset in the view. You should not have any logic in the view, views are about presentation.
Comment by
WanWizard
April 2013
permalink
Temporarily disable observers
Something like this would be the cleanest solution: class Model_Mine { protected $_observers_enabled = true; public static observer_state($state = true) { static::$_observers_enabled = (boot) $state; } public function …
Comment by
WanWizard
April 2013
permalink
Model_Crud and Fieldset class
There is no integration between Fieldset and Model_Crud, only with ORM. But you could indeed add a set_form_fields() method to your models, that contains compatible logic, that creates the Fieldset instance if none is passed, and that populates tha…
Comment by
WanWizard
April 2013
permalink
Specify format of HMVC response
Ah, ok. That's indeed more detailed. As it's an HMVC call, there is no HTTP header which can be used to determine the return format. As you can see in the docs, if all the other options are not configured, it will eventually hit the defau…
Comment by
WanWizard
April 2013
permalink
Specify format of HMVC response
This is not an HMVC request (which is internal, from one controller to a second), but a REST API request. It is by design that it returns whatever is requested. We feel that it should not be the service, but the client who should specify in which f…
Comment by
WanWizard
April 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
8:20PM
Roles
Administrator