Template Append to page content not working
Describe the Bug
Hi,
if using the Append to page content, the template not adding on page.
Steps to Reproduce
- Open page
- Click on menu
- Click Template
- Click on
Append to page contentbutton
Expected Behaviour
Append to page content when click on button
Screenshots or Additional Context
Browser Details
No response
Exact BookStack Version
24.05
Hi @gaetan-31, This works for me in my testing on Chrome and FireFox.
- Has this ever worked for you?
- Does prepend (or clicking on the template item to replace content) work?
- Does this work for you on our demo instance.
- What browser are you using?
- On your own instance, where this is not working, If you start a search via the main header bar, do you see the search preview load results as you type (beyond three characters) without pressing enter?
- How did you install/run BookStack?
Does prepend (or clicking on the template item to replace content) work? => Yes Does this work for you on our demo instance =>Yes What browser are you using? => Test on Firefox, Chrome and Edge On your own instance, where this is not working, If you start a search via the main header bar, do you see the search preview load results as you type (beyond three characters) without pressing enter? => Yes How did you install/run BookStack? => with https://www.bookstackapp.com/docs/admin/installation/ & https://www.howtoforge.com/how-to-install-bookstack-on-ubuntu-20-04/
Thanks @gaetan-31,
I'm not really sure what's going on then if the demo works okay, and the other template actions work okay. Can you open the browser development tools (Usually F12, Or right-click on page > Inspect element) and open the "Console" tab. Do any log messages appear in this console tab when you click the template append button? If so, can you share them?
Hi @ssddanbrown yes that :
Uncaught (in promise) RangeError: Applying change set to a document with the wrong length
apply https://server/dist/code.js?version=v24.05:5
get newDoc https://server/dist/code.js?version=v24.05:5
applyTransaction https://server/dist/code.js?version=v24.05:5
get state https://server/dist/code.js?version=v24.05:5
update https://server/dist/code.js?version=v24.05:10
dispatchTransactions https://server/dist/code.js?version=v24.05:10
dispatch https://server/dist/code.js?version=v24.05:10
$ https://server/dist/markdown.js?version=v24.05:22
appendContent https://server/dist/markdown.js?version=v24.05:20
ur https://server/dist/markdown.js?version=v24.05:22
Zi https://server/dist/app.js?version=v24.05:2
insertTemplate https://server/dist/app.js?version=v24.05:22
3 code.js:5:6256