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

replace generate:plugin warning with pointer to guide #16922

Closed
Findus23 opened this issue Dec 9, 2020 · 4 comments · Fixed by #17300
Closed

replace generate:plugin warning with pointer to guide #16922

Findus23 opened this issue Dec 9, 2020 · 4 comments · Fixed by #17300
Assignees
Labels
c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Milestone

Comments

@Findus23
Copy link
Member

Findus23 commented Dec 9, 2020

When someone wants to create a plugin and is using the Matomo version from matomo.zip, they probably get an error like this one:

Uncaught exception: Error: Class 'Piwik\Plugins\ExamplePlugin\ExamplePlugin' not found

This is expected as Matomo doesn't ship with the Example* plugins anymore, but doesn't help the person struggling with this.

Instead, the generate:plugin should detect if those plugins are missing and if not point people towards https://developer.matomo.org/guides/getting-started-part-1

@Findus23 Findus23 added the c: Usability For issues that let users achieve a defined goal more effectively or efficiently. label Dec 9, 2020
@tsteur tsteur added this to the Priority Backlog (Help wanted) milestone Dec 9, 2020
@tsteur
Copy link
Member

tsteur commented Dec 9, 2020

BTW maybe some other thought... those commands require development mode to be enabled anyway. So maybe when development mode is enabled, we could call the method whether Matomo is installed through git (SettingsPiwik::isGitDeployment) and if not, throw an error mentioning "development mode can be only enabled when installed through git"

@Findus23
Copy link
Member Author

Findus23 commented Dec 9, 2020

Makes sense, I am just not sure at the moment if there isn't some reason why someone would want to enable development temporarily in production.

@tsteur
Copy link
Member

tsteur commented Dec 9, 2020

@Findus23 there shouldn't be (did a very quick check) and if there is a reason then we would maybe need to change something or add another check like we do here: https://github.com/matomo-org/matomo/blob/4.0.5/core/FrontController.php#L641-L647

This be an easy fix and could also fix other issues and make development more like what it's meant to be used from I guess.

@tsteur tsteur added the Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. label Dec 9, 2020
@tsteur
Copy link
Member

tsteur commented Mar 3, 2021

  • In the generate commands throw an exception if dev mode is enabled and not installed through git
  • Printing a warning when calling development:enable if it's not installed through git
  • We could also show the warning in the Matomo admin if dev mode is enabled, but not installed through git. We would maybe only show this to super users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants