-
-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to call link
filter in onPageRendering hook in plugin
#288
Comments
You're not using Pico's |
This has been basically fixed in my fork, I think this needs more discussion though, in a new issue... If @Lomanic is interested in developing the IMO, it needs a rewrite. There is lots of missing functionality, and it's very finicky/rigid. |
I have planned to write a admin plugin from scratch for Pico 1.1, just fyi. 😉 |
Well then, even better! 😆 |
Hello @theshka @PhrozenByte Thanks @PhrozenByte for the tip, it will be in my next commit. I'm indeed interested in developing this plugin, what do you think should be rewritten @theshka ? What will be the differences with your own plugin @PhrozenByte ? I was planning perhaps to add to it an anti-bruteforce system (fail2ban-like), improve error detection when using AJAX calls (not enough rights to write/create/delete .md file mostly), perhaps making the AJAX |
@Lomanic: I don't have a concrete plan yet, just telling the necessity to do it. I think building a new admin plugin from scratch gives a better result. Your ideas sound excellent. It would be great if you take care of this! 👍 😃 |
I'm a fan of your ideas for the plugin as well @Lomanic Some things it seriously needs to address in it's current state:
Some things you already mentioned
It would be very much helpful if you were able to take care of this! 👍 😄 |
Nice @Lomanic. What do you mean by
|
@dav-m85 The plugin would log in a file failed login attempts for each IP address, if an IP address fails X times (X being configurable in config/config.php) it gets rejected during a defined time (customizable in config/config.php too). @theshka https://github.com/coexec/pico_admin provides an asset manager I think. |
I am backporting my version of the Pico-Editor plugin using @theshka's fork as a new base (Lomanic/Pico-Editor-Plugin#2) to make it Pico v1 compatible.
Currently I can't call
{{ editor_url | link }}
(with editor_url being the customizable admin endpoint, 'admin' by default) in editor.twig inside theonPageRendering(&$twig, &$twigVariables, &$templateName)
hook. I presumed it is defined after this hook but...This hook is defined at https://github.com/picocms/Pico/blob/c34afad/lib/Pico.php#L365
Even if the
link
filter is defined inside the registerTwigFilter() function it is finally used used in the onTwigRegistration hook... before the onPageRendering hook?!Here is the code currently: https://github.com/Lomanic/Pico-Editor-Plugin/tree/picov1.
I'm using the current master on nginx and php 5.6.14.
Here are the errors while logging into the editor:
The text was updated successfully, but these errors were encountered: