WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Parse Error

[Resolved] Parse Error

  • 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/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author David Cramer

    @desertsnowman

    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.

    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.

    Plugin Author David Cramer

    @desertsnowman

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

    How can I DM you?

    Plugin Author David Cramer

    @desertsnowman

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

    Plugin Author David Cramer

    @desertsnowman

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Parse Error’ is closed to new replies.