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

Fatal error when accessing componentless translation view #4615

Closed
rageandengage opened this issue Sep 29, 2020 · 4 comments
Closed

Fatal error when accessing componentless translation view #4615

rageandengage opened this issue Sep 29, 2020 · 4 comments
Assignees
Labels
bug Something is broken.
Milestone

Comments

@rageandengage
Copy link
Contributor

Describe the bug
If a user can view a project, but they can not view any components, and they navigate to https://URL/translate/project-slug/-/lang-code/, their request will throw an exception.

In our case:

Request Method: GET
Request URL: https://project.url/translate/PROJECT/-/zh_Hans/
Django Version: 3.1.1
Exception Type: ValueError
Exception Value: Not supported type for permission check: ProjectLanguageComponent
Exception Location: weblate/auth/permissions.py, line 84, in check_permission

This occurs because the default component class in weblate/utils/stats.py is self.component = ProjectLanguageComponent()

@nijel nijel added the bug Something is broken. label Sep 29, 2020
@sentry-io
Copy link

sentry-io bot commented Sep 29, 2020

Sentry issue: WEBLATE-4VK

@nijel nijel added this to the 4.3 milestone Sep 29, 2020
@nijel nijel self-assigned this Sep 29, 2020
@nijel
Copy link
Member

nijel commented Sep 29, 2020

Should be already fixed by 9512fbe, in case it doesn't fix it please provide full exception traceback and Weblate version information.

@nijel nijel closed this as completed Sep 29, 2020
@github-actions
Copy link

Thank you for your report, the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, consider supporting Weblate by donating.

@rageandengage
Copy link
Contributor Author

Should be already fixed by 9512fbe, in case it doesn't fix it please provide full exception traceback and Weblate version information.

Looks like 9512fbe resolves the issue. We're running on latest stable (4.2.2) so I didn't catch it. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

No branches or pull requests

2 participants