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
Database class not working with PostgreSQL
What you can do is have your default db.php, with the correct default settings, in app/config, and then write a db.php to app/config/production with only the changes to the default (assuming your app runs in production mode, which it should ;)). Th…
Comment by
WanWizard
January 2017
permalink
Query_Bulder_Select: How to join using bracket "()"
You don't have to, we're already working on it.
Comment by
WanWizard
January 2017
permalink
How to generate and send csrf token to controller via ajax post
Define "doesn't work"? What happens? Or what doesn't happen? Messages? Errors? Something else? How do you do the CSRF token check in your app?
Comment by
WanWizard
January 2017
permalink
Database class not working with PostgreSQL
The backtick is "required" in MySQL only if the table or the column name is a reserved word. But it is best practice to always use it, because something can become a reserved word in the future. I assume you are talking about two differen…
Comment by
WanWizard
January 2017
permalink
Creating dev site
A properly designed and configured Fuel application has no link to the hostname it runs under. So you should be able to setup a different virtualhost, copy everything to it (make sure the documentroot points to the directory the index.php is in, by…
Comment by
WanWizard
January 2017
permalink
How to generate and send csrf token to controller via ajax post
The CSRF token is set in a cookie when you generate one. See Security::js_fetch_token() for the javascript code needed to fetch the token from the cookie and add it to the posted data. Make sure you use the correct (= configured) variable so it can…
Comment by
WanWizard
January 2017
permalink
Database class not working with PostgreSQL
You can configure that in your DB configuration, using the key 'identifier'. For PostgreSQL you need to set this to "" (empty string). Check fuel/core/config/db.php for a PDO example.
Comment by
WanWizard
January 2017
permalink
Twig Autoloader not found
What does ajax have to do with Twig? Could you open a new topic for the "ajax problem", and explain exactly what you do, what the expected result is, and what the actual result is? Because I don't have a clue.
Comment by
WanWizard
January 2017
permalink
Twig Autoloader not found
Just to confirm: it works fine due to my fixes, or due to your workaround?
Comment by
WanWizard
January 2017
permalink
Query_Bulder_Select: How to join using bracket "()"
That won't protect you against SQL injection, that only strips out stuff that could be harmful if you write that input value back to the browser. Input like " ' OR UNION ( ...) # " is perfectly valid string input, no XSS attach i…
Comment by
WanWizard
January 2017
permalink
Query_Bulder_Select: How to join using bracket "()"
Possible, but make sure your SQL is secure if you use variables in it.
Comment by
WanWizard
January 2017
permalink
Twig Autoloader not found
Is this a standard controller, or a REST controller? A standard controller returns HTML, you have to do the json conversion of your data structure yourself.
Comment by
WanWizard
January 2017
permalink
Query_Bulder_Select: How to join using bracket "()"
This type of join is currently not supported in the Query builder. You may wish to create an issue for this at https://github.com/fuel/core/issues.
Comment by
WanWizard
January 2017
permalink
Running FuelPHP from unix command line
Yes, sure. Fork the 1.9/dev branch of the fuel/docs repo on github, make your improvements, and sent us a pull request. The tasks page: http://fuelphp.com/docs/general/tasks.html
Comment by
WanWizard
January 2017
permalink
Running FuelPHP from unix command line
Yup, create an oil task. You are correct that these should be documented better. In short: - they are classes placed in /app/tasks or /packages/packagename/tasks - they are always in the namespace \Fuel\Tasks - "oil refine taskname" by d…
Comment by
WanWizard
January 2017
permalink
Twig Autoloader not found
Yeah, I mentioned that before. Fuel has dynamic routing to controllers for URL's like /controller/method or /namespace/controller/method. If you don't want that, you need to block dynamic routes to those controllers, either by using spec…
Comment by
WanWizard
January 2017
permalink
Twig Autoloader not found
That also works. But it is a lot easier to define it like this: 'admin/country/(:num)/state/(:num)' => 'admin/state/$1/$2' and use the method definition I posted earlier. or like this: 'admin/country/:country_id/stat…
Comment by
WanWizard
January 2017
permalink
Twig Autoloader not found
I'm not sure I understand what your problem is. Why wouldn't you be able to have url's like that?
Comment by
WanWizard
January 2017
permalink
Twig Autoloader not found
Assuming that is Controller_Admin::action_state(), additional URI segments are passed on as method arguments, so define it like so public function action_state($country_id, $state_id) if the arguments are required (if not given in the URI, you wil…
Comment by
WanWizard
January 2017
permalink
How to retrieve array element from validated method
Perfect, thanks.
Comment by
WanWizard
January 2017
permalink
How to retrieve array element from validated method
At the moment validated() uses array_key_exists(), so no, you can not use dot-notation for array elements at the moment. I've changed it to an Arr::get() call: https://github.com/fuel/core/commit/5cbb296c69102aa0e45a4cf1c0c68a7e70076ba7 Can y…
Comment by
WanWizard
January 2017
permalink
Fatal error: Uncaught Error: Class 'PHPSecLib\Crypt_AES' not found on Heroku
Not sure either. I install new clones of the repo regularly, and never seen this issue.
Comment by
WanWizard
January 2017
permalink
Twig Autoloader not found
You also need to define the existence of this class in your app bootstrap: Autoloader::add_classes(array( // overload the Twig fuel extension 'Twig_Fuel_Extension' => APPPATH.'classes/twig/fuel/extension.php', …
Comment by
WanWizard
January 2017
permalink
Twig Autoloader not found
The code defaults to 2.x, but has a fallback to 1.x, so it shouldn't break anything. If you want to test it, just change the composer.json to load "fuel/parser": "dev-1.9/develop" and run a composer update. After test…
Comment by
WanWizard
January 2017
permalink
Twig Autoloader not found
Support has been added to 1.9/develop. A new hotfix release for 1.8 is planned for this weekend, it will be automatically installed if you run a "composer update" after release.
Comment by
WanWizard
January 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,386
Last Active
5:56PM
Roles
Administrator