WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Post List
Graceful exit from non-existent shortcode? (4 posts)

  1. polins
    Member
    Posted 2 years ago #

    Shortcodes may be accidentally deleted or damaged: is there a way for the plugin to gracefull ignore "non-existent" shortcodes? I just get a "500 server error".
    (Some other shortcode plugins simply ignore invalid names.)

    This is a very useful plugin, nevertheless. THX.

    http://wordpress.org/extend/plugins/advanced-post-list/

  2. jokerbr313
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm, this is new. Can I get a lil more info on it though plz.

  3. polins
    Member
    Posted 2 years ago #

    Sorry — too brief.

    1. Create a shortlink such as [post_list name="junk1"] and paste it into a page.
    2. Delete the shortlink from within admin, or accidentally place the shortlink [post_list name="junk2"] on a page.
    3. Result when viewing the page output: I get a 500 server error.

    This is not a "flaw". However, a more elegant solution would be for WP simply to to ignore any shortcodes that do not exist. A couple of examples of shortcode plugins that have this functionality are Global Content Blocks and Get Custom Field Values.

    PS I appreciate this plugin—it's very versatile for things in addition to "post lists".

  4. jokerbr313
    Member
    Plugin Author

    Posted 2 years ago #

    Ah ok, now I see what's going on. It seems I've been getting more posts on issues with the shortcodes than any other, and it's one part of the plugin that I need to go over. Right now I'm planning on making the shortcode issues and additions my next project though.

    I'll see if I can squeeze some code in the next update so that it will check if the shortcode exists first. Shouldn't be hard, but I haven't familiarize myself with that part of the plugin quite yet.

    Thanks for the feedback, I didn't know about this issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic