• Resolved iggy900

    (@iggy900)


    Using Gutenberg and Twenty-TwentyThree. When I add a shortcode to a wiki page, it works fine at first but after a few edits to other parts of the page, the shortcode vanishes.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author dmccan

    (@dmccan)

    Perhaps try using the Shortcode Block.

    Thread Starter iggy900

    (@iggy900)

    Code: 
    <p>
    <!-- wp:shortcode -->
    [yadawiki link="viloma" show="Viloma Pranayama"]
    <!-- /wp:shortcode -->
    </p>

    The entire block vanishes after editing elsewhere on the page. I switch between HTML and the block editor often and I suspect this is the cause.

    Plugin Author dmccan

    (@dmccan)

    I have a test site with the free Kadence theme and the Yada Wiki plugin installed. I went to the settings and enabled Gutenberg for Yada Wiki pages. I created wiki pages adding the shortcode block, pasting in a shortcode, saving, and then switching to Code view, editing the content, switching back, saving, viewing on the front. I also tried editing existing wiki pages, converting to blocks and repeating the above steps. I also tried editing existing wiki page and not converting to blocks and editing in the classic editor block as above. I didn’t run into the issue.

    Perhaps it is the theme or another plugin? Or maybe when you are pasting in the shortcode, the characters being pasted are HTML entities and not the characters (I don’t know if that is possible or matters, just guessing to try to help troubleshoot).

    Any more clues?

    Thread Starter iggy900

    (@iggy900)

    I appreciate your fast response. I’ll experiment with this on my test site and see if I can get clear steps to reproduce this and let you know.

    -Ian

    Thread Starter iggy900

    (@iggy900)

    I have been unable to get clear steps to reproduce this problem although it has happened again. What I can reproduce is that if I add a shortcode to a YadaWiki page, it displays out of line:

    So I put the shortcode link within a paragraph. It then lines up correctly but when I go back to edit in HTML. I see additional </p> and <p> tags have been inserted and the shortcode is again out of line.

    <p>Text in front of shortcode</p>

    <!-- wp:shortcode -->
    [yadawiki link="hip-joint" show=""]
    <!-- /wp:shortcode -->

    <p>Text after shortcode
    </p>

    I suspect the problem lies with the block editor and not with your YadaWiki

    Thanks for looking at this -Ian

    Thread Starter iggy900

    (@iggy900)

    The page I am using to test is here : https://iangray.yoga/test/

    Thread Starter iggy900

    (@iggy900)

    My problem was caused by using wrong DoubleQuote characters in my shortcode. I had a list of my wiki pagenames from a LibreOffice document with “ instead of ” – I am now building my shortcode strings in NotePad++ and I am having no problems.

    Thanks for your fast response – Ian

    I love YadaWiki

    Plugin Author dmccan

    (@dmccan)

    Thank you for sharing that in case other users run into something similar.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Shortcodes Vanish’ is closed to new replies.