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
How do Ajax work in FuelPHP Please provide some example
Then you'll need to use the Controller_Rest base controller. See http://docs.fuelphp.com/general/controllers/rest.html
Comment by
WanWizard
December 2013
permalink
->select() and cache ? : I felt into a trap.
select() doesn't prevent hydration. What happens is that the hydration process detects it already has a Model object in cache for that table and primary key, so it simply links in the cached object instead of hydrating the result and create a …
Comment by
WanWizard
December 2013
permalink
How do Ajax work in FuelPHP Please provide some example
Ajax is a javascript, client side technology. As such, the framework doesn't "do" ajax. If you mean you want to use ajax to call a controller action, your controller should extend Controller_Rest. Check the documentation on how to us…
Comment by
WanWizard
December 2013
permalink
->select() and cache ? : I felt into a trap.
ORM caches results, so this is 'by design'. You should not use select() with ORM to avoid this, unless you know what you're doing.
Comment by
WanWizard
December 2013
permalink
Best way to override package classes
There is currently no way to override package classes, unless the package namespace is aliased to global, like for Fuel\Core and Auth. This is not the case with ORM. You could try loading the ORM package first, which executes the bootstrap and defi…
Comment by
WanWizard
December 2013
permalink
throw new HttpNotFoundException error
The standard index.php contains: // Generate the request, execute it and send the output. try { $response = Request::forge()->execute()->response(); } catch (HttpNotFoundException $e) { // ... } If that code block is there, it can al…
Comment by
WanWizard
December 2013
permalink
Form element value re-population
Fuel uses fieldsets to generate forms, which have the entire form handling, including validation, build in. Although there are form helpers, it's not the primary design goal to keep coding forms by hand. In your solution, you can reduce it to …
Comment by
WanWizard
December 2013
permalink
Rest Controller and Auth
Which version of Fuel are you on? This was introduced in 1.6.1, older versions didn't allow a Response at all. The current Controller_Rest does: elseif (method_exists($this, $this->auth)) { if (($valid_login = $…
Comment by
WanWizard
December 2013
permalink
Problem with ORM Auth User Permissions
Just updated the rights with user[list,add] and banner[list], and now the cache is: {{Fuel_Cache_Properties}}{"created":1387563984,"expiration":1387564584,"dependencies":[],"content_handler":"serialized&…
Comment by
WanWizard
December 2013
permalink
Problem with ORM Auth User Permissions
I've setup a test here using our own app framework (for which Ormauth was written), running 1.8/develop. When I create a user, and assign him the exact same rights you mentioned above (and select the "list" action for "banner&qu…
Comment by
WanWizard
December 2013
permalink
Fuel Config - saving module config
Yes, there should. https://github.com/fuel/core/commit/2b8aa801936d4f47f3a1ea7a8480872119815c48
Comment by
WanWizard
December 2013
permalink
HMVC Request Problem
I just ran the same test on the 1.7 codebase, with the same result.
Comment by
WanWizard
December 2013
permalink
Fuel\Core\FuelException [ Error ]: Database results are read-only
See http://docs.fuelphp.com/classes/database/usage.html#/results
Comment by
WanWizard
December 2013
permalink
Class 'Model\DB' not found
You need to read up on using namespaces in PHP. The DB class is in the global namespace. This error message indicates your current namespace is "\Model", in which there is no class called DB. When you are in a namespace, and you need to …
Comment by
WanWizard
December 2013
permalink
HMVC Request Problem
It is not the execute method that does this. That will: - accept the argument passed - merge it with any arguments from the route (which are not there in these calls, the route flag is false) - pass it on to the method called From a technical poin…
Comment by
WanWizard
December 2013
permalink
Fuel\Core\FuelException [ Error ]: Database results are read-only
A standard DB result is returned the way the driver returns it, which is an immutable result. Fuel's architecture encodes on output, instead of filter and strip on input. If you attempt to send a raw database result directly to a view, the Vi…
Comment by
WanWizard
December 2013
permalink
HMVC Request Problem
How are both save() methods defined? How do you retrieve the parameters inside the save() methods? The parameter of execute() is an array, so you're effectively passing array('authors' => $sorted_authors['new']) this v…
Comment by
WanWizard
December 2013
permalink
-Arr::merge() - all arguments must be arrays.-
By default, you have an empty db.php in fuel/app/config, only containing return array(); Unless you have global DB settings, that have to be applied to all your environments, you should not touch this file. For your DB connections, you create a d…
Comment by
WanWizard
December 2013
permalink
-Arr::merge() - all arguments must be arrays.-
Backtrace step 3 shows an attempt to load your db.php config, which causes the error. So you have a db.php somewhere in your config folder which either has a syntax error, or doesn't return an array.
Comment by
WanWizard
December 2013
permalink
"Composer is not installed. Please run "php composer.phar update" in the root to install Composer"
If your target server doesn't give you a commandline, you'll have to push the fuel/vendor folder too, so you don't have to run Composer again (it just installs packages in the vendor folder).
Comment by
WanWizard
December 2013
permalink
Problem with ORM Auth User Permissions
haven't had time for it yet, I'm travelling. I'll try to squeeze it in next week.
Comment by
WanWizard
December 2013
permalink
Validate Year
Can you send a pull request for this fix?
Comment by
WanWizard
December 2013
permalink
Can't generate migration
What is a "magic" migration?
Comment by
WanWizard
December 2013
permalink
Ormauth
The problem is as I described. The auth config file is loaded when you access the Auth class for the first time. This code tried to access the config before Auth was used, so the config wasn't loaded. Most people do an Auth::check() in their …
Comment by
WanWizard
December 2013
permalink
MySQL Connection Errors
The php settings you mean? A lot of people have these issues, good to know there is a solution.
Comment by
WanWizard
December 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,388
Last Active
11:38AM
Roles
Administrator