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
Widgets advice
Unfortunately, I can not, it is a core part of our application framework which my company uses to make money with. But the stucture is very logical. The pages table is a nested-set implementation (as webpages are organised in a tree structure). Eve…
Comment by
WanWizard
February 2015
permalink
ORM has_many order by
Correct, that is not supported. As the stackoverflow post already mentions, what you do is SELECT * FROM tablename ORDER BY (0 - position) DESC Which is ordering by a dynamic expression. You could try to get this in with a DB::expr(), but you can…
Comment by
WanWizard
February 2015
permalink
Can't use Asset in advanced mode
The config docs are ok (they specify it has to be an array) but the two examples in advanced are indeed incorrect. I've fixed those.
Comment by
WanWizard
February 2015
permalink
Drop-in Package for CKEditor
That github repo doesn't seen to be online anymore, that would be the location to ask the author.
Comment by
WanWizard
February 2015
permalink
Configuring the auth rest controller
lol. And once you've upgraded, note that the docs talk about the "method", so none of your trails are correct, since they include class names, and some seem to be a URI. Setting the 'auth' property to 'something'…
Comment by
WanWizard
February 2015
permalink
Pagination with ORM / search function
I assume you get the exception because your view attempts to load a named instance: Pagination::instance('pagination') but that instance was never created (in which case instance() will return false).
Comment by
WanWizard
February 2015
permalink
FuelPHP SQL security
Not correct, escaping is done in the DB drivers, which ORM uses as well. So no, you don't have to escape your queries yourself, obviously unless you hand-code your SQL.
Comment by
WanWizard
February 2015
permalink
Fuelphp Agent::is_mobile performances
The one they recommend is a fork of GaretJax' project, our Agent is an optimized fork of that, so that one is even slower. The discussion about the future of Agent can be found here: https://github.com/fuel/core/issues/1790 I've added yo…
Comment by
WanWizard
February 2015
permalink
Fuelphp Agent::is_mobile performances
Looked at it, but it's virtually nothing. I wonder if it would not be bether to add the "Mobile Detect" library directly and integrate it into Agent.
Comment by
WanWizard
February 2015
permalink
Fuelphp Agent::is_mobile performances
Can you post a link to that package, for other users having the same issue?
Comment by
WanWizard
February 2015
permalink
Fuelphp Agent::is_mobile performances
Quite possible, the browscap has expanded quite rapidly over the last period. Quick fix is to have PHP handle the browscap data, through the php.ini configuration. Agent will automatically use it if available, and no longer create it's own age…
Comment by
WanWizard
February 2015
permalink
Module in routed mode
Yes, you are correct. The Fuel router will try to match the first segment against a define module, and if a match is found, load it. It will only do that if there was NO route patch though, so with your admin example, if your app routes.php would …
Comment by
WanWizard
February 2015
permalink
Can't use Asset in advanced mode
Asset::forge() does: new \Asset_Instance(array_merge(static::$default_config, \Config::get('asset'), $config)); So it merges the default config, any asset config file loaded, and the config you pass, and passes that on to the instance cr…
Comment by
WanWizard
February 2015
permalink
Cannot save configuration file
Not sure what you exactly mean. If you save to an existing config file, you have to make sure you have loaded it's contents first, before making changes. Saving a config with just dump whatever is loaded, it does not merge with the data alrea…
Comment by
WanWizard
February 2015
permalink
Insert array of data to database
No, ORM is object based, and an object always is one record. And as an object is not aware of other existing objects, ORM will never generate a multi-row insert. Since you didn't ask this in ORM but in General, I assumed it was a DB question…
Comment by
WanWizard
February 2015
permalink
Cannot save configuration file
I don't have an immediate answer, it works fine here (I get "success" returned). I assume you can read the file correctly? BTW there is a typo in your code: \Config::set('app.'.$key, $value); requires a dot after &quo…
Comment by
WanWizard
February 2015
permalink
Exception question
Yes, both the plain result of ->execute() and ->as_object()->execute() should work fine now.
Comment by
WanWizard
February 2015
permalink
FuelPHP: Cascading Delete Not Working
Answered.
Comment by
WanWizard
February 2015
permalink
Exception question
Just pushed to 1.8/develop. Can you check if this solves your problem?
Comment by
WanWizard
February 2015
permalink
Put a / at the end of the url
What URL? Where? How?
Comment by
WanWizard
February 2015
permalink
Exception question
I'll see if I can find the time tomorrow or this weekend to fix this issue. Since 1.7 objects can have custom encoders, but this was never implemented for Database_Result.
Comment by
WanWizard
February 2015
permalink
Exception question
I know what is causing it. You're trying to assign or update a value which is the result of a DB call. Something like this will trigger it: $result = DB::select()->from('table')->execute(); foreach($result as &$row) { …
Comment by
WanWizard
February 2015
permalink
Exception question
That is not going to be easy. This exception is thrown by Database_Result, and it trying to find the caller means searching through the backtrace. You get all backtrace information in everything but the production environment, so these issues shou…
Comment by
WanWizard
February 2015
permalink
Possible bug - DOCROOT for tasks
This has been discussed for at least 3 years now. ;-) Short answer: there is no way the oil frontloader can determine what your definition of DOCROOT is, so it's set to a default value the same way it's done in index.php. If you have a n…
Comment by
WanWizard
February 2015
permalink
1 to 1 Project copy // error
Always tricky, this type of error, since the original error is hidden. What you can do as a test, is to go into fuel/core/bootstrap.php, and disable the set_error_handler() and set_exception_handler() function calls. You should see the original PHP…
Comment by
WanWizard
February 2015
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,382
Last Active
8:01AM
Roles
Administrator