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
Auto Increment in MySQL and creating new Records
Ok. So you always submit the form to the save action. No problem. Make sure you include the users PK in the form action in case of an edit, like "/users/save/12". Then in your save method you can use that id to fetch a user object: publi…
Comment by
WanWizard
June 2013
permalink
SimpleAuth
The Auth migrations check the app/config/auth.php configuration file to see what Auth driver you have configured. It supports either "Simpleauth" or "Ormauth". Any other value is ignored, and these values are case sensitive. As …
Comment by
WanWizard
June 2013
permalink
Is Not Model_Soft "deleted_at" Setted Automatically by ORM sql builder?
Where should it set that? It won't do that until you delete something. Your running a get() in your controller, which produces that SELECT statement. In other words, it only selects records that were not deleted.
Comment by
WanWizard
June 2013
permalink
ORM cache problem
understandable.
Comment by
WanWizard
June 2013
permalink
ORM cache problem
You have this problem because objects are passed by reference (by default), so every ORM object reference for the same record will point to the same object. First remark I'd like to make: your doing it wrong. Clearly you have a need for that k…
Comment by
WanWizard
June 2013
permalink
Issue with Model_Soft and cascade delete
Please report this as an issue at https://github.com/fuel/orm/issues so it can be looked at.
Comment by
WanWizard
June 2013
permalink
slightly modifying OrmAuth to add slug column
Odd. I have no explanation for it. Time to debug the ORM model and/or the observer?
Comment by
WanWizard
June 2013
permalink
Nested Sets Export Data to JsTree (JSON)
From what I can see, you did it correctly. You can do a Debug::dump() on the result of the method call to check, but I'm pretty sure it's going to be all arrays. That is not my point though, my point was that array(array('color…
Comment by
WanWizard
June 2013
permalink
Nested Sets Export Data to JsTree (JSON)
on line 34 you have to remove "(object)". on line 46, 'children' should be $children. on line 27, 'left_field' should be $left_field. on line 28 and 71, 'right_field' should be $right_field. Cosmetic details,…
Comment by
WanWizard
June 2013
permalink
Nested Sets Export Data to JsTree (JSON)
{} is an object, [] is an array. I used objects (stdClass) because your example used object notation. If that has to change, you need to change the use of stdClass to an array, and also every use of tracker then needs to use array notation instead …
Comment by
WanWizard
June 2013
permalink
Nested Sets Export Data to JsTree (JSON)
Great product, this jstree. Why would it care what else is in the object? It's not going to be easy to rewrite this, is uses assignment by reference to keep track of elements in the tree, and it needs the pointers for that. You can remove the…
Comment by
WanWizard
June 2013
permalink
Nested Sets Export Data to JsTree (JSON)
Ah, the jstree node constructed in the closure doesn't contain the pointers, which is why it fails. Try this: http://bin.fuelphp.com/snippet/view/hC
Comment by
WanWizard
June 2013
permalink
Nested Sets Export Data to JsTree (JSON)
$right_field you mean? It's a variable defined at the top of the method, and should contain the configured column name of the records right pointer (default 'right_id').
Comment by
WanWizard
June 2013
permalink
ErrorException [ Error ]: Class 'Controller_Panel' not found
Then I'm out of idea's. Nothing really significant has been changed between 1.5 and 1.6, certainly nothing that would break existing controllers.
Comment by
WanWizard
June 2013
permalink
ErrorException [ Error ]: Class 'Controller_Panel' not found
Are you sure you're running PHP 5? FuelPHP requires 5.3.3+. ReflectionClass::newInstance() is a class build into PHP 5+, It must be defined. That may also explain the other issue, pre PHP5 diidn't do namespaces.
Comment by
WanWizard
June 2013
permalink
ErrorException [ Error ]: Class 'Controller_Panel' not found
You haven't changed the controller prefix in your config? Your COREPATH definition in your index.php is still correct? Do other controllers work?
Comment by
WanWizard
June 2013
permalink
ErrorException [ Error ]: Class 'Controller_Panel' not found
Where is this class in the file system (path and filename)? And how is it defined? There have been no changes in how classes are loaded (that would be a major break of backward compatibility). Looking at the name it should be in app/classes/contro…
Comment by
WanWizard
June 2013
permalink
Nested Sets Export Data to JsTree (JSON)
I never said it was tested and bug free... ;-) Try if ($treenode->{$left_field} > $tracker[$index]->{$right_field})
Comment by
WanWizard
June 2013
permalink
Nested Sets Export Data to JsTree (JSON)
It's not simple to change the logic of dump_tree, it makes heavy use of pointer referencing to keep track of current and parent nodes, to build the multi-dimensional view of the tree. You can try this as a starting point: http://bin.fuelphp.co…
Comment by
WanWizard
June 2013
permalink
Nested Sets Export Data to JsTree (JSON)
Isn't a Format::forge($dumpresult)->to_json(); sufficient? You might have to use a dump_tree(true) to have an object tree returned, instead of an array.
Comment by
WanWizard
June 2013
permalink
Get some ORM objects with relation if...
I would do that with two relations: - gallery has_many pictures - gallery has_one coverpicture both pointing to the same Model_Picture, and add a picture_id to gallery as FK for the cover picture. Assuming your controller logic makes sure a cover…
Comment by
WanWizard
June 2013
permalink
LSB bug? Or when can I use ORM models in init process 1.5.x
I don't see why that would not work, the framework is initialized at that point, the only thing not setup is the locale. It is a very complicated setup though, it would be a lot more logical to not overload Fuel and Module, just create a separ…
Comment by
WanWizard
June 2013
permalink
Auto Increment in MySQL and creating new Records
Let me try to understand what (imho complicated) setup you have: You have an action add() and edit(), both displaying a form. In case of add, an empty one, in case of edit, a populated one. Right? Then the form has buttons, each in their own form …
Comment by
WanWizard
June 2013
permalink
Remove validation on field with Fieldset
You are absolutely right, I was sleeping. I'll update the docs. It needs $form->field('group_id')->delete_rule('required')->delete_rule('is_numeric'); after disabling it. You need to do the same in…
Comment by
WanWizard
June 2013
permalink
slightly modifying OrmAuth to add slug column
I used this, and it generates the slug just fine:
Comment by
WanWizard
June 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,368
Last Active
3:49AM
Roles
Administrator