2sxc: 400 Error when trying to "Replace with Existing" inside a Very Rich Text Content Item

I’m submitting a

[x] bug report

…about

[x] edit experience / UI [x] Razor templating [x] Content Types or data management [x] other / unknown

Current Behavior / Expected Behavior

Apps’ content inside content blocks from Very Rich Text fields should be able to be replaced with existing content items. Currently, it gives a 400 error:

image (11)

I have also included the Insights log where the error occurs below. It’s from the web-api log: Logs.htm.txt

Instructions to Reproduce the Problem

  1. Set up an app to use very rich text following the normal steps.
    • In this case, we are using Custom.Hybrid.Razor14 with Kit.Render.All to render the Very Rich Text field/apps, but the issue manifests with Custom.Hybrid.RazorTyped as well.
  2. Add the app a page, and add an App/Content block through the WYSIWYG editor and save it
  3. Add any app with the “Replace with Existing” toolbar option to that block using the QuickE editor that shows up in the blank App/Content block
  4. Click “Replace with Existing” and observe the error

Your environment

  • 2sxc version(s): 16.07.00
  • Browser: all
  • DNN: 9.13.02
  • Hosting platform: azure
  • Language: English

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (11 by maintainers)

Commits related to this issue

Most upvoted comments

I have confirmed the fix; it works! Thank you so much for working on this one, it’s a game changer for our content editors ♥

ToSic.Sxc.Dnn.17.04.01_Install.zip

@jeremy-farrance and @6TELOIV I believe I fixed it, but it was way more complex than you may imagine.

As such, I need your help to:

  1. verify it works
  2. verify nothing else in typical edit etc. broke

I’ve included a temporary 17.04.01 above, pls test and confirm. thanks!

This is an issue.

Basically every button has a context, providing information about the App it’s on.

Apps inside Apps don’t quite do this correctly, and it would take quite a bit of work to finish this, which is why we haven’t found time to do it yet.