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
Image::save() occurs an error.
I don't think I ever saw a created issue, so I assume it was. But if you have the same issue, sounds like it isn't. Please create a ticket for it, which your use case, and some code to reproduce the error.
Comment by
WanWizard
December 2013
permalink
Ormauth Scaffolding
You can't really scaffold that, due to all the relations involved (oil doesn't generate for relations). You could generate something for the base tables (users, roles, groups), but that's about it. For Fuel v2 we're thinking of…
Comment by
WanWizard
December 2013
permalink
Fatal error: Exception thrown without a stack frame in Unknown on line 0
Which version of Fuel? This (the error message) is not a Fuel issue, it's a PHP issue. There is an error in the shutdown function, and because that is executed while PHP is tearing down it's process. So there is no "stack" anymo…
Comment by
WanWizard
December 2013
permalink
Virtual Host Setup
What code?
Comment by
WanWizard
December 2013
permalink
Problem with ORM Auth User Permissions
That is because it doesn't work that way. The permission record contains an indexed array with ALL possible actions for that permission, so [0 => list,1 => add, 2 => edit, 3=> delete]. The permission join record will then contain…
Comment by
WanWizard
December 2013
permalink
DBUtils add_field bug
Thanks. Someone will look into it soon.
Comment by
WanWizard
December 2013
permalink
Correct approach for a 'base' controller ?
We use base classes for both controllers and models: \Module\Controller\Dashboard extends \Controller\Base extends \Controller_Template \Module\Model\User extends \Model\Base extends \Orm\Model (we use namespaces for all classes, no underscores, b…
Comment by
WanWizard
December 2013
permalink
[FuelPHP 1.7.1] REST-Controller
lol, these things happen. ;-)
Comment by
WanWizard
December 2013
permalink
Get all controllers and actions
Not very easy. You can use the File class to enumerate all files in app/classes/controller, convert the filenames found to classnames (strip the extension, the "app/classes" prefix, replace DS by "_", and use the Inflector class…
Comment by
WanWizard
December 2013
permalink
DBUtils add_field bug
Can you create an issue for this at https://github.com/fuel/core/issues? You can work around it using \DBUtil::add_fields('users', array( 'surname' => array('constraint' => 1, 'type' => 'bit…
Comment by
WanWizard
December 2013
permalink
[FuelPHP 1.7.1] REST-Controller
You must have a local issue, if I do that here, I get {"foo":null,"baz":[1,50,219],"empty":null} ( on 1.7.1, I don't have a 1.7 locally anymore ) I also tried it on 1.6/master, and that gives the same output here.…
Comment by
WanWizard
December 2013
permalink
Can ViewModel object use function set_global() ?
You have a point, the generation code is now 3 years old, and in need of an overhaul. Since Fuel v2 will get a completely rewritten oil environment, we felt we shouldn't spend much time on the existing code.
Comment by
WanWizard
December 2013
permalink
My \Auth::has_access() in modules seems not working
In general you only need to flush the cache when you change something. So: - the roles cache if you modify a role - the groups cache if you modify a group - the user permission cache if you change direct permissions of a user - all user permission …
Comment by
WanWizard
December 2013
permalink
FuelPHP 1.7.1 Composer file doesn't exists
I have installed composer globally on my systems, see http://getcomposer.org/doc/00-intro.md, so I can just do 'composer update' anyhwere I have a composer.json file.
Comment by
WanWizard
December 2013
permalink
View not refreshing once Observe is added
Sounds like you have an error somewhere, and have disabled all error reporting (so Fuel can't catch it). Check your Fuel app logs, and your webserver logs, for possible hints. In general, there is no need to play with the error settings. Fuel…
Comment by
WanWizard
December 2013
permalink
How to get get the sql out put ?
find() returns the result of a get() or get_one() operation, so it executes the query directly, there is no option to get the intermediate SQL before execution.
Comment by
WanWizard
December 2013
permalink
Upgrading from v1.0
That is a big jump. ;-) I'm pretty sure a lot of things have changed between those two versions. I'm not sure upgrading one version at the time is useful, you'll end up working through changes anyway, and test everything. I think it…
Comment by
WanWizard
December 2013
permalink
Observers and class inheritance
It's functionality provided by the Fuel Autoloader. You can see it as the static equivalence of the constructor, it is called as soon as the autoloader loads the class. It is available for every class defined within the framework.
Comment by
WanWizard
December 2013
permalink
Observers and class inheritance
Define an _init() method, and add them to the array: public static function _init() { static::$_observers['Model\\Observer_Date'] => array( 'events' => array('after_load', 'before_save',…
Comment by
WanWizard
December 2013
permalink
Custom scaffold view extension
p.s. it would probably be better if oil generate had a commandline switch to define the template type used, instead of the hardcoded php extension. Perhaps address that, and send a pull request?
Comment by
WanWizard
December 2013
permalink
Custom scaffold view extension
Not very easy, Oil was never made to be extendible. With a bit of hack work it can be done though. First, copy generate.php to fuel/app/classes/oil/generate.php. Then open the oil front loader (the oil script in your fuel installation root), fi…
Comment by
WanWizard
December 2013
permalink
oil refine migrate to remote server
Both? In general you only need to use one db.php, which is in your environment folder. The one in app/config is only meant for some global (over all environments) defaults, and should under normal circumstances not be changed.
Comment by
WanWizard
December 2013
permalink
[FuelPHP 1.7.1] REST-Controller
Just checked against 1.6 too, and that version also returns the same.
Comment by
WanWizard
December 2013
permalink
[FuelPHP 1.7.1] REST-Controller
Ah, wait, missed a bracket. You are injecting a response in a response, and then sending the outer response. What is the point of that? $this->response is already a response object? Let's look at your statement in detail. $this->respon…
Comment by
WanWizard
December 2013
permalink
[FuelPHP 1.7.1] REST-Controller
You should NEVER send a response from a controller, as the front controller (your index.php) is in charge of sending reponses back. This has always been the case. send() will echo the response out, and does not return anything. So you're actio…
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,389
Last Active
1:48AM
Roles
Administrator