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
Oil created doesn't work
I've updated the package (in 1.7/develop) to capture the use of "oil create" inside an existing installation, and display an error message instead of just dumping the help...
Comment by
WanWizard
August 2013
permalink
Oil created doesn't work
On second thought: If can also be that you try to do a 'oil create" from a folder that already has FuelPHP installed. In which case it refuses to do a create, and will start the frontloader instead. Which does not have a create method.
Comment by
WanWizard
August 2013
permalink
Oil created doesn't work
No need to quote everything. As I said, "create" is not implemented in the php frontloader, so "php oil" doesn't help you. The problem is root@www1:/var/www# oil-bash: /usr/bin/oil: No such file or directory which probabl…
Comment by
WanWizard
August 2013
permalink
Oil created doesn't work
oil create is not a command of the PHP frontloader, it's a feature of the bash script. So if you haven't done curl get.fuelphp.com/oil | shyou won't have that available
Comment by
WanWizard
August 2013
permalink
Primary Key on Model Cannot be Changed (Model with Complex PK)
Correct.
Comment by
WanWizard
August 2013
permalink
Issue with 404 Handling
On an API call it shouldn't throw an HttpNotFoundException, the calling client wouldn't know what to do with it, it expects a REST response. On a browser call, when you have extended Controller_Rest it should still return the "no-met…
Comment by
WanWizard
August 2013
permalink
Primary Key on Model Cannot be Changed (Model with Complex PK)
I've added this issue to the todo list of the v2 ORM.
Comment by
WanWizard
August 2013
permalink
Primary Key on Model Cannot be Changed (Model with Complex PK)
You can not have a column which is at the same time FK and PK. Which you have on your Model_CustomValue. The reason for that is that when you disconnect a relation, the FK will be set to NULL, which should not happen with a PK.
Comment by
WanWizard
August 2013
permalink
Markdown issues
The reason people want to Whitelist the View class is that they pass View objects to views, for example in a template/partials system. The problem I (personally) have with whitelisting (in general), is that it is no longer visible what you're …
Comment by
WanWizard
August 2013
permalink
CALLBACK VALIDATION - CUSTOM VALIDATION
@SyntaxIb. Classes in strings are always relative to global, so a leading backslash is not needed. As for documentation, the current documentation was setup as API documentation, for lack of alternatives, about three years ago. It's created i…
Comment by
WanWizard
August 2013
permalink
CALLBACK VALIDATION - CUSTOM VALIDATION
You get this error if: - you don't pass an object (which you don't) - the class you pass can not be found According to Fuel's naming rules, this class should be called Myrules (not MyRules), should be in a file called "myrules.p…
Comment by
WanWizard
August 2013
permalink
session db expiration
This is a bug, for some reason the updated timestamp wasn't updated. I've just pushed a fix to 1.7/develop, if you are on 1.6.x you can backport them without problems. Thanks for reporting this.
Comment by
WanWizard
August 2013
permalink
Date::range_to_array and Daylight Savings
It doesn't have any external dependencies, so you could use it now in any v1 application, probably only a namespace change is needed: https://github.com/fuelphp/common/blob/master/src/Fuel/Common/Date.php It requires the same type of config as…
Comment by
WanWizard
August 2013
permalink
Date::range_to_array and Daylight Savings
Short answer: No, most of PHP's date/time function haven't got a clue about timezones and DST. Long answer: This is addressed in Fuel v2, which has a completely rewritten date class that is fully timezone aware.
Comment by
WanWizard
August 2013
permalink
Load Language from Module
The formal answer is: do an HMVC call to a module controller method, and have that load the language file. As said before, if you need cross-module calling, you may have a design issue. If you absolutely insist, \Lang::load() allows you to pass a …
Comment by
WanWizard
August 2013
permalink
Language dont work from Modules
Modules don't have a config file, so anything in there will be ignored.
Comment by
WanWizard
August 2013
permalink
Language dont work from Modules
if you're in a module controller, and this controller is called either by a main Request or an HMVC Request, then loading a language file from that same module just works. So, where you do you the \Lang::load() call, and how did you get there?
Comment by
WanWizard
August 2013
permalink
Language dont work from Modules
This is related to your other question, where I said you should not call classes directly. Modules operate in what is called a module context. This context is set automatically when the router determines you are calling a module controller, either …
Comment by
WanWizard
August 2013
permalink
Question on fuel-depot for Message class
Yes. For depot (a project that is now dead), we didn't want external dependencies. But for your application stack, it's always a good idea to separate generic bits, in either packages or modules.
Comment by
WanWizard
August 2013
permalink
Module class in view
This class is called "Controller_Tasks", so a direct call would be \Tasks\Controller_Tasks ... And calling a controller directly is a bad idea, so I would suggest looking at your architecture again.
Comment by
WanWizard
August 2013
permalink
Problem with multiple query on a model
select() is not really supported in ORM. ORM caches query results, so if you run a second query for a PK you have already, you get the object from cache back. Partial selects create incomplete objects (properties missing), which is potentially ve…
Comment by
WanWizard
August 2013
permalink
Why is Fuel so popular in Japan?
Novius is French though, so that doesn't really explain it.
Comment by
WanWizard
August 2013
permalink
Best way to handle parameters for dual-use (HMVC and normal) controller
Correct. Same for other data containers too, like Config and Lang.
Comment by
WanWizard
August 2013
permalink
Best way to handle parameters for dual-use (HMVC and normal) controller
That is currently not possible, due to the v1.x architecture, in which most "data containers" are global. So there is only one Input class, that holds the global data. Fixing this is one of the major design goals for Fuel v2. You can work…
Comment by
WanWizard
August 2013
permalink
Lang-loading from Module
The language string container is global, so it doesn't matter from where you load a language file, you always access them the same way. They are not prefixed with a module or anything. You can not load a language file from a specific module, m…
Comment by
WanWizard
August 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,389
Last Active
2:53AM
Roles
Administrator