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
Image class and bgcolor in preset
Sorry, just noticed that in your first post. ;) I'll have to setup some test code to see exactly what happens. I read that a lot of people are struggling with this, and code that works for some doesn't work for others, so I wonder is it…
Comment by
WanWizard
April 2016
permalink
Image class and bgcolor in preset
I've never used Image personally, so I have to dive into it. Which driver are you using (see your image.php config file)?
Comment by
WanWizard
April 2016
permalink
Empty file input cause upload error
That error is generated by the upload class, when you ask it to process uploaded files, but $_FILES is empty. So if your file upload is optional, you need to check if there is a file before you ask Upload to process it. Alternatively, put the Uplo…
Comment by
WanWizard
April 2016
permalink
Change language in a loop
If that is what the profiler reports, than those queries have actually run. I expect the issue is related to ORM object caching, because you are not using WHERE clauses in the ORM query, you hacked a variable where in using the condition. Since bo…
Comment by
WanWizard
April 2016
permalink
php oil refine robots
It should also work from the commandline with the E added to the variable order. I'll try to setup a Windows VM later to verify this, and update the docs if needed (unless you can verify this for me).
Comment by
WanWizard
April 2016
permalink
Change language in a loop
Looks like a very complex way of achieving this, but I don't immediately see why that would be a problem. All your code is in a controller, you don't run queries in a view? If you enable the profiler and enable database profiling, what d…
Comment by
WanWizard
April 2016
permalink
Change language in a loop
I can't comment, I don't see any relation between a config key and an ORM query? How does the ORM know what language strings you want from the DB?
Comment by
WanWizard
April 2016
permalink
php oil refine robots
Can you also check your php.ini? If it doesn't contain: variables_order = "EGPCS" or it is missing the "E", then the environment isn't populated. And the last possible issue that depending on PHP version, PHP type…
Comment by
WanWizard
April 2016
permalink
php oil refine robots
So no environment variable is set (or passed) at all? For WAMP you can also add it to your .htaccess: setEnv FUEL_ENV production In the default .htaccess delivered when you installed the framework there is already a commented out example. I d…
Comment by
WanWizard
April 2016
permalink
php oil refine robots
If it displays the wrong environment, can you do: set FUEL_ENV=something && php -a and then on the PHP interactive prompt, dump $_ENV and $_SERVER ? We've noticed that depending on the PHP version and the way is called, sometimes…
Comment by
WanWizard
April 2016
permalink
php oil refine robots
The development environment is default, so passing that or not should not be any difference. If you do this: set FUEL_ENV=production && php oil -v what does Fuel say the environment is?
Comment by
WanWizard
March 2016
permalink
Permissions issue with ormaut
I checked the code, all fixes are from before the 1.7.3. release, so that can't be it. What role is assigned to this user? I checked the code, the only reason $global_access can be true, is if the user has a role assigned that has the "A&…
Comment by
WanWizard
March 2016
permalink
Permissions issue with ormaut
It is indeed the 3rd value, indication admin access. The array contains: array($current_rights, $revoked_rights, $global_access); What version of Fuel are you on? There were some bugs in early 1.7 version regarding the calculation of the users…
Comment by
WanWizard
March 2016
permalink
Error by using Response::redirect before Session::set
I can't say, I can only imagine that (also given your reply) the cart package saves a lot of data in the session. Don't forget that cookies are encrypted, and it is the encrypted size that counts, so it's quite possible for a session…
Comment by
WanWizard
March 2016
permalink
Error by using Response::redirect before Session::set
That must be something in the code, and not related to the session. If you get to the 4K boundary for cookies, you would loose the entire session, including logged-in state, and not only the last product. Since I don't know the "cart pack…
Comment by
WanWizard
March 2016
permalink
REST Controller response in gzip compression?
Don't you think that Chome wouldn't display you the content in readable format if it was compressed? If you want to make sure, you can use a network sniffer like Wireshark, or use telnet: [wanwizard@catwoman] $ telnet localhost 80 Trying…
Comment by
WanWizard
March 2016
permalink
Injecting Value to Json Response
The easiest is probably to extend the Hybrid controller, and overload the after() method. There you can access the data array before it is converted to json.
Comment by
WanWizard
March 2016
permalink
Migrate
Eh... how about http://fuelphp.com/docs/general/migrations.html ?
Comment by
WanWizard
March 2016
permalink
Migrate
What exactly do you want to know?
Comment by
WanWizard
March 2016
permalink
Fuelphp upgraded : errors in model->delete()
Double check your relation definitions, are they ok? Every relation should have a "belongs_to", and it must be on the model that has the foreign key.
Comment by
WanWizard
March 2016
permalink
Check a model that contain the relation
Is this a permanent or an optional filter? If it is a permanent filter, you can define conditions on the relation definition, in the form of WHERE clauses. See http://fuelphp.com/docs/packages/orm/relations/intro.html under "Configuration opti…
Comment by
WanWizard
March 2016
permalink
Getting Error! Orm\FrozenObject [ Error ]: No changes allowed. while deleting parent
Also, You get this error if you are trying to modify the object while it is in the process of being deleted. So your observers should check the frozen state before modifying them. if ( ! $model->frozen()) { // change the object. }
Comment by
WanWizard
March 2016
permalink
Getting Error! Orm\FrozenObject [ Error ]: No changes allowed. while deleting parent
Most common cause is incorrect definition of relations, i.e. the belongs_to is defined on the wrong model. Afaik the code deletes parents after children, because you would run into problems with database constraints if you do it the other way aroun…
Comment by
WanWizard
March 2016
permalink
Is there a way to access the other fields when using a custom validation?
If you want to access another field while validation one, check rules like "match_field" or "required_with" in the Validation class. Both do that.
Comment by
WanWizard
March 2016
permalink
Fatal error while joing many related table
DB::query() returns raw row responses, either in an array or in an object. ORM get() does the same, but then hydrates the result by spliting the row into the different objects the row contains, creating relations between the objects, etc. In case …
Comment by
WanWizard
March 2016
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,368
Last Active
4:53PM
Roles
Administrator