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
error downloading fuel
It is. https://status.github.com/
Comment by
WanWizard
November 2012
permalink
error downloading fuel
The links on this website point directly to github.
Comment by
WanWizard
November 2012
permalink
ajax call not possible with ORM?
No, there is no relation between doing an ajax call and any piece of code. You're approaching this all wrong. You should not echo out data, you shouldn't in any FuelPHP controller method. You need to return the data so it can be processed…
Comment by
WanWizard
November 2012
permalink
Class 'Orm\Model' not found
This has to do with the fact that before 1.4, all config was in your app/config folder. So you would see this structure when you opened the file. Because nobody updated their config when upgrading to a new version, we have decided to move all defau…
Comment by
WanWizard
November 2012
permalink
Module config.php
Have you tried what I suggested?
Comment by
WanWizard
November 2012
permalink
Weird check of $id param in oil generate scaffold result
Ah, chips. It will call delete() on the Query object! I desparately need to kick a former team member in the but!!! Added a null check to the delete template too.
Comment by
WanWizard
November 2012
permalink
Weird check of $id param in oil generate scaffold result
That's why I wrote "if $id === null or $id is not valid"... The delete action does: if ($yourname = Model_Yourname::find($id)) { $yourname->delete(); } I don't see how that can translate into "DELETE FROM yourname&…
Comment by
WanWizard
November 2012
permalink
Weird check of $id param in oil generate scaffold result
The correct way is to test the result of the find, like delete() does. If $id === null, or if $id is not valid, in both cases the find() will fail. And that should be captured here. I'll fix it.
Comment by
WanWizard
November 2012
permalink
Model validation outside of forms
And what does $e->get_fieldset() return?
Comment by
WanWizard
November 2012
permalink
MSSQL Support
Don't think so, as the issue is not driver, but SQL dialect. Where most RDBMS systems use (a variant of) ANSI-SQL, MSSQL uses Transact-SQL (originally from Sybase, aquired by MS when they bought the source of Sybase 4, which became the first …
Comment by
WanWizard
November 2012
permalink
Session and Management Sessions API
Sorry, I can't be online 24/7 :-) You want to access the session_id of the active session? Use \Session::key('session_id').
Comment by
WanWizard
November 2012
permalink
Module config.php
There is no relation between config files and lang files, so I'm not sure I follow you. What exactly do you want to do? You want to 'always_load' a language file from a module? That is not officially supported (a module should be s…
Comment by
WanWizard
November 2012
permalink
Setup fuelphp on remote server
There's nothing difficult about it: define('APPPATH', '/path/to/your/app/folder'); If "/home/admin/domains/my.domain.com/fuelphp/fuel/app" is indeed the correct path then your server has a security setup that pre…
Comment by
WanWizard
November 2012
permalink
Form::slect and DB query (Selected value)
I've never used the Form class directly (I always use fieldsets) so I had to look it up. The selected values is the second parameter of Form::select(), it is also documented that way. You pass an empty string ( "" ), so if that is no…
Comment by
WanWizard
November 2012
permalink
Form::slect and DB query (Selected value)
I assume you have a the selected value somewhere? For example from the model you load and display? Is that department_id? Lets assume it is:
Comment by
WanWizard
November 2012
permalink
Form::slect and DB query (Selected value)
The simplest way to add a placeholder is to add "array('' => 'select me!')" to the front of the options array, as the first value will be selected if no option is selected. You select an existing value as I showed y…
Comment by
WanWizard
November 2012
permalink
Weird check of $id param in oil generate scaffold result
What version of Fuel are you using? If I check the template for the view action (they are in oil/views), I see is_null($id) and Response::redirect(''); $data[''] = Model_::find_by_pk($id); Which checks first, then loads the mode…
Comment by
WanWizard
November 2012
permalink
Setup fuelphp on remote server
You need to set the paths in your index.php (APPPATH, COREPATH and PKGPATH) correctly. By default they are calculated using relative paths based on the location of your index.php. Which no longer works if you symlink that path, but not the others..…
Comment by
WanWizard
November 2012
permalink
Model validation outside of forms
The fieldset is passed back in the exception. You can access it on the exception object using the get_fieldset() method. Using the fieldset, you can access the corresponding validation object, which in turn gives you access to the errors. public fu…
Comment by
WanWizard
November 2012
permalink
v1.3 question about output of field from database
From a security point a very bad descision, that will disable all encoding! If you want to pass something to your view unencoded, use set_safe(), or the third parameter of set(). So do: $this->template->content = View::forge('news/vie…
Comment by
WanWizard
November 2012
permalink
Getting User Groups??
Are you sure it's this, and not the fact that you have a cookie issue? Have you checked if your session cookies are ok? If your time configuration is not ok (server timezone === php.ini date.timezone === fuel config timezone), GMT time calcul…
Comment by
WanWizard
November 2012
permalink
Getting User Groups??
The default instance is accessed via Auth::instance(). All static method calls also use the default instance, so as long as you don't create a second instance manually, there won't be one that could be used. The issue is that the prototyp…
Comment by
WanWizard
November 2012
permalink
Session not on every page? Keeps logging me out?
Good to hear you've got it fixed!
Comment by
WanWizard
November 2012
permalink
Form::slect and DB query (Selected value)
What do you mean by "default selected value"? If you want to select a value from the array as the default, you have to add a value to the attribute array:
Comment by
WanWizard
November 2012
permalink
Updating a many_many model on a related model
Assuming "->departments" is the relation, you can not assign strings to it, you have to assign related model objects to it. For a has_one/belongs_to relation, that is a single object, for the others, it's an array of objects. Agai…
Comment by
WanWizard
November 2012
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,396
Last Active
8:54PM
Roles
Administrator