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
Propel?
Appearently not... I for one am happy with Fuel's own ORM.
Comment by
WanWizard
December 2012
permalink
DRY method of defining model columns and using UUIDs instead of auto_increment IDs
All these properties are static, so do it in _init(), not in __construct(). It only needs to happen once, when the class is loaded. This is how I do it. Also, you'll have to make it a bit more foolproof, the extended class can define it'…
Comment by
WanWizard
December 2012
permalink
Pagination Enhancements and Ideas
Ah, ok, I get what you mean now. You want the option to always slow first/last, no matter which links are generated? Can you create a ticket for this feature request? I still have mixed feelings about 3. I understand your reasoning, but have issues…
Comment by
WanWizard
December 2012
permalink
Demo-Module
I don't know what you mean by that, so I can't comment. Do you have a link? If you mean "can I make components for FuelPHP that can be implemented in multiple apps" then the answer is "absolutely". You can create a pa…
Comment by
WanWizard
December 2012
permalink
Session class using db driver with ODBC: driver does not support lastInsertId()
This is no bug, this is due to crappy ODBC drivers. We can see what workarounds exists (because there is more crappy behaviour in this driver, like a missing quote() method).
Comment by
WanWizard
December 2012
permalink
Implementing Search. Problem with routes
No need for routes. Just check in your method if the search criteria is present. If so, run the search and present the result. If not, display the search form. If you want two different methods for this, have the index() do a redirect if no criter…
Comment by
WanWizard
December 2012
permalink
get_index($id) doesn't work in Controller_Rest
Why do you think "/contents/4.json" would call get_index? Without a route in place, the route will be automatically determined, where the first segment is the controller, the second segment the method, and additional segments are paramete…
Comment by
WanWizard
December 2012
permalink
Fuel\Core\FuelException: The session data stored by the application in the cookie exceeds 4Kb.
You may have a different issue. Looking at the code again, you have a maximum of 3 uploaded files, so you store a maximum of 3 strings in the session. That should easily fit in a cookie, so your problem is elsewhere. p.s. get_errors() returns an …
Comment by
WanWizard
December 2012
permalink
Order_by problem.
This is a find('all'). An 'all' query runs a get(), and that always returns an array. Issue here is that a find() executes, and therefore returns a result. So you can not chain any methods on it. Either use find() and the optio…
Comment by
WanWizard
December 2012
permalink
Pagination only works with the first 2 pages.
You can still use the static methods, which work on the default instance. I use this, and it works fine: // set pagination information \Pagination::instance()->uri_segment = 4; \Pagination::instance()->per_page = \Conf…
Comment by
WanWizard
December 2012
permalink
Pagination Enhancements and Ideas
Which fuel version are you using? These is all already possible with Pagination... Except 3, which I don't find very useful. A count is inexpensive if you have an index (so speed is related to table design), and you still need the count to d…
Comment by
WanWizard
December 2012
permalink
Fuel\Core\FuelException: The session data stored by the application in the cookie exceeds 4Kb.
As the message says, use a different storage backend, as the maximum size of a cookie is 4Kb. It looks like you're trying to store complete Validation error objects in the session, that will use up the available space very quickly...
Comment by
WanWizard
December 2012
permalink
Relation many to many filter WHERE IN
With DB you just construct your own query, so you have have it any way you want.
Comment by
WanWizard
December 2012
permalink
Purpose of before() and after() methods in template controllers
Nothing. There is no requirement for your controllers to have before() and after() methods. They are present in the base controller (in this case Controller_Template), where before() will make sure that $this->template contains a View object for…
Comment by
WanWizard
December 2012
permalink
Relation many to many filter WHERE IN
I don't understand this. rows_limit() only forces the LIMIT to be placed on the outer query instead of the subquery, it will not influence any ORDER_BY clause. You have to understand that the ORM is an object relationship manager, not a query…
Comment by
WanWizard
December 2012
permalink
Missing Arguments Controller Function Errors
If you want a route that routes both "test" and "test/param", the slash in the route has to be optional too: 'test(/:any)' => 'auth/test/$1', // slash inside the brackets!
Comment by
WanWizard
December 2012
permalink
Missing Arguments Controller Function Errors
What version of Fuel are you using? With a route like "test/(:any)", the parameter MUST be present, "http://example.com/test" will not match this route, so your Auth::test method will not be called.
Comment by
WanWizard
December 2012
permalink
Quick question
It's HTML, a browser doesn't care about indentation. Whitespace is not relevant. The number in the URL is a version check. It makes sure that if you update the file, the cached version in the browser will be replaced (so your users don…
Comment by
WanWizard
December 2012
permalink
Missing Arguments Controller Function Errors
I wonder what the error was then, and where it came from. Routes and method parameters have nothing to do with each other. Or was the problem that without the name segment, your method wasn't routed to?
Comment by
WanWizard
December 2012
permalink
Quick question
Use the Asset class for js and css.
Comment by
WanWizard
December 2012
permalink
Relation many to many filter WHERE IN
That doesn't make much sense. Why get all records, and then throw everything you don't need away?
Comment by
WanWizard
December 2012
permalink
Session flash variable is not 'deleted'
Added a third argument to get_flash() to allow you to expire a flash variable immediately. You need 1.5/develop to use this (or back-port the session class and all session drivers to your 1.4 installation).
Comment by
WanWizard
December 2012
permalink
Session flash variable is not 'deleted'
Yes, that was a bug in 1.3 and corrected (but appearently you want the old behavior). The bug is present in every PHP version, if you get an exception in the exception handler then PHP can not handle it, and gives a "error without a stack-fram…
Comment by
WanWizard
December 2012
permalink
Class 'Orm\Model' not found
When you have things like this, always check the dev-docs, to see if it has already been corrected. Which I did for ORM: http://fuelphp.com/dev-docs/packages/orm/intro.html I will check other locations refering to config too.
Comment by
WanWizard
December 2012
permalink
What software is used for this forum?
This is a customized version of Vanilla Forums.
Comment by
WanWizard
December 2012
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,395
Last Active
July 6
Roles
Administrator