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
Get HTML content inside controller
What do you mean with "get HTML content"? It is not the controller that generates the HTML, it is the rendering of the view (or the theme). And you can do that manually, both have a render() method. $view = View::forge('some/view…
Comment by
WanWizard
June 2016
permalink
CSRF problem
Checking the token invalidates and rotates the current token, so you can check only once. If you do both, you end up with invalid token errors all the time. I'll see how this can be clarified in the docs.
Comment by
WanWizard
June 2016
permalink
How to get all children when it's filtered by children field?
I not sure I understand your question. If you want all authors, with all articles, simply do: $authors = Model\Author::query() ->related('articles') ->get(); Or if you want all articles with author info, use $articles = M…
Comment by
WanWizard
June 2016
permalink
Asset::find_file in a command line php oil
in the oil script: https://github.com/fuel/fuel/blob/1.8/master/oil#L30 You probably need to add "public".DIRECTORY_SEPARATOR to it, assuming you have a standard setup with your index.php in ./public. See also http://fuelphp.com/d…
Comment by
WanWizard
June 2016
permalink
Asset::find_file in a command line php oil
Asset by default looks for files relative to the DOCROOT constant, which is different for web requests and oil. If you need them to be the same, you need to change it in the oil script.
Comment by
WanWizard
June 2016
permalink
SimpleUserWrongPassword('Old password is invalid');
That exception is thrown if the old password is empty, or doesn't match: if (empty($values['old_password']) or $current_values->get('password') != $this->hash_password(trim($values['old_password']))) { …
Comment by
WanWizard
June 2016
permalink
SimpleUserWrongPassword('Old password is invalid');
And what is the question?
Comment by
WanWizard
June 2016
permalink
Construct pagination link
When you use a filter, you need to pass the filter on to the next request, because as you said, you loose the search string. To do so, we use a flash session variable. I tried to create an example for you: http://bin.fuelphp.com/snippet/view/M7 …
Comment by
WanWizard
June 2016
permalink
Extending Controllers & Routing
Packages MUST have a namespace, otherwise autoloading doesn't work. You can alias them to the global namespace (like some packages do) and then yes, your controllers become loadable too. But that is not exactly best practice. And yes, if you l…
Comment by
WanWizard
June 2016
permalink
Extending Controllers & Routing
If you have controllers that you share between apps, there are three options: One is to use a module. If you do, the entire module is shared as-is, and you have to indeed resort to either routing or access rights checking to prevent access to a con…
Comment by
WanWizard
June 2016
permalink
Extending Controllers & Routing
Grmfff... The new tag wasn't pushed for some reason. Sorry about that, uit should update now.
Comment by
WanWizard
June 2016
permalink
Extending Controllers & Routing
Then it should pull in the 1.8.0.1 update?
Comment by
WanWizard
June 2016
permalink
Extending Controllers & Routing
Since 1.8 we use tagging, so it's best to update your composer.json with the one from 1.8 (https://github.com/fuel/fuel). It uses "1.8.*" so it automatically pulls in new versions if present.
Comment by
WanWizard
June 2016
permalink
Fatal error: Uncaught Error: Class 'PHPSecLib\Crypt_AES' not found on Heroku
Then I really don't know. I have no experience with Heroku.
Comment by
WanWizard
June 2016
permalink
Extending Controllers & Routing
Ok, good to know you found it. Guess it pays to stay up to date with our releases... ;-)
Comment by
WanWizard
June 2016
permalink
PhpStorm 2015.1.2 and PHP 7 - Error on index.php
The xml issue should be fixed. The error was misleading, it was actually the backend that got a timeout on the spam-check on your IP due to a configuration that still used the IP of the old server.
Comment by
WanWizard
June 2016
permalink
PhpStorm 2015.1.2 and PHP 7 - Error on index.php
Oh, wait. It's not a Fuel issue, it is a problem with PHPstorms syntax checker. It can't know whether or not $e contains something throwable, as it is passed to the function as an argument. the xml issue we have to look at, it might be ca…
Comment by
WanWizard
June 2016
permalink
PhpStorm 2015.1.2 and PHP 7 - Error on index.php
If would be interesting to know what $e is, because it can't be something else, the closure is called only below it's definition, and in all cases an Exception object is passed.
Comment by
WanWizard
June 2016
permalink
namespace modules view
Some background: adding the module path to the request happens here: https://github.com/fuel/core/blob/1.9/develop/classes/request.php#L324 The View class collects the path in it's constructor: https://github.com/fuel/core/blob/1.9/develop/cl…
Comment by
WanWizard
June 2016
permalink
namespace modules view
This has to do with "request context". When you get a request for a module controller, like with Request::forge('api/some/controller'), the Framework switches it's request context to the api module, so it knows it has to lo…
Comment by
WanWizard
June 2016
permalink
Fatal error: Uncaught Error: Class 'PHPSecLib\Crypt_AES' not found on Heroku
PHP version is fine. You are sure all files are there, you haven't by any change installed the PHPSecLib composer package (not supported before 1.8), all permissions are ok?
Comment by
WanWizard
June 2016
permalink
Extending Controllers & Routing
Don't see an immediate issue. Nothing in the application log file (set the logging to L_ALL if needed)? Anything in the webserver log? Do you see a new session id arrive in the browser too? Are the rights on the session files ok? If the app …
Comment by
WanWizard
June 2016
permalink
Extending Controllers & Routing
btw, if "expiration_time" is set to zero, the framework will convert that to a two-year expiry, so 2018 should be correct. That loss of cookie doesn't seem to be the problem. What is "rotation_time" set to? The default the…
Comment by
WanWizard
June 2016
permalink
Extending Controllers & Routing
Berlin is at UTC+2 at the moment, so there should be a 2 hour difference. Cookies are timestamped in UTC, not in local time. And what time and timezone is the server running? Linux clocks run in UTC with a set timezone (which should ideally be Euro…
Comment by
WanWizard
June 2016
permalink
Extending Controllers & Routing
It's probably better to do the language detection and stripping in your app bootstrap. Not sure when it made sense to do it that way. The fun of Fuell is that a lot of roads lead to Rome. ;-) As to sessions, check what the expiry of the cook…
Comment by
WanWizard
June 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,390
Last Active
7:35AM
Roles
Administrator