WordPress.org

Ready to get started?Download WordPress

Forums

My Shortcodes
[resolved] Parse Error (7 posts)

  1. michaelphill
    Member
    Posted 1 year ago #

    I'm getting this error on one shortcode (both in the WP admin panel and when viewing the page as a normal viewer on the frontend). There's no PHP in the template, either.

    Parse error: syntax error, unexpected '}' in /home/***/public_html/wp-content/plugins/my-shortcodes/libs/functions.php(1631) : eval()'d code on line 6

    Here's the code I have in the HTML template tab:

    <div class="n-item" style="clear:both;border-bottom:1px solid #EBEBEB; padding: 30px 0 30px 0;">
        <h6 style="font-size:32px;text-transform:none;line-height:33px;">{{title}}</h6>
        <img src="{{img}}" style="float: left;" />
        <div class="n-item-meta" style="float: left; margin: 0 0 0 30px;">
            {{description}}
            [if author] By {{author}}[/if]
            <a href="//pinterest.com/pin/create/button/?url=&media={{img}}&description={{title}}" data-pin-do="buttonPin" data-pin-config="none"><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a>
        </div>
    </div>

    http://wordpress.org/plugins/my-shortcodes/

  2. David Cramer
    Member
    Plugin Author

    Posted 1 year ago #

    Hi There,
    At first I could not replicate it but then I realised that there may be something with authors name. I attempted your code and used ' in the authors name and got a similar error. It's not the same error but it does show me there is a problem with it.

    I have made an update to fix the problem I found and hope it fixes yours. I'll push the update now. please try it out and let me know if it helps. If not, I'll do my best to sort it for you.

  3. michaelphill
    Member
    Posted 1 year ago #

    Thanks for the reply!

    I updated to 2.05 and am still getting the error.

    The strange thing is that it's giving me the error both in the shortcode editor (i.e. without knowing what the author name is) and on the frontend. Also, author name I'm using doesn't have an apostrophe.

  4. David Cramer
    Member
    Plugin Author

    Posted 1 year ago #

    Would I be able to get login details to take a look?

  5. michaelphill
    Member
    Posted 1 year ago #

    How can I DM you?

  6. David Cramer
    Member
    Plugin Author

    Posted 1 year ago #

    In the my shortcodes admin, there's a Send Feedback button with my email.

  7. David Cramer
    Member
    Plugin Author

    Posted 1 year ago #

    Problem was that the {{author}} attribute did not exist. this caused it to attempt to run without replacing the tag.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags