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

fix: Issue #641 created by typo in widgets.py #652

Merged
merged 1 commit into from
Sep 29, 2023
Merged

fix: Issue #641 created by typo in widgets.py #652

merged 1 commit into from
Sep 29, 2023

Conversation

fsbraun
Copy link
Member

@fsbraun fsbraun commented Sep 29, 2023

Description

This PR fixes issue #641.

I traced it back to a simple typo in widgets.pywhich left the cancel_plugin_url property in the editor's setting empty (but filled the unused property clancel_plugin_url).

In effect, the cmspluings' plugin.js in turn creates a POST request with empty content to the edit endpoint (where the form was originally loaded), effectively deleting the text as opposed to the newly created plugins. The correct behavior would call the cancel_plugin_url endpoint which in turn deletes any added child plugins when cancel is pressed.

References

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (25e28e3) 76.36% compared to head (17edc8d) 76.36%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #652   +/-   ##
=======================================
  Coverage   76.36%   76.36%           
=======================================
  Files          20       20           
  Lines         918      918           
  Branches      123      123           
=======================================
  Hits          701      701           
  Misses        191      191           
  Partials       26       26           
Files Coverage Δ
djangocms_text_ckeditor/widgets.py 81.53% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fsbraun fsbraun requested a review from a team September 29, 2023 19:46
@DmytroLitvinov
Copy link
Contributor

DmytroLitvinov commented Sep 29, 2023

I can confirm that the patch works for me 👍.

@marksweb marksweb merged commit 3a4cf77 into django-cms:master Sep 29, 2023
54 checks passed
@fsbraun fsbraun deleted the fix/issue-641 branch September 30, 2023 11:11
@fsbraun fsbraun mentioned this pull request Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants