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
Issue with different View
Sorry to say, but this is pretty obvious. ;-) After you have set $this->template->content to your confirm View, the code continues down, to where it sets the title, and then overwrites $this->template->content. So you better move it to…
Comment by
WanWizard
September 2016
permalink
FuelPHP URI becomes query string. How to fix this?
And can you do the same, but then from your app bootstrap.php, before calling Fuel::init(), requesting the controller from your opening post?
Comment by
WanWizard
September 2016
permalink
FuelPHP URI becomes query string. How to fix this?
Can you create a dummy test.php in your public folder, dumping $_SERVER? I'm interested in: PATH_INFO, ORIG_PATH_INFO, SCRIPT_NAME, REQUEST_URI and QUERY_STRING. If could be that in your case https://github.com/fuel/core/blob/1.9/develop/clas…
Comment by
WanWizard
September 2016
permalink
FuelPHP URI becomes query string. How to fix this?
No, it doesn't. I just explained you why. The values in $_SERVER reflect your environment, there are more values that are different whether or not you use FastCGI. $_SERVER['QUERY_STRING'] contains the query string that is passed on …
Comment by
WanWizard
September 2016
permalink
FuelPHP URI becomes query string. How to fix this?
Any particular reason why (you think) this need to be fixed? For FastGCI installs, the rewrite rule is RewriteRule ^(.*)$ index.php?/$1 [QSA,L] which causes the URI to become part of the query string, but it is the only way to pass it on to t…
Comment by
WanWizard
September 2016
permalink
EAV with Nested Set
An EAV container is just a normal one-to-many relation, so I don't see why not. // get the parent with all it's children $parent = Model_Parent::query()->related('children')->where('id', '=', '1…
Comment by
WanWizard
September 2016
permalink
Integrity of Database
Assuming you only use one database connection (the default), something like this. Obviously, you need to add code the handle all possible errors properly, some might not need a rollback. // start the transaction DB::start_transaction(); try { …
Comment by
WanWizard
September 2016
permalink
Possible bug with session native_emulation.
Which is a bit weird, you would assume that PHP7 would complain about the lack of a return value for all other methods as well. I've checked the docs, and updated the code so all closures return the expected return value: https://github.com/fu…
Comment by
WanWizard
September 2016
permalink
Api version in route config file
I'm trying to understand what you want. You want to route "/v2/content/category" to controller "./app/classes/graph/v2/content/category"? If so, your $1 is in the wrong place, if you want to map the version, you should use:…
Comment by
WanWizard
September 2016
permalink
Integrity of Database
The ORM methods save() and delete() support transactions. If your database platform supports transactions (for example MySQL with InnoDB tables), you can pass TRUE as second parameter to enable transactions with commit/rollback. If you want to wrap…
Comment by
WanWizard
September 2016
permalink
Facebook Auth_Opauth
The response from Facebook should be picked up by the opauth driver, which processes the facebook specific return values, and converts them into a standardized response. It then redirects and passes the info back to the Fuel driver using the GET var…
Comment by
WanWizard
September 2016
permalink
PostgreSQL
\Fuel\Core\Database_Query_Builder_Where should not be a problem, as your postgres/build/where should extend this class, and type hinting works for extended classes. Same for the other query classes, they should all extend the base class. To emulate…
Comment by
WanWizard
September 2016
permalink
PostgreSQL
With 1.9/dev there is no need to modify any of these files. You can create a /fuel/core/classes/database/postgresql directory, and in there a connection.php for stuff you need to overload from the base class. If you need custom builder code, you ca…
Comment by
WanWizard
September 2016
permalink
Get original Request
You can pass FALSE as second parameter to Request::forge() to make the call bypass the routing engine.
Comment by
WanWizard
September 2016
permalink
Problem connecting to database from app,but not from oil
Make sure you're running in the correct environment, and you have the correct settings for the environments you use. If you don't specify an environment, Fuel runs in "Development". Your production app should run in "Product…
Comment by
WanWizard
September 2016
permalink
Get original Request
It works very well. Say your URI is "/this/that", then Uri::segments() will return an array with the individual segments in the URI. Then fetch the root of your NestedSet tree as start page, and loop over the segments. i.e. check if the…
Comment by
WanWizard
September 2016
permalink
Get original Request
Our CMS works like that, it doesn't have a single controller/action except for a generic loader that ":any" is routed to. Our pages are in a tree table accessed by ORM's NestedSet model, and we use the result of Uri::segments() …
Comment by
WanWizard
September 2016
permalink
Call a partial from within a partial
There is no interitance between partials. If your partials loads other partials, you have to pass the data on manually, either as parameters to View::forge(), using set()/set_safe(), or to render(). If you want to pass on all variables, you can d…
Comment by
WanWizard
September 2016
permalink
PostgreSQL
Great! I'll add your name to the release notes for the next 1.8 release.
Comment by
WanWizard
September 2016
permalink
PostgreSQL
I have no Postgresql experience, so I don't know that the difference is. From what I can see pg_escape_identifier is for identifiers (table names, column names, etc, the backtick in MySQL) pg_escape_literal is for strings (as in insert values…
Comment by
WanWizard
September 2016
permalink
\File::create_dir() in localhost
Ok. In that case you'll have to wait for the next 1.8 hotfix to get this fix.
Comment by
WanWizard
September 2016
permalink
\File::create_dir() in localhost
Which Fuel version do you use? Because the fix is for 1.9/develop, it has not been released yet.
Comment by
WanWizard
September 2016
permalink
\File::create_dir() in localhost
create_dir() should be addressed here: https://github.com/fuel/core/commit/104d82bfc5b165221e8df6acae0182595a597bed The File class deals with files, it is a bit pointless making a class method for is_dir().
Comment by
WanWizard
September 2016
permalink
PostgreSQL
There is no specific Postgresl driver for Fuel, and the PDO driver is probably too generic on occasion. I assume you use the PDO driver? Having said that, the PDO driver does use lastInsertId(), see /database/pdo/connection.php, line #307, so in th…
Comment by
WanWizard
September 2016
permalink
problem with fuel curl with file upload
You're welcome. Please mark this question as answered.
Comment by
WanWizard
September 2016
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