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
Agent::is_mobiledevice() not working
The Agent class uses the Cache class to cache browser identification data. The error here doesn't refer to folders not being writeable, but to the fact that the Cache class can not be loaded. Since this class is part of the FuelPHP core, there…
Comment by
WanWizard
November 2012
permalink
Share your knowledge!
ilNotturno, When you're done, send a pull request on the tutorials page in the docs to include your tutorials. Then they'll be easy to find.
Comment by
WanWizard
November 2012
permalink
Validation unique field in create and edit
You can access other data using $validation->input('fieldname'). Use that to fetch the 'id' of the record being updates (for example via a hidden field on the form), and add that as a where clause in the query, so that you se…
Comment by
WanWizard
November 2012
permalink
Fuel\Core\ThemeException [ Error ]: Theme "test" could not be found.
I don't have an idea either. Perhaps you can debug Theme::find(), to check the contents of the paths used to find the theme.
Comment by
WanWizard
November 2012
permalink
Fuel\Core\ThemeException [ Error ]: Theme "test" could not be found.
and your themes folder is in that folder (so one folder up from app)? And your webserver has (at least) read access to that folder?
Comment by
WanWizard
November 2012
permalink
Fuel\Core\ThemeException [ Error ]: Theme "test" could not be found.
That means it can't find your theme folder. Is your theme config (the theme path in particular) setup properly?
Comment by
WanWizard
November 2012
permalink
Pagination Routing
Normally you shouldn't need any routes, as the default for the URI is: controller/method/any/params/you/want/to/pass. You do need a route if you want the page number to be the second URI segment, which by default is reserved for the action met…
Comment by
WanWizard
November 2012
permalink
Get 1 result with Orm\Model
Note that this syntax will fire an extra query if the relation isn't loaded. If you know up front you need the related data, include the relation in the query, either in the find() with the options array, or with query() using related(). That …
Comment by
WanWizard
November 2012
permalink
Get 1 result with Orm\Model
$region = Model_Region::find($product->region_id); And if you have setup your relations correctly (given the query you give you have "one region has many products"), you can also do echo $product->region->id; ( assuming you hav…
Comment by
WanWizard
November 2012
permalink
How could I ignore some columns When I saving posts by ORM
Give the column a default value in the properties. The ORM always uses all columns, it doesn't rely on RDBMS features to fill in missing columns (like MySQL's default value on a column), since some don't support such a feature. So d…
Comment by
WanWizard
November 2012
permalink
Module config load
Possible causes: The modules/mymodule/config/myconfig.php does not exist, is unreadable, or empty. You can test this by dumping the return value of Config::load(). If it exists, does it contain return array( 'config1' => 'so…
Comment by
WanWizard
November 2012
permalink
Session not on every page? Keeps logging me out?
Most obvious culprit is time. Sessions are maintained using a cookie containing the session id. Cookies contain an expiry timestamp defined in GMT. This means that your webserver will take time(), add the session expiry timeout to it, and converts …
Comment by
WanWizard
November 2012
permalink
Module inside Module
Technically, you can define an entire list of paths that may contain modules. FuelPHP doesn't care where that is, so it's not a problem to do: 'module_paths' => array( APPPATH.'modules', APPPATH.'module…
Comment by
WanWizard
November 2012
permalink
Using ORM to best effect
Assuming you have defined a Model_User for the users table, and a Model_Follows for the follows table, and defined the correct relation between the two, the query should be: Model_User::query()->select('username', 'bio')->…
Comment by
WanWizard
November 2012
permalink
SHA-3
We have no plans in that direction. Currently we're using PHPSecLib for encryption. Do you have a use case? If so, please add a feature request documenting it at http://github.com/fuel/core/issues
Comment by
WanWizard
November 2012
permalink
Working with Hybrid Controllers and Modules
The Hybrid controller is, as it's name implies, a combination of the template and the REST controller. It is designed so that it serves HTML to normal requests, and json/xml/... to REST requests. The challenge is when you call the REST API thr…
Comment by
WanWizard
November 2012
permalink
post_find for ORM Model
ORM doesn't use methods, it used observers, which are events that are triggered. In this case, you need to write an observer that captures the "after_load" event. It will be fired on the object, so for each object created in your fin…
Comment by
WanWizard
November 2012
permalink
FuelPHP 1.4 'packages' => array( 'orm', ),
All default values are in the core, so that only the exceptions need to be added to the app config file. I didn't mean to say you should now modify a core file. You shouldn't, add your default override in the app file. The reason for thi…
Comment by
WanWizard
November 2012
permalink
How to JOIN table(s) properly
They are completely identical.
Comment by
WanWizard
November 2012
permalink
View or Theme?
The theme class should fall back to the views folder if the requested view can not be found in the active or fallback theme. So perhaps you could provide a set of default views with basic styling in the module itself, which can be copied to the the…
Comment by
WanWizard
November 2012
permalink
donations button, or advertising ?
I'll discuss it in the team.
Comment by
WanWizard
November 2012
permalink
View or Theme?
As always, the answer is "it depends". Views are stored in the views folder of the module, and therefore tied to that module. If you want to re-use the module in a different application with a completely different layout, it could be that…
Comment by
WanWizard
November 2012
permalink
FuelPHP 1.4 'packages' => array( 'orm', ),
I think the confusion is because by default the app/config/config.php file is now empty, all default values are in the core. I'll update the docs page.
Comment by
WanWizard
November 2012
permalink
FuelPHP 1.4 'packages' => array( 'orm', ),
That is weird, because all my applications define it like that. Have you defined the package path too (it's commented by default)?
Comment by
WanWizard
November 2012
permalink
donations button, or advertising ?
We have been thinking about that, but for the moment we don't really need the money on the project, so we feel it's wrong to start asking about it. This might change in the future, because a day worked on the framework is a day not earnin…
Comment by
WanWizard
November 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,396
Last Active
1:51PM
Roles
Administrator