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
Upload error
Did you check the app log? Any exceptions in there? This can only happen if static::$upload isn't set. It is set when the class loads, which throws an exception if it can't be set. You can double check using the console: > php oil conso…
Comment by
WanWizard
December 2017
permalink
"No changes allowed" when attempting to delete parent model
Before I start chasing ghosts, could you swap your current packages/orm directory for the 1.9/dev version (https://github.com/fuel/orm/archive/1.9/develop.zip) and see if you still have the problem? Just rename your current ORM directory and unpack …
Comment by
WanWizard
December 2017
permalink
"No changes allowed" when attempting to delete parent model
Can you provide the code that leads up to the error, and the backtrace displayed with the exception?
Comment by
WanWizard
December 2017
permalink
php error
Use the _init method: public static function _init(){ static::$_conditions['where'] = ['system_id', \Config::get('system_id')];}
Comment by
WanWizard
December 2017
permalink
Router name with 1.9/dev
module routes are loaded in Request, when a module controller is called. It was never contemplated that you would want to get a route from a module from either a global or an other module controller, as that would create a tight coupling between the…
Comment by
WanWizard
December 2017
permalink
Router name with 1.9/dev
This would be better, and you can ditch your extension: https://github.com/fuel/core/commit/4d620bfb3467ea8725836b1161f63f1e54421f2b
Comment by
WanWizard
December 2017
permalink
Router name with 1.9/dev
Found it. You are appearantly not on the lastest 1.8. https://github.com/fuel/core/commit/7fc62869b64a055e1887bd6e31bd0eee9b85a008 This moves loading the routes to before calling always_load, which means that only loading the module route config is …
Comment by
WanWizard
December 2017
permalink
Router name with 1.9/dev
\Config::load($module.'::routes', 'routes') returns false. Looking further.
Comment by
WanWizard
December 2017
permalink
Router name with 1.9/dev
Ah... Next time let me know, saves me quite a bit of time.
Comment by
WanWizard
December 2017
permalink
Router name with 1.9/dev
Looking in the code, module routes are only loaded on a request to that module, so module specific routes are only available when a controller in that module has been called. I don't see any changes in this code between 1.8 and 1.9/dev, so for …
Comment by
WanWizard
December 2017
permalink
Router name with 1.9/dev
Weird, since I did exactly the same. And I get a fully qualified URL back to /user/login and /user/logout. edit: ah, wait, you load the route in a controller OUTSIDE the module... I can reproduce that.
Comment by
WanWizard
December 2017
permalink
Router name with 1.9/dev
I can't reproduce it, works fine here. Is the module loaded? If not, the route config isn't parsed.
Comment by
WanWizard
December 2017
permalink
Router name with 1.9/dev
Very good question, I never use it, so I haven't noticed it. I'll have a look.
Comment by
WanWizard
December 2017
permalink
query on multi-categories
Sorry for the late response, had a firewall panic yesterday. ;-) Tried your code here on 1.9/dev, and no problem. It removes the junction record on the unset, and re-inserts it again on the assignment. See https://bin.fuelphp.com/snippet/view/OA So …
Comment by
WanWizard
December 2017
permalink
query on multi-categories
Thanks. I'll have a look later today,
Comment by
WanWizard
December 2017
permalink
query on multi-categories
Ok, clear. So it tries to insert a new junction record while one already exists. This suggests that breaking the relation fails, which would mean a major bug. Can you also post your models and the table creation code, so I can replay your situation …
Comment by
WanWizard
December 2017
permalink
query on multi-categories
SQLSTATE[23000] suggests you have defined foreign key constraints? Do you have information on what code exactly generates this error? And the complete error text?
Comment by
WanWizard
December 2017
permalink
query on multi-categories
Thanks for figuring it out yourself. ;-) I was busy elsewhere...
Comment by
WanWizard
December 2017
permalink
Php compiler
Not that I am aware of. I don't know anyone who tried or felt the need to.
Comment by
WanWizard
December 2017
permalink
I have a question regarding simpleAuth
You have to do that for both. There are two options, either write your own driver (using the Auth_Login_Simpleauth class as a template), or extend Auth_Login_Simpleauth, and overload the methods you need to overload. Which one is best depends on how…
Comment by
WanWizard
December 2017
permalink
I have a question regarding simpleAuth
1. Not out of the box. You will need create your own Auth class, by extending the Auth_Login_Simpleauth class, and replace the perform_check(), login(), logout() and validate_user() methods. 2. Not out of the box. Auth supports multiple driver insta…
Comment by
WanWizard
December 2017
permalink
Problem with the config class in a template controller
As it is the parent's before method that creates the View, you need to call it after you have created it. If not, you'll just waste CPU by creating the object twice. before() doesn't render the template, it just creates the view objec…
Comment by
WanWizard
December 2017
permalink
Problem with the config class in a template controller
It depends on when what is created and rendered. A View object stores the language at the moment of creation, so that you can render views in multiple languages, without being reliant on when exactly the view is rendered. If you use Contoller_Templa…
Comment by
WanWizard
December 2017
permalink
Crypt Class - minimum value length?
No. $ oil consoleFuel 1.9-dev - PHP 7.1.12 (cli) (Nov 22 2017 06:09:34) [Linux]>>> $x = '';>>> $y = Crypt::encode($x)>>> $z = Crypt::decode($y)>>> echo $z>>> So even an empty string is fine.
Comment by
WanWizard
December 2017
permalink
Passing config params to an Orm Observer
If the file is /classes/observer/encryption.php, and the class is called "Observer_Encryption", then it doesn't have a namespace (it is in the global namespace). This explains exactly how it works: https://fuelphp.com/docs/general/nam…
Comment by
WanWizard
December 2017
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,366
Last Active
April 29
Roles
Administrator