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
Invalid rule while validating date
First a remark: do not reference Fuel\Core directly, but use \Validation::forge(). It doesn't cause your issue, but it may cause extension and class reference issues. the valid_date rule is defined in the Validation class itself, so it is very…
Comment by
WanWizard
May 2013
permalink
Routing problems
Can you check on your shared server, in Input::uri(), what mechanism is used to determine the URI? And what kind of PHP installation is used (webserver, php-sapi, mpm or fcgi)?
Comment by
WanWizard
May 2013
permalink
Routing problems
So it does route to the correct controller, but only to the index action of that controller? That is odd, since both action and controller are URI segments, I don't see how one can work and the other one not.
Comment by
WanWizard
May 2013
permalink
Better coding practise for including Views?
When you use the Theme class, you should not use set() on the page template for anything other then template variables, but use set_partial() to set client views on the template. I use this system: * in before() of my base controller: // define t…
Comment by
WanWizard
May 2013
permalink
lots of url in one module
You need to get the page number in your controller, and use that to run the correct query. Any additional URI segments are passed to the controller action as parameters: namespace T_History; class Controller_Search extends \Controller { publi…
Comment by
WanWizard
May 2013
permalink
Accessing Log in fuelphp ?
There a no features to parse logs at the moment.
Comment by
WanWizard
May 2013
permalink
Query Binding Problem Convert String automatically
Because you should quote all identifiers for security reasons (and for possible column name vs keyword conflicts). It's not a problem to use DB::expr(), but you will have to quote your identifiers manually (which makes your code not portable a…
Comment by
WanWizard
May 2013
permalink
Class "Format" ignoring xml prefixed elements
The format class doesn't support XML namespaces at the moment. Please create an issue for this at https://github.com/fuel/core/issues, with this use-case.
Comment by
WanWizard
May 2013
permalink
Is this correct: array_keys($item->locations) in SELECT'ed vals
If you don't define the method you're going to call, it does not exist. I use a base model that all my models extend, and which defines this method, making it avaiable to all my models. So my setup looks like this: class Model_Base exten…
Comment by
WanWizard
May 2013
permalink
Is this correct: array_keys($item->locations) in SELECT'ed vals
If the method is in your Model_Location, you would call Model_Location::dropdown() but yes. that is the idea.
Comment by
WanWizard
May 2013
permalink
PHPQuickProfiler not starting
The profiler code is as simple as can be: it defines an onClick on the link which calls the javascript function openProfiler() which is defined just above that. If you get a message saying the function is not defined, the most obvious reason is tha…
Comment by
WanWizard
May 2013
permalink
Is this correct: array_keys($item->locations) in SELECT'ed vals
It depends on what the status of your related objects is. When the 'many' relation only contains fetched objects, the key in the array will always be the PK of the related object. If the object uses a compound key, it will be a string rep…
Comment by
WanWizard
May 2013
permalink
Fatal error with Monolog\Logger after FuelPHP 1.6 Windows installation
Ok, good to hear you've resolved the issue. The folder structure of the composer packages is defined by PSR-0. The first two entries are the vendor (psr) and the package (log) name, used to make sure the package is unique. Inside the packag…
Comment by
WanWizard
May 2013
permalink
Auth package & per-user salting?
I have mixed feelings about this. Per-user salts will make an attack using rainbow tables more difficult. But for that attack they will need to have your user table, containing the password hashes. If they have the table, they will have the per-use…
Comment by
WanWizard
May 2013
permalink
New Asset Type
You will have to extend the Asset class (to provide the static interface) and the Asset_Instance class (to provide the actual method). Check http://docs.fuelphp.com/general/extending_core.html#extend_and_replace on how to go about extending the cor…
Comment by
WanWizard
May 2013
permalink
Fatal error with Monolog\Logger after FuelPHP 1.6 Windows installation
You haven't run Composer (or it failed to run properly), so the dependencies are not installed. Does composer tell you it has installed everything? What is in /fuel/vendor ?
Comment by
WanWizard
May 2013
permalink
New Asset Type
Assuming you're not using custom instances: \Asset::instance()->add_type('test'); $url = \Asset::instance()->get_file('filename.png', 'test'); Will return /test/filename.png (if this file exists).
Comment by
WanWizard
May 2013
permalink
PHPQuickProfiler not starting
Ok, thanks for the feedback. Good to know it's not a framework issue... ;-)
Comment by
WanWizard
May 2013
permalink
New Asset Type
You can call add_type() in the Asset instance to add a new type, after which you can call find_file() or get_file() to get URL's to files of the new type.
Comment by
WanWizard
May 2013
permalink
Problems creating properties in EAV models
You can't create new EAV entries using property assignment, unless you're using the latest 1.7/develop. With 1.6, you'll have to do it the old-fashioned way, by adding a new model object (of your EAV table) to the EAV relation of the…
Comment by
WanWizard
May 2013
permalink
PHPQuickProfiler not starting
p.s. if you look at the source code, the function openProfiler is absolutely defined, which is another clue there's something going on with the rest of the javascript you include...
Comment by
WanWizard
May 2013
permalink
PHPQuickProfiler not starting
Can you try http://vca-staging.ibex.nl/?profile and click on the profiler link? Does that work? If not, you have a browser issue. If it works, perhaps some ill-behaving javascript in your application steals the event handler, disabling the PQP fu…
Comment by
WanWizard
May 2013
permalink
How to extend a controller in a Module from another Module?
If your Main module isn't loaded, the namespace isn't known, and you get this error. So either "always_load" this module, or do a \Module::load('main') in your Controller_Admin_Users_Settings file, after the namespac…
Comment by
WanWizard
May 2013
permalink
Memcached expiration time
If $this->memcached-get() returns false, then memcached has already expired the key, so everything else is academic. The Memcached driver uses a unix timestamp as expiration, which is calculated as time() + expiration, to allow expirations of mo…
Comment by
WanWizard
May 2013
permalink
Upload class changes in v1.6
Calling process() was never required. The configuration has an 'auto_process' setting, which is true by default, and will call process() for you. You only need to call process() manually if you want to pass a custom config at runtime, in…
Comment by
WanWizard
May 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,369
Last Active
6:17AM
Roles
Administrator