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:
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
- Set up an app to use very rich text following the normal steps.
- In this case, we are using
Custom.Hybrid.Razor14withKit.Render.Allto render the Very Rich Text field/apps, but the issue manifests withCustom.Hybrid.RazorTypedas well.
- In this case, we are using
- Add the app a page, and add an App/Content block through the WYSIWYG editor and save it
- 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
- 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
Not sure if it helps, I'm talking about clicking this button inside inner-content apps:
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.
Makes sense, and I figured about as much. I've also noticed some other oddities with them (moving items up and down in a list with toolbar buttons doesn't work, opening the list manager doesn't work). Wish I had more time to dive in and try to figure it out myself, haha!
Glad I found this, was about to post the same. I can confirm it is still a problem in the latest, v17.03.00 (on DNN v9.13.02).
If it helps; in our case we were in inner-content in the Accordion App (4.3.1) and adding Basic Content from the Content App (16.0.0).
We also noticed additional, probably related issues. If they are not related, please let me know and I can create new/separate issues. Also, there might be additional issues, I stopped after getting details and verifying the following 3:
- Toolbar buttons for Move Up and Move Down do not work
- Toolbar button for Remote Item (screenclip below) does not work (but adding an empty block does work)
- Toolbar button for Sort/Manage List immediately throw a bad request 400 error with, "Detail: Object reference not set..." (console error below)
Question: this project is scheduled to go live Apr 2nd. Ever since we upgraded to v16.01 and then v16.07 LTS we have not been able to manage any inner-content beyond edit/save. We have the Accordion App in use on this site fairly extensively (the View has 43 instances across 30+ pages). Is there any chance this will be fixed in March?
TBH I believe this never worked before - if it did, I would appreciate knowing which fairly recent version - because then we would only have to re-fix. ATM I think we need to actually implement this.
I know we had started on this once about 2 years ago, but I thought we never completed it. Could be that we did though, and in that case we only need to re-apply it.
Any chance you could find a sponsor? I think we would need ca. 1-1.5 days to make this work.
Okay, so I just installed a clean, new DNN instance using v9.13.03, then installed 2sxc v14.07.04 LTS.
Then tried to install an app; Accordion 4.3.1 would NOT install, no errors, just "installed/success" then it wasn't there. Checked under the hood, the expected folder /Portals/0/2sxc/Accordion (or /Accordion4?) was not there.
But, Accordion 4.3.0 installed fine (not sure why 4.3.1 wouldn't install and did not show an error)
So, as expected, these things were working. See screen shot below. I was able to add Accordion sections with inner content and able to move them up/down, remove, add existing, and replace. I still have this instance available locally if there is anything specific you want me to test further that might help.
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:
- verify it works
- verify nothing else in typical edit etc. broke
I've included a temporary 17.04.01 above, pls test and confirm. thanks!
Okay, so first I upgraded my testing site from 2sxc 14.07.04 to 17.01.07. Then installed CodeDom 3.6. Tested and as expected, toolbar things were NOT working.
Downloaded and Installed v17.04.01 and ... FIXED. This is great, I hope you do the release soon, thank you!!
@jeremy-farrance & @6TELOIV pls also test other normal toolbar-to-dialog features, to verify that nothing new broke.
Ok, tested every toolbar button, all seems good. Is there anything else you can think of that might be related? Since I've got this instance ready to go, easy to test or change stuff if you think it might help or prevent.
What other apps use inner content? Would it be worth testing a different one? Doesn't seem likely it to me, but you would know better.
@jeremy-farrance I'm not too concerned with inner content working, since you and I tested it.
I'm more concerned if it could have some side-effects to anything else, live normal edit (not in inner content), etc. or replace-item (not inner content).
I have a good feeling, but would appreciate some testing. ;)
Okay, I switched and inserted a few different content types from the Content App on to the page and tested through all the default toolbar buttons. Everything worked as expected. I did notice, in the standard/default toolbar, that in the 3rd group, the edit View Settings button was missing (only edit template, edit items of the data type, and edit fields of this content type were there. I think I am used to edit View settings being in there, but maybe not? Or maybe its not because I am in the Content module and not App? But anyhow, played around for a bit and all seems great and works as expected!
awesome, thanks!
Feel free to use this release, we plan to make another release end of next week ca. March 20.
Thank you! As I mentioned in #3317 I won't be able to test for a little while, but I'll keep it on my to-do list!
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 ♥
@6TELOIV thx for confirming 😉