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
Can't Run Migration
I don't know if that is right? Is the socket file really there? The only difference in environments is the config that is used, so that shouldn't matter.
Comment by
WanWizard
July 2014
permalink
Subfoldersin Modules
In the global routes, in app. Module routes are only read when the request URL points directly to the module, and you need routing before that.
Comment by
WanWizard
July 2014
permalink
Can't Run Migration
It's probably a question you have to ask FortRabbit. It just means your PDO driver can not connect to the database. If the database is on the local machine, it could be that it looks for the socket file in the wrong location, with something l…
Comment by
WanWizard
July 2014
permalink
Subfoldersin Modules
You're not doing anything wrong, That is simply not supported. What you can do is change the layout slightly: modules folder (modules) -> admin folder -> adminmodules folder -> admincore folder -> adm…
Comment by
WanWizard
July 2014
permalink
Error in DB::query() parameter compilation with null parameter?
Isn't that logical? param() and parameters() are just about variable injection. There is no logic in there to replace the equal sign you have coded in your SQL yourself. It would be a better to use: $param = null; $rs = DB::select()->fro…
Comment by
WanWizard
July 2014
permalink
Tasks - DB error
As scary as running your app off dropbox? ;-)
Comment by
WanWizard
July 2014
permalink
Tasks - DB error
It's a rubbish error message, but what Google tells me it means PDO can not connect to your database. This is a similar issue of someone using dropbox: http://stackoverflow.com/questions/7949319/yii-error-while-excecuting-custom-command
Comment by
WanWizard
July 2014
permalink
Upload in REST API
If you use POST, then PHP will do the decoding of the input. For others, the framework has to to it, and currently it does only support www-form-urlencoded, and no multipart-data (which is quite complex to parse).
Comment by
WanWizard
July 2014
permalink
Upload in REST API
That is afaik currently not supported. You can add a feature request at https://github.com/fuel/core/issues with this use-case.
Comment by
WanWizard
July 2014
permalink
TO upgrade fuelphp or start fresh?
In terms of API, version 2 will be largely compatible. There is going to be quite a bit of renaming involved, as v2 implements PSR-2 (camel casing instead of underscores). For an idea of the task ahead, see https://github.com/fuelphp/fuelphp/blob/ma…
Comment by
WanWizard
July 2014
permalink
Inser Cascade with orm
What is "the photo field"? This is the correct sequence for creating a related object: $post = Model_Post::forge();$post->photos[] = Model_Photos::forge(array('field' => 'value')); $post->save(); But as you …
Comment by
WanWizard
July 2014
permalink
Download file broken on FuelPHP home page?
No, it's not. As described in the blog post on the release, as of version 1.7.2 Fuel requires composer. You already had to run it for external dependencies, you now also need it for all Fuel packages too.
Comment by
WanWizard
July 2014
permalink
Autoload problem?
I don't know what you are trying to do, both packages are composer packages, so Composer will take care of the autoloading, there is no need for you to do anything else. I just ran a new install, and here, autoload_psr4.php is empty, both are …
Comment by
WanWizard
July 2014
permalink
ORM can't get relation when key_to and key_from are the same
Is your table and model definition correct? This is a has_one relation, which maps the primary key of Model_Post to the foreign key in Model_Profile and Model_Post. So the key_from in both definitions must be the primary key, and since they are d…
Comment by
WanWizard
July 2014
permalink
Lang configuration with DB
Cool. Happy coding! ;-)
Comment by
WanWizard
July 2014
permalink
Recommended wysiwyg editor for Fuel PHP
wysiwig editors are frontend, and don't have any relation to the framework. That just sees a posted textarea come in. So any one will do, depending on your requirements. If you want to validate HTML, you can clean it using \Security::xss_clean…
Comment by
WanWizard
July 2014
permalink
TO upgrade fuelphp or start fresh?
Yes, absolutely. There is a world of difference between the two version. We don't believe in a version number race, we only change major version numbers where there is a major change. In other frameworks, the current 1.8/develop would maybe be…
Comment by
WanWizard
July 2014
permalink
Lang configuration with DB
And you need to load it before you can use it. Language data isn't loaded automatically.
Comment by
WanWizard
July 2014
permalink
Installing Fuel 1.x using Composer only
Corrently you can only install 1.8/develop through composer, using composer create-project fuel/fuel:dev-1.8/develop --prefer-sourceYou can install a master version through composer as of 1.7.2, which is due to be released.
Comment by
WanWizard
July 2014
permalink
Lang configuration with DB
Language runs in the request context, so it depends on where you have used Lang::get('inicio'); And where you have loaded it. So a bit more information is needed.
Comment by
WanWizard
July 2014
permalink
Orm Observers
Yes, that should work fine.
Comment by
WanWizard
July 2014
permalink
ORM query, why does the array get index by pk instead of an array
A get() always returns an array of objects, and any "many" relation is also always an array of objects. Doesn't matter if there is only one returned or not. The goal here is that the result is consistent, no matter what the result is…
Comment by
WanWizard
July 2014
permalink
Orm Observers
No, that won't work, because that observer would only see a single comment, it has no view on the rest, you have to do it from Post. $post = Model_Post::find(1); $post->comments[] = Model_Comment::forge(array('field' => 'v…
Comment by
WanWizard
July 2014
permalink
Orm Observers
You need to define the observer on your Model_Post, which is what I assume has the nb_comments counter, not on Model_Comment. The ORM will automatically pass the correct object, you don't have to do anything (other then define the observer in …
Comment by
WanWizard
July 2014
permalink
Unable to connect to MS SQL DB Using PDO DBLib within a controller.
You seen the notes here: http://www.php.net/manual/en/mssql.requirements.php ? So there is an updated dblib available, but you need to install that manually.
Comment by
WanWizard
July 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,382
Last Active
1:29AM
Roles
Administrator