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

Legacy Shortcodes with Separate Opener/Closer can be corrupted #2016

Open
ChristopherChudzicki opened this issue Nov 1, 2023 · 0 comments
Open
Labels
bug Something isn't working product:ocw

Comments

@ChristopherChudzicki
Copy link
Contributor

ChristopherChudzicki commented Nov 1, 2023

Steps to reproduce

  1. Visit a page with separate opening/closing shortcode tags in OCW Studio. For example https://ocw-studio-rc.odl.mit.edu/sites/20-109-laboratory-fundamentals-in-biological-engineering-spring-2010/type/page/edit/84e8174c-592f-f934-08b5-8921e05ba894
  2. In CKEditor, Delete just the closing shortcode (or just the opening shortcode). For example, /anchor
  3. Publish the course

Actual result: Course fails to publish

Expected result: May need discussion, but whatever it is, publishing shouldn't break.

Context

We have several "legacy shortcodes". These are shortcodes that were introduced during the migration from old ocw in order to keep supporting functionality that existed in the old system but which we do not fully support in the new system.

An example is {{<anchor name href >}} text {{</anchor>}} shortcode. This shortcode enables creation of named anchors to support linking to specific parts of a page. We do not support creating or editing this shortcode in OCW Studio, but our intention was to support editing of other content in the same page without corrupting the shortcode. (See #1013)

However, we do allow deleting legacy shortcodes. And our CKEditor plugin treats openers and closers as separate shortcodes. Consequently, you can delete just the closer {{< /anchor >}} (or just the opener). This results in an unbuildable course.

Screenshot 2023-11-01 at 3 35 17 PM
@ChristopherChudzicki ChristopherChudzicki added bug Something isn't working product:ocw labels Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product:ocw
Projects
None yet
Development

No branches or pull requests

1 participant