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
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
\Package::load works fine on local/dev.. production needs \Fuel\Core\Package
Local = Windows? Prod = Linux? Perhaps a case issue in either the path or the package name? Or in the files of the packages themselfs.
Comment by
WanWizard
April 2012
permalink
Column not found - trying to use prefix_to
Not without a lot more information. What query are you trying to execute? How do the models involved look?
Comment by
WanWizard
April 2012
permalink
Using HMVC with the theme class?
I don't know what you mean by "the other way around". The purpose of the Theme class is that you select a theme, then set a page template from the theme. This page template contains the different sections (header, footer, sidebar, bo…
Comment by
WanWizard
March 2012
permalink
iPhone Full Screen not recognized by Agent
I'm not familiar with the platform, so I don't know what you mean by "as a web app". But I assume that it doesn't use the normal Safari as client, so the user agent string is not recognized by the Agent class. See if you ca…
Comment by
WanWizard
April 2012
permalink
Validation error_class not set on fields with errors?
You don't need/want to run validation if there's no input: if (\Input::post()) { if ($form->validation()->run()) { // save the data and redirect away } else { // post validation actions if neede…
Comment by
WanWizard
April 2012
permalink
How do I add profile_fields?
I case you haven't noticed: depot uses git submodules pointing at 1.1/develop branch versions of the different components it needs. You need to update all of them to make sure the latest version is fetched, as submodules point to a specific co…
Comment by
WanWizard
April 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,376
Last Active
12:12AM
Roles
Administrator