Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

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

Merged
marksweb merged 1 commit intodjango-cms:masterfrom
fsbraun:fix/issue-641
Sep 29, 2023
Merged

fix: Issue #641 created by typo in widgets.py#652
marksweb merged 1 commit intodjango-cms:masterfrom
fsbraun:fix/issue-641

Conversation

@fsbraun
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants