BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Template Append to page content not working

Open gaetan-31 opened this issue 1 year ago • 4 comments

Describe the Bug

Hi, if using the Append to page content, the template not adding on page.

Steps to Reproduce

  1. Open page
  2. Click on menu
  3. Click Template
  4. Click on Append to page content button

Expected Behaviour

Append to page content when click on button

Screenshots or Additional Context

Template

Browser Details

No response

Exact BookStack Version

24.05

gaetan-31 avatar May 16 '24 10:05 gaetan-31

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?

ssddanbrown avatar May 16 '24 13:05 ssddanbrown

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/

gaetan-31 avatar May 17 '24 08:05 gaetan-31

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?

ssddanbrown avatar May 17 '24 14:05 ssddanbrown

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

gaetan-31 avatar May 27 '24 11:05 gaetan-31