Skip to content
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

Endless loop trying to override plugin's template #5305

Closed
tassoman opened this issue Jun 5, 2014 · 4 comments
Closed

Endless loop trying to override plugin's template #5305

tassoman opened this issue Jun 5, 2014 · 4 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@tassoman
Copy link
Contributor

tassoman commented Jun 5, 2014

After #5122 closure we're able to override twig templates using a custom plugin.

You can override core themes using a file with the same name inside your plugin's templates directory, for example having a file: plugins/ExampleTheme/templates/dashboard.twig.

It works flawless until you try to override another plugin's template. Your http request to Piwik is timed out due to an endless loop, for example: plugins/ExampleTheme/plugins/VisitorGenerator/generate.twig

Unfortunately I have no rows in Apache's error.log

@mattab
Copy link
Member

mattab commented Jun 7, 2014

Thanks for the report!

@anonymous-matomo-user
Copy link

According to the changes to overwrite templates, your custom twig file should be located here:
plugins/ExampleTheme/templates/plugins/VisitorGenerator/generate.twig

Can you try this?

@tassoman
Copy link
Contributor Author

Well I've tried and it worked. Anyone interested overriding templates should be extremely careful saving files.

We need a very detailed documentation about this. I'll update my currently open pull request about this on docs repository.

Would be good also provide an example in ./plugins/ExampleTheme plugin overriding ./plugins/ExampleVisualization/simpleTable.twig they came both shipped with coreplugins.

The update could show how can you override the simpleTable.twig file adding an arbitrary string traslated.

@tassoman
Copy link
Contributor Author

I've updated the pull request in developers-documentation on Github. There are also some concerns about it.

@tassoman tassoman added this to the 2.4.0 - Piwik 2.4.0 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants