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
Auth sessions behave weird
Should not really matter, clicking on a pagination link is a HTTP GET like any other link. Do these pages store additional data in the session? There is only a very limited amount of data you can store in a cookie, if the cookie gets too big, most …
Comment by
WanWizard
January 2014
permalink
Auth sessions behave weird
1.5 is pretty old, there were quite a few fixes in 1.6 and 1.7: Most important, in 1.7.0: "A bug in all session drivers (except cookie) that caused the session timestamp not to be updated has been fixed. The session will now not expire as lo…
Comment by
WanWizard
January 2014
permalink
Auth sessions behave weird
Are you talking about two different auth environments? Or a single user table with both front-end and admin users? What mechanism are you using to store sessions? Which version of Fuel are you using? Do you have multiple users using the same accoun…
Comment by
WanWizard
January 2014
permalink
pagenation rendering
My previous reply is wrong, I'd assumed some rewriting was used, but it looks like your public folder is actually part of the URL... For the uri_segment, ALL segments in the URL are counted (excluding the hostname, since that is not a segment)…
Comment by
WanWizard
January 2014
permalink
Can FuelPHP 1.x be upgraded to FuelPHP 2.x?
We (our company) mainly develops business software for intranet use (i.e. webbased applications, not "websites"), applications that have 5 year (or sometimes more) maintenance cycles. In that period there is no real need for "the la…
Comment by
WanWizard
January 2014
permalink
Can FuelPHP 1.x be upgraded to FuelPHP 2.x?
Your are correct. And it will be possible to upgrade, although it depends on our code whether or not that will be complex. If for example you did a lot of core extensions where you replaced existing methods, you might be better off with the LTS ver…
Comment by
WanWizard
January 2014
permalink
module vs package
In general: - a package is a core extension, and contains additional framework functionality. No controller support. - a module is an app extension, and contains front-end code. It contains controllers. From your brief description, I'd say &q…
Comment by
WanWizard
January 2014
permalink
Form::open action missing index file
Yes. A different controller, in this case in a module called 'admin', works fine too: http://fuel.catwoman.exite.local/18develop/admin/test/index array (size=3) 0 => string 'admin' (length=5) 1 => string 'test&…
Comment by
WanWizard
January 2014
permalink
Form::open action missing index file
I can not reproduce that. url: http://fuel.catwoman.exite.local/18develop/welcome/ gives: array (size=1) 0 => string 'welcome' (length=7) same for http://fuel.catwoman.exite.local/18develop/index.php/welcome
Comment by
WanWizard
January 2014
permalink
Form::open action missing index file
Yes, it is, in your app/config/config.php: 'index_file' => 'index.php',
Comment by
WanWizard
January 2014
permalink
how to create Sum, avg function in ORM Chaining query
The answer is: it depends. ORM only supports these methods on a total result, like $model->count(); or $model->max('amount'); As ORM doesn't support partial or custom selects, it doesn't support these SQL statements as par…
Comment by
WanWizard
January 2014
permalink
Multiple Models for EAV Containers?
Check if the property exists first? Something like: try { if ($model->key) { $model->key = $value; } } catch (\OutOfBoundsException $e) { // forge the new key/value here }
Comment by
WanWizard
January 2014
permalink
Multiple Models for EAV Containers?
No, like this: http://bin.fuelphp.com/snippet/view/x2
Comment by
WanWizard
January 2014
permalink
Multiple Models for EAV Containers?
You can not. EAV supports multiple relations for read and update, but will always create in the first one defined. Simply because $model->eavkey = $value; doesn't allow you to specify something extra. But since under the hood EAV are n…
Comment by
WanWizard
January 2014
permalink
error handling in Controller_Rest
There are several methods available, so it depends how your application is designed. By default, a REST controller supports basic auth and digest auth (http authentication) using username and password. If you want something else, you can define a c…
Comment by
WanWizard
January 2014
permalink
Bootstrap Plugins as Modules?
And to make sure you only load what is needed, i suggested to use an Asset helper class for that. This is what we do too, the widgets that are added to the pages of our apps define what css and js they need, and for js, whether they need to be load…
Comment by
WanWizard
January 2014
permalink
Bootstrap Plugins as Modules?
That would be more complex, since you would not be able to use Asset to load those (since that requires the split into img,css and js). It would be more logical to use img/js/--- bootstrap/-------- bootstrap.js --- Messenger ------- messenger.jscs…
Comment by
WanWizard
January 2014
permalink
Bootstrap Plugins as Modules?
I see your point, that is quite complex, and not really supported (in a structured way). If you know the plugin you're about to activate, you know it's name, and therefore the location of it's assets, if you keep them consistent (whi…
Comment by
WanWizard
January 2014
permalink
get_one() on related
No. And if the ORM was a query builder, your opinion would be right. But it isn't, its an ORM, an object Relation Manager, and it will try it's best to make sure relations stay complete and together. If you want QB behavior, you can for…
Comment by
WanWizard
January 2014
permalink
Bootstrap Plugins as Modules?
Isn't that front-end stuff? What are you exactly trying to do?
Comment by
WanWizard
January 2014
permalink
error handling in Controller_Rest
You can't redirect in a REST transaction, you need to return a response. Common practice is to use the HTTP status to signal the result type, such as 200 being a valid response, 204 for no data in result, 405 for invalid function called, 406 f…
Comment by
WanWizard
January 2014
permalink
Where can I place store/run global functions/variables?
There is no method to pass data to a Viewmodel while forging. This is because the associated View object (that actually is the container for the data) is not created which forging. The alternative is: $viewmodel = Viewmodel::forge('main/index…
Comment by
WanWizard
January 2014
permalink
Multiple groups of transactions
Not in the current release. And note that not all databases support nested transactions. Which is a problem because currently we have a generic PDO driver, instead of platform specific drivers. Which makes implementing platform specific code near …
Comment by
WanWizard
January 2014
permalink
Where can I place store/run global functions/variables?
Never change anything in framework code, including the configuration defaults. It will cause you headaches when you want to upgrade to a newer release, and you have to figure out what you have changed. Put your changes in app/config, they will over…
Comment by
WanWizard
January 2014
permalink
Use module route from app
You can not, the module routes are only loaded when the module is loaded (i.e. when it is routed to). You can work around it by converting your helper function to an HMVC call.
Comment by
WanWizard
January 2014
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,370
Last Active
12:34AM
Roles
Administrator