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
Some issue by using fieldset in combination with ORM
Where in the first example do you pass the $form object to the view? Also, add_model() requires you to define the model properties in the Model. Did you do that?
Comment by
WanWizard
March 2013
permalink
Should composer.phar and composer.lock be .gitignored?
composer.lock should be ignored, it's generated/updated every time you run composer. If you ignore composer.phar, you can't run composer after you cloned the repo, which you have to (if you're on 1.6) otherwise it won't work. S…
Comment by
WanWizard
March 2013
permalink
Many to many relation not saved for current user
And that new first row has a different primary key from the old first row?
Comment by
WanWizard
March 2013
permalink
Many to many relation not saved for current user
So it's only with only one user record? And not related to "the current logged in user"? Weird. No database activity at all? What if you do an implicit: unset($user->permissions); before you start your loop?
Comment by
WanWizard
March 2013
permalink
Is there a way to allow only routes referenced in routes.php ?
Yes, add a catch-all route at the end directing all other requests to your 404 page: '(.*)' => 'welcome/404',
Comment by
WanWizard
March 2013
permalink
Many to many relation not saved for current user
Absolutely bizar... And if you login with another user, the problem moves to that user?
Comment by
WanWizard
March 2013
permalink
Many to many relation not saved for current user
You're sure the find() returns something? It would be weird if this would be broken, everyone using ORM would be all over us...
Comment by
WanWizard
March 2013
permalink
Nesting Template Controller
Apart from your coding style, I think it looks ok. :-) At first glance, the only remark I have is about your after() method. Once you have called the parent::after(), your page template is wrapped into a response object and returned. So you should …
Comment by
WanWizard
March 2013
permalink
Many to many relation not saved for current user
If you enable the profiler, which queries are fired when you save? And which FuelPHP version are you on? I don't see a reason (in this bit of code) why it would work for user A but not for user B.
Comment by
WanWizard
March 2013
permalink
xss_clean recommendations?
Don't know what note you mean, but I assume the potential performance impact? We include htmlawed, which is one of the fastest available, but still, if you clean a lot, you will notice the impact. The big question is: is it really needed. Y…
Comment by
WanWizard
March 2013
permalink
How do I deal with fuel/core (new commits)
If you haven't changed anything, you can just empty fuel/core, and do a new clone of the core repo.
Comment by
WanWizard
March 2013
permalink
How do I deal with fuel/core (new commits)
This cd fuel/coregit pull origin 1.6/developcd ../..git add fuel/coregit commit -m "update core"git push origin master Should update the submodules just fine. This is how we update the submodule references in the fuel/fuel repository all…
Comment by
WanWizard
March 2013
permalink
Get cache expiration time
It's on our very long todo list. You're the first one in two years that has asked about it... ;-)
Comment by
WanWizard
March 2013
permalink
Get cache expiration time
If you want to go beyond the simple static interface, you'll need to switch to "advanced usage". Use Cache::forge("some_cache") instead. It will return a Cache_Storage_Driver instance with your cache data in it. It has a g…
Comment by
WanWizard
March 2013
permalink
Nesting Template Controller
Perhaps you should post the code of Controller A, B and your template (on http://snipr.it) so I can have a look at it and tell you where you've gone wrong?
Comment by
WanWizard
March 2013
permalink
Sanitising Model_Crud
All data passed to a view is encoded by default, which will make malicious code harmless. Model_Crud objects are not whitelisted, so I don't see why they shouldn't be encoded.
Comment by
WanWizard
March 2013
permalink
Nesting Template Controller
That's not different from what I said. You need a base controller (your controller A) which sets up the page template, and fills in all static sections of the template, in the before() method of the base controller. Your app controller (contr…
Comment by
WanWizard
March 2013
permalink
this may be a jst php quection
Configure your session by copying fuel/core/config/session.php to app/config and change it to choose your session storage. Then use Session::set() to store data in the session, and Session::get() to retrieve it in another request. See http://fuelp…
Comment by
WanWizard
March 2013
permalink
How do I make temporary bug fixes in the ORM without messing up my git repo?
You don't have to, your PR has been merged. Although is probably better to relocate the update_original() call, which should do this. I'll have a look at that later.
Comment by
WanWizard
March 2013
permalink
How do I deal with fuel/core (new commits)
If you cloned fuel/fuel locally, it contains submodules for the other repositories. Submodules are pointers to a specific commit hash in an other repository. If you update that other respository, or switch branches, git sees that the latest commit …
Comment by
WanWizard
March 2013
permalink
Lang files -> Need help !
Perhaps you can share your solution, so it might help others having the same question?
Comment by
WanWizard
March 2013
permalink
I set default_format to json, but my REST controller still output array data
Oh, and it's considered bad practice to fix your response type. It should be up to the caller to specify the return format, not the API. Which is why it is implemented this way. If you want json returned, either use the ".json" exten…
Comment by
WanWizard
March 2013
permalink
I set default_format to json, but my REST controller still output array data
default means default: a value used if no other means of detecting the format is available. I added the way the format is determined to the docs recently: http://fuelphp.com/dev-docs/general/controllers/rest.html#/format_determination As you can s…
Comment by
WanWizard
March 2013
permalink
Nesting Template Controller
I'm not sure I understand what you're trying to do. You have "Controller_B extends Controller_A extend Controller_Template"? That should not be a problem. If both A and B need to add something to the template, you'll have …
Comment by
WanWizard
March 2013
permalink
Lang files -> Need help !
Ah, you didn't say that before. You can only load a file (language, config, etc) from a module in your in the "module context", i.e. if the request resolves to a module controller. It is considered bad design to do cross module call…
Comment by
WanWizard
March 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,370
Last Active
2:32PM
Roles
Administrator