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
How can I call a partial from another module?
The correct way of doing that is through HMVC. Have your user module call a controller method in your main method using Request::forge(), and have that method return the required view. Alternatively you can pass the theme instance to the request,…
Comment by
WanWizard
February 2013
permalink
When creating new model, do CRUD actions and views get created
Have a look at our "oil" commandline utility. The "scaffolding" feature can generate the basic outline of the controller, model, migrations and forms for you.
Comment by
WanWizard
February 2013
permalink
Cascading deletes and other FK functionality
Lots of questions in a single post... No, Fuel can not generate tables from models. Fuel uses migration files for database changes. You can use the "oil" commandline utility to generate both the model and the corresponding migration file.…
Comment by
WanWizard
February 2013
permalink
Fuelphp 1.5.1 log error: Call to a member function log() on a non-object
We aim to please. Check the website, online since about 2 hours. ;)
Comment by
WanWizard
February 2013
permalink
ErrorException [ Error ]: Class 'Model\Search' not found
See http://fuelphp.com/docs/general/coding_standards.html, under "File Naming".
Comment by
WanWizard
February 2013
permalink
ErrorException [ Error ]: Class 'Model\Search' not found
You're not coming from a Windows platform and going to a linux platform? If so, have you paid attention to the file naming conventions (all filenames MUST be lower case)?
Comment by
WanWizard
February 2013
permalink
ErrorException [ Error ]: Class 'Model\Search' not found
Is it "Model\Search" or "Model_Search"? You seem to mix those two notations?
Comment by
WanWizard
February 2013
permalink
Pagination Issue
The only thing I can find wrong with this, is that you render in the controller. This will produce HTML, which will be escaped when you send it to the view like this. But that would not result in no data, but in an HTML dump echo'd on your pag…
Comment by
WanWizard
February 2013
permalink
"Error: Unable to read existing migrations. Do you have an 'open_basedir' defined" Oil (in Windows)
The code that generates that message is: // Check if a migration with this name already exists if (($duplicates = glob(APPPATH."migrations/*_{$migration_name}*")) === false) { throw new Exception("U…
Comment by
WanWizard
February 2013
permalink
Exception thrown without a stack frame in Unknown on line 0
Get the files autoloader.php and error.php from the 1.5/develop branch of fuel/core, and copy them to your local fuel/core/classes. That should fix the problem, in the sense that you will now see the exception that is causing your issue. If that w…
Comment by
WanWizard
February 2013
permalink
Exception thrown without a stack frame in Unknown on line 0
It's caused by a bug in the autoloader (which has been there since day one), and triggered by the new log package. It's PHP's way of indicating there was an exception while in the exception handler. When using 1.5.1, make sure: - you…
Comment by
WanWizard
February 2013
permalink
"Dynamic" conditions in ORM model relations
If you want to pass a literal to a query, encapsulate it in a DB::expr(), to prevent it from being escaped.
Comment by
WanWizard
February 2013
permalink
Passing zero (0) to Form::input as a value produces form element with no value
This has been fixed quite some time ago, so I guess you're using an outdated version?
Comment by
WanWizard
February 2013
permalink
Fuelphp 1.5.1 log error: Call to a member function log() on a non-object
We know that. The issue is that it isn't handled properly. Instead of just giving you the error, it breaks handling the error because that needs Log too. And this is caused by a bug in the autoloader, which I have fixed earlier today (in 1.6/…
Comment by
WanWizard
February 2013
permalink
Help me design recent activity logger
Since you can decide to log any business function performed by your application, there is no way to do this automatically. There is no other way then 3. Database logging is perfectly possible using observers, but require ORM for all updates, and do…
Comment by
WanWizard
February 2013
permalink
Paging after searching query
This functionality has been added in 1.6/develop. Since Pagination doesn't have no external dependencies that have changed recently, you can backport it to 1.5 or 1.4 if you want.
Comment by
WanWizard
February 2013
permalink
Upload Class won't see $_FILES
Upload works fine. If $_FILES contains data, my guess is that validation has failed. Debug::dump(Upload::get_files(), Upload::get_errors()); to see which files valdated (first array), and which ones failed (second array). For the failed ones, it…
Comment by
WanWizard
February 2013
permalink
Application dies when using Security::clean()
It is a known issue with the autoloader. There's a ticket open for it, but no fix has been found yet. It is probably triggered by an exception in the Log class, usually caused by not having write access to the log files...
Comment by
WanWizard
February 2013
permalink
can i retrieve model name from an ORM\Query instance?
Wat do you mean by 'attribute'? A table column? You can use the "property()" method to access the models property definition. There is also a method "primary_key()" to retrieve the PK from a model.
Comment by
WanWizard
February 2013
permalink
web page refresh
I wouldn't know where there could be a conflict. In the core, in both Session and View, data is stored in data containers, shielded from the outside, and in the case of the View class, only extracted in the context of a closure.
Comment by
WanWizard
February 2013
permalink
Fuel Task don't have acces to config (using oil refine)
The Config class is used to load the configuration files, and that will always use the file in the environment folder if it exists. If you don't tell oil which environment to use, it will use "development". You can switch enviroment…
Comment by
WanWizard
February 2013
permalink
oil refine migration for package
That is correct. The current oil implementation supports 'app' only. Package are not routable, so it doesn't need oil generation support, since you can't have controllers in a package. Depending on the package you can have stuff…
Comment by
WanWizard
February 2013
permalink
HELP -- Change language in Before Method
In your app/config/config.php, add 'language' => \Session::get('lang', 'fr'), // Get the language from the session Which will fetch the language from the session, and if not set, will set it to '…
Comment by
WanWizard
February 2013
permalink
MondoDb class
In general we will do our utmost to prevent that. General rule is that we don't change the API and guarantee backward compatibility for minor (1.x) releases. For major releases we can introduce a new API (2.0 will introduce a new one for mos…
Comment by
WanWizard
February 2013
permalink
Using language class with ORM validation
You can just use label' => 'account.email', ORM will call __() automatically.
Comment by
WanWizard
February 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,481
Last Active
10:37PM
Roles
Administrator