• Resolved kastali_bleikr

    (@kastali_bleikr)


    Hi there,

    Just a quick question. I created a shortcode for some content in my main navigation menu. I went into the shortcode to edit it and I got an error saying that the shortcode was invalid or didn’t exist. It was weird because the shortcode still appeared to be working, but I can’t edit it. I created a new one with the same content and decided to just delete the old one. However, that that came up with an error saying that it had failed to delete it.

    My site still appears to be working, I’m just wondering if this is an issue others have experienced or if you have any idea what might have happened.

    The shortcode was literally just divs and links, no javascript or anything fancy like that.

    If you need to see some screenshots let me know.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author vaakash

    (@vaakash)

    Hi, can you please let me know the shortcode name you provided ?

    Thread Starter kastali_bleikr

    (@kastali_bleikr)

    Thanks for getting back to me! Sorry for the slight delay in responding back to you.

    The name of the shortcode that isn’t working is called “Nav WYPL Blogs”. The replacement that is currently on the site is called “Nav Blogs for WYPL”. They should be identical code wise or at least very close.

    The site is https://www.memphislibrary.org

    In the top navigation under WYPL. The shortcode is used in the widget in that mega menu and contains the 3 images (which are divs with backgrounds).

    Plugin Author vaakash

    (@vaakash)

    This is strange. I tried it in my server and it works without any issue.

    Can you please do the following ?

    1. Go to Settings –> Shortcoder
    2. Click export shortcodes button ( next to create shortcode button )
    3. Download the exported file
    4. Upload the file to “https://send.firefox.com/”
    5. Send an email to aakash [dot] 19493 @ gmail.com

    I’ll import the data in my website and check the issue.

    Thanks,
    Aakash

    shapal

    (@shapal)

    I’m having the same problem. How did you fix it?
    The code in the database (in the option_value field) looks like this:
    a:2:{s:15:"Section Divider";a:3:{s:7:"content";s:102:"<div id="%%anchor%%" class="section-divider"><div class="line"></div><div class="diamond"></div></div>";s:8:"disabled";i:0;s:10:"hide_admin";i:0;}s:19:"Ellen Reiss' Byline";a:3:{s:7:"content";s:132:"<h3 style="text-align: right;">—<span class="small-caps">Ellen Reiss</span>, <em>Aesthetic Realism Chairman of Education</em></h3>";s:8:"disabled";i:0;s:10:"hide_admin";i:0;}}

    • This reply was modified 7 years ago by shapal.
    Plugin Author vaakash

    (@vaakash)

    Please try removing the apostrophe next to Reiss and save again

    shapal

    (@shapal)

    Thanks for the quick reply. When I remove the apostrophe, both shortcodes dissappear from the Shortcoder options page. Any other ideas?

    shapal

    (@shapal)

    I’m still hoping for a solution to the problem.

    Plugin Author vaakash

    (@vaakash)

    @shapal I’m still working on it. Please give me some time.

    Thanks,
    Aakash

    shapal

    (@shapal)

    Not to worry. My work-around was to delete the shortcode in the database and make a new one without an apostrophe in the name. So far, so good!

    shapal

    (@shapal)

    Unfortunately, I have another problem. Though the shortcodes are working, when I click on either of them to edit, the section of the screen where I would expect the text editor is completely blank. Also, when I export the shortcodes and try reimporting them, I get this error message: “Failed to decode JSON in imported data.” The exported shortcodes are saved as a .txt file. Is that right? Here’s the contents of that exported file:
    {"shortcodes":{"Section Divider":{"content":"<div id=\"%%anchor%%\" class=\"section-divider\"><div class=\"line\"><\/div><div class=\"diamond\"><\/div><\/div>","disabled":0,"hide_admin":0,"devices":"all"},"TRO Signature":{"content":"<h3 class=\"tro-signature\">\u2014<span class=\"small-caps\">Ellen Reiss<\/span>, <em>Aesthetic Realism<br>Chairman of Education<\/em><\/h3>","disabled":0,"hide_admin":0,"devices":"all"}}}0

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Shortcode has an error saying invalid’ is closed to new replies.