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
Expected behavior when forging a Temporal Model with an existing ID
I'm not sure, I've never really used it myself. Since ID in itself isn't a unique key, technically it is no problem to let this happen. But I understand why you ask. Probably the simplest solution is to create a UNIQUE index on id, so…
Comment by
WanWizard
February 2018
permalink
Change pagination template on some controller
You assume here that the config is only used to pass parameters. This is not the case, all variables that are used to generate the pagination are part of the config array. And that includes all the keys that provide the HTML, as defined in the confi…
Comment by
WanWizard
February 2018
permalink
Change pagination template on some controller
Yes, I understand that. The 'active' value is just to set the template definition you want to load by default, i.e. if you don't explictly ask for one. It is not there to set at runtime, but to default your default. In the default pag…
Comment by
WanWizard
February 2018
permalink
Change pagination template on some controller
Note that pagination is a multiton. So when you do $p1 = \Pagination::forge();$p2 = \Pagination::forge(); $p1 is equal to $p2, and anything you change in one will also change in the other.
Comment by
WanWizard
February 2018
permalink
Change pagination template on some controller
Where is your alternative config stored? If in the pagination config file using 'myconfig' = array( ...), you can load that using $pagination = \Pagination::forge('myconfig'); If your config is elsewhere and you have it in an a…
Comment by
WanWizard
February 2018
permalink
Task View Forge Issue
Ok, the situation is the following: For search paths, Fuel follows this list:- manual added paths- when in a module context, module paths- app paths- package paths- framework paths This means that if you load the module view in a module controller, …
Comment by
WanWizard
February 2018
permalink
Task View Forge Issue
Ah, ok, "alerts/emails/listing_alert.php" is the full view path, I was confused with the name of the module. Clear, back to debugging then.
Comment by
WanWizard
February 2018
permalink
Task View Forge Issue
And you load the view in your controller how? To load from a(nother) module, you need to use $EmailBody = \View::forge(alerts::emails\listing_alert',array('listings'=>$Listings)); I don't think your original View statement wor…
Comment by
WanWizard
February 2018
permalink
Task View Forge Issue
Ok, so:- task in app/tasks- task already loaded the module- view in the module? If so, you've found a bug that I'll have to look at.
Comment by
WanWizard
February 2018
permalink
Task View Forge Issue
The problem was probably that the module "view" wasn't loaded, so the View loader doesn't have a path to it it can search. When you call a controller in a module, the module is autoloaded. In a task, you need to use \Module::load…
Comment by
WanWizard
February 2018
permalink
Task View Forge Issue
Is that an app view, or a module view? When you do the same in a controller, it can find it?
Comment by
WanWizard
February 2018
permalink
Session DB driver problem
The session classes use \Input::user_agent(). This in turn calls \Input::server() to read the "HTTP_USER_AGENT" value. That in turn reads $_SERVER. So if you want to "pre-treat" $_SERVER, you can do so in your app bootstrap.php, …
Comment by
WanWizard
February 2018
permalink
Global functions or hereditary functions.
If you want to use a standard function, you can define it in your app's' bootstrap.php, or in a file or files you include in your bootstrap. If you want to use a class method to be used in multiple classes, use a trait. They can be defined…
Comment by
WanWizard
February 2018
permalink
What's The Latest?
I sort of wish it had one of the causes you mentioned. Unfortunately, both Steve and I are troubled with quite serious health issues, leaving Steve with just the abilty to cope with a normal working day, and me without the ability to work at all. S…
Comment by
WanWizard
February 2018
permalink
echo $pagination; returns empty div
Always a solution: more coffee... :-)
Comment by
WanWizard
January 2018
permalink
echo $pagination; returns empty div
Total items and total pages is zero, so there is nothing to pagina. Pagination only outputs something if there are at least two pages. The issue is probably with $count[0]['num_entries']as count() returns an integer?
Comment by
WanWizard
January 2018
permalink
PDF Generation
I've checked, our apps also use tcpdf, and we use it via my https://github.com/WanWizard/fuel-pdf package. p.s, and you need to be on 1.9/dev when you use PHP 7.x.
Comment by
WanWizard
January 2018
permalink
Backtraking app errors
I've looked in the code, but I don't see any logging in the error handler that doesn't also log the file and the line number (like in your second example), so I don't know where the "Undefinex index: type" comes from. I…
Comment by
WanWizard
January 2018
permalink
Session DB driver problem
tested this, seems to work fine.
Comment by
WanWizard
January 2018
permalink
Session DB driver problem
That's great, as it is illegal to use non-ASCII characters in the HTTP header, according to the standard. You could try changing the column from "text" to "blob"?
Comment by
WanWizard
January 2018
permalink
HMVC between different app
To re-use or share:- frontend code, use a module- backend code, use a package Moving clases is not that complex. Say your app1 has a model in ./app/classes/model/admin/users.php, called Model_Admin_Users, in the global namespace. You can copy this …
Comment by
WanWizard
January 2018
permalink
Backtraking app errors
In which environment does your CLI command run? I assume it is in "production", which doesn't provide detailed error messages (and there is no option to differentiate between CLI and HTTP).
Comment by
WanWizard
January 2018
permalink
Handlebars: How to handle partial views?
Pas de quoi. ;-)
Comment by
WanWizard
January 2018
permalink
Handlebars: How to handle partial views?
Pushed a new update using this code: https://zordius.github.io/HandlebarsCookbook/9902-lcop-partialresolver.html#FileResolver so that should be ok?
Comment by
WanWizard
January 2018
permalink
Handlebars: How to handle partial views?
Ok. So it's included but not rendered? I'll have a look again.
Comment by
WanWizard
January 2018
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