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
MongoDB Json Response ID Object
Better pop into #fuelphp on IRC and see if you can get hold of someone, I haven't used Mongo_Db. A get() runs: $documents = $this->db->{$collection}->find($this->wheres, $this->selects)->limit((int) $this->limit)->skip…
Comment by
WanWizard
August 2013
permalink
Using Select...INTO Outfile
Just use DB::query(), you can fire any query you like. Note that since you have to write the SQL yourself, you are not protected against SQL injections, so make sure you quote everything.
Comment by
WanWizard
August 2013
permalink
Nesting Views
Normal Asset calls (like for img) work, but you can't use Asset in a child view to add an additional CSS file to the page header, because by the time you get to rendering the child view, the page header is already rendered. Global variables ar…
Comment by
WanWizard
August 2013
permalink
Nesting Views
If it works for you, then why not use it? Fuel doesn't want to be restrictive in any way. Only thing you have to be careful about is rendering sequence. This way, parent views are rendered before child views, which means your child views can n…
Comment by
WanWizard
August 2013
permalink
Translations and Localizations
At the moment internal strings are hardcoded. Problem is that in most cases, they are error messages or exceptions, and when those happen, you don't want to be dependent on half the framework to be able to display them. We're thinking abo…
Comment by
WanWizard
August 2013
permalink
Sessions across subdomains
If you have subdomains (like a.example.org and b.example.org), you need to set the 'domain' to ".example.com", so your domain name plus a leading dot. If not set it defaults to hostname.
Comment by
WanWizard
August 2013
permalink
Date::create_from_string() timezone issue
Unix timestamps are always in UTC, other datetime's are always local time, this is how PHP works. Which means indeed you're borked if you have to work across timezones. The fact that you get -3600 back is already an indication that there&…
Comment by
WanWizard
August 2013
permalink
Why can't I interrupt the REST controllers response before after() is called
Your get_test() method needs to return the response from $this->fail(). After() checks if the return value is an instance of Response and if not it will create one (in this case with a null value, since that is what you return now).
Comment by
WanWizard
August 2013
permalink
How to check user whether they logged in or not at each page?
if (\Auth::check()) { echo "User is logged in"; } Your controller should extend one of the base controllers, but at least \Controller. before() is just another method, so if you want to check in there, add it to your controller.
Comment by
WanWizard
August 2013
permalink
Logs permissions problem on debian
Problem is that this exception "hides" the original error. Go into fuel/core/classes/log.php, and before the "throw" on line 77 add: var_dump($e->getMessage()); die(); which will give you the error that caused the exception…
Comment by
WanWizard
August 2013
permalink
OrmAuth has_access
Are you running in 'development' or 'production' mode? You should get an error if the cache folder isn't writable...
Comment by
WanWizard
August 2013
permalink
ORM Relation where clause
I don't really have a solution at the moment.
Comment by
WanWizard
August 2013
permalink
REST controller HTTP methods
Correct.
Comment by
WanWizard
August 2013
permalink
OpAuth Why should we have email or password to create user?
This is exacly how it works. if there is an authenticated local user, the login is joined, and you're done. If there is no authenticated local user, you get "register" back. You can decide in your applications auth controller how to…
Comment by
WanWizard
August 2013
permalink
Pre-populate a select input from Orm Model with relationship
There is no support (in Fieldset or ORM) to do this automatically. Best place to do it, it in the set_form_fields() method of the model, which is only called when you use add_model() on a fieldset. If you use _init() the population always happens w…
Comment by
WanWizard
August 2013
permalink
ORM Relation where clause
That is actually quite difficult to fix without a major rewrite of the code, there's already an issue open for it. I don't think it's going to be adressed in 1.x, for 2.0 ORM is going to be largely rewritten, so we'll pick it u…
Comment by
WanWizard
August 2013
permalink
ORM Relation where clause
This is an array from the find() syntax? I never use that, but that should support this notation as well. Can you post the full query? What if you do: $result = Model_Product::query()->related('order')->where('product.tempor…
Comment by
WanWizard
August 2013
permalink
ORM Relation where clause
You need to specify the relation name there, not the model name. Is the relation called 'order'?
Comment by
WanWizard
August 2013
permalink
Composer issue
I changed it in the repository, and that automatically updates packagist. Composer should automatically pick up the new version. I think your local composer.json requires version 2.0 of the Upload package. Change that to "dev-master". We…
Comment by
WanWizard
August 2013
permalink
Composer issue
Doesn't look like it likes the "5.3.3" version number, I've changed it to "5.3". Can you run the update again?
Comment by
WanWizard
August 2013
permalink
OpAuth Why should we have email or password to create user?
No, you're not missing anything. The Auth package is based on a local users table, so if no entry in that table exists, in needs to be created. The reason why a login is asked is that there is no way to determine that my facebook login and b…
Comment by
WanWizard
August 2013
permalink
REST controller HTTP methods
Please create a feature request for this at https://github.com/fuel/core, with a definition of your use-case.
Comment by
WanWizard
August 2013
permalink
Type Hints causing 4096 error
PHP does not support scalar typehints. so "string" is not a valid typehint. Fuel doesn't do anything. If you write function blah(string $string) it will will typehint against a class called "string", not the scalar value …
Comment by
WanWizard
August 2013
permalink
New Language Model
In that case it's not a language string, so you shouldn't treat it as such. It's an intergral part of the design, it is application data. In this case a product that has descriptions in multiple languages. If it was only a single desc…
Comment by
WanWizard
August 2013
permalink
Type Hints causing 4096 error
Please, no code pastes here, use http://bin.fuelphp.com for that (and post the link instead). Your problem is that you can't typehint "string". So PHP assumes it's a class name, and if you pass a string, it's not an instanc…
Comment by
WanWizard
August 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
11:25AM
Roles
Administrator