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

feat: graceful plugin exceptions #7423

Merged
merged 40 commits into from
Nov 11, 2022

Conversation

fsbraun
Copy link
Sponsor Member

@fsbraun fsbraun commented Oct 28, 2022

Description

Plugins raising an exception making the page uneditable. As a bit of sugar this PR catches exceptions that are raised

  • within a plugins render method
  • when renderings its render_template

Exceptions are logged (on error level) and developers can use Django's LOGGING setting to configure on how to process the logs.

Local development servers will typically show the traceback on the console.

Should an exception occur a placeholder with a short notice is rendered in edit mode. Double clicking on it will open the edit modal for the plugin. This way potential misconfigurations can be changed.

Related resources

Checklist

  • I have opened this pull request against develop-4
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on Slack to find a “pr review buddy” who is going to review my pull request.

fsbraun and others added 30 commits March 23, 2022 11:36
…quest_pass or the toolbar will be wrongly configured
…ne query parameter is given. Needs to work with many
Reverse formatting change

Co-authored-by: Aiky30 <Aiky30@users.noreply.github.com>
Correct formatting

Co-authored-by: Aiky30 <Aiky30@users.noreply.github.com>
Comment above not at end of line

Co-authored-by: Aiky30 <Aiky30@users.noreply.github.com>
Update method doc
Remove trailing space
Copy link
Member

@vinitkumar vinitkumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fsbraun Made a remark about alternative representation of string. Please let me know if you agree or disagree?

cms/plugin_rendering.py Outdated Show resolved Hide resolved
@fsbraun fsbraun merged commit 5ff38b5 into django-cms:develop-4 Nov 11, 2022
@fsbraun fsbraun deleted the add/gracefulPluginExceptions branch October 18, 2023 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants