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
8248
Activity
ORM, Fieldset and SimpleAuth
Check our fuel depot repo. The admin module contains a users section that does just this. It uses an ORM model to access SimpleAuth user data, and uses the profile_fields to store the users full name.
Comment by
WanWizard
April 2012
permalink
Fieldset::set_config()
set_config() is meant to allow you to override items in the forms config file, so only those keys can be used. I have a very customized one that does this: // fetch the definition of this form $formdata = \Config::get('forms'); // add a …
Comment by
WanWizard
April 2012
permalink
Fieldset Generation and date/time selection
Depends a bit on what you exactly want. I have apps that use: extra form fields for day, month, year with dropdowns. Upon form submit, the controller will merge the contents of the three into the date field (Y-M-D), which is then validated. The dat…
Comment by
WanWizard
April 2012
permalink
upload trouble cause of validation class
I don't see anything immediately wrong in there. The model (which I assume contains the validation rules) are missing from this, but I can't think of a reason why a rule would fail based on the number of uploaded files. Some low-level deb…
Comment by
WanWizard
April 2012
permalink
Website suggestion: increase darkness of font colour.
Working on it. Current theme now looks like: http://fueldepot.exite.eu
Comment by
WanWizard
November 2011
permalink
Using packages as plugins?
Packages are not routable, they can't have controllers. This is what modules are for. Packages are meant to have a flexible way to extend the core, they're not about front-end functionality.
Comment by
WanWizard
April 2012
permalink
Exception notice slipping through try catch
Looks like you're on v1.1 release branch. This has been fixed in 1.1/develop (and will be part of the upcoming 1.2 release), where it was changed so it does throw an exception (UnexpectedValueException to be exact) instead of logging a notice.…
Comment by
WanWizard
April 2012
permalink
Application error page (500) on Production
In addition, the 500 view is shown when you throw HttpServerErrorException, so a code generated server error. A fatal error in your code is not considered a 500, it's considered code that should not be in production.
Comment by
WanWizard
April 2012
permalink
Application error page (500) on Production
Start FuelPHP in the production environment, and all will be taken care of. The core/views/errors/production.php view doesn't give you any details, it only says "An unexpected error has occurred.". If you see a dump, you're not …
Comment by
WanWizard
April 2012
permalink
upload trouble cause of validation class
If we don't know what your code and your view looks like, all we can do is guess. Post them on http://scrp.at and we'll have a look...
Comment by
WanWizard
April 2012
permalink
upload trouble cause of validation class
Validation only runs on input fields that are part of the posted form. Input fields of type "file" are not part of that form, so they can not be validated (that is why the Upload class contains validation for uploaded files). If you defin…
Comment by
WanWizard
April 2012
permalink
is there an anchor_popup in FuelPHP?
Afaik there isn't.
Comment by
WanWizard
April 2012
permalink
Error on version 1.0.1 install
The docs on docs.fuelphp.com are frozen at the time of release of 1.1, so it doesn't contain a link to download 1.1 (as that didn't exist then). We're working on a new documentation system (you can follow the development on [url=http…
Comment by
WanWizard
August 2011
permalink
How would I code a Codeigniter query in FuelPHP?
If you really need to select a subset of the columns, yes. The ORM is about objects representing data, and allows you to perform manipulations on that data through the objects. Limiting the select would cause the objects to be incomplete, and as se…
Comment by
WanWizard
April 2012
permalink
Data entry with ORM and has one and has many relationships
This obviously doesn't work: $org->address[] = new Model_Address(); $org->address->user_id = $org->user_id; In a many-to many, the relation is an array of objects, so the first line is correct (you create a new array element). But…
Comment by
WanWizard
April 2012
permalink
Google: This page is in French, would you like to translate it?
FuelPHP doesn't do anything. This page http://superuser.com/questions/303706/how-does-chrome-know-what-language-a-page-is-in gives more information on how the detection process works.
Comment by
WanWizard
April 2012
permalink
Unit test
You run them from the commandline using php oil test [--coverage-html] [--group=groupname] See core/tests on how to create tests.
Comment by
WanWizard
February 2012
permalink
How would I code a Codeigniter query in FuelPHP?
ORM doesn't support selects. It always selects the full record.
Comment by
WanWizard
April 2012
permalink
How would I code a Codeigniter query in FuelPHP?
Find() has a few shortcuts that do return a result set, like find('first'), find('last') and find('all') or find($id). If you don't pass anything find() will return a query object upon which you can chain your sel…
Comment by
WanWizard
April 2012
permalink
How would I code a Codeigniter query in FuelPHP?
Read up on method chaining. CI does the same as FuelPHP does. You can easily write: $result = Model_Inventory::find(); $result->related('categories'); $result->where('categories.active', '=', 'Yes'); $r…
Comment by
WanWizard
April 2012
permalink
How would I code a Codeigniter query in FuelPHP?
I don't see an array being passed in this example (other then $options to your own model method). So what do you exactly mean? And the CI example is AR code, which is equivalent to our Database class. This is not an ORM, which works different.…
Comment by
WanWizard
April 2012
permalink
\Package::load works fine on local/dev.. production needs \Fuel\Core\Package
Correct, all core classes are aliased from the Fuel\Core namespace to the global namespace, to allow you to extend them. You should never (need to) use the Fuel\Core prefix.
Comment by
WanWizard
April 2012
permalink
Migrations and Environments
Migrations do not support environments the way you want it at the moment. It stores the config file in app/config. The assumption is that one installation only serves one environment, the environments are meant for deployment to different servers. …
Comment by
WanWizard
April 2012
permalink
\Package::load works fine on local/dev.. production needs \Fuel\Core\Package
And only for Package? Because the framework access all other core classes from the global namespace as well, so if it's a global fault (for example with the bootstrap), nothing would work. Do you have the exact error message and it's back…
Comment by
WanWizard
April 2012
permalink
Using HMVC with the theme class?
Good to hear you've got it working. Although I don't understand what the problem was. If you have only one theme instance, the default should do fine, which is accessable through Theme::instance(). And you don't need to use render() …
Comment by
WanWizard
March 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,479
Last Active
9:54PM
Roles
Administrator