ThemeShaper Forums » Thematic

[closed]

Error in attachment.php: the_attachment_link() and $post->$post_ID

(1 post)
  • Started 13 years ago by notlaura
  • This topic is not resolved
  1. I am getting this error on my attachment pages:

    Notice: Undefined property: stdClass::$post_ID in .../thematic/attachment.php on line 45

    Line 45 is:

    <div class="entry-attachment"><?php the_attachment_link($post->post_ID, true) ?></div>

    If I change $post->post_ID to $post->ID the error is fixed. After doing some research, I found the issue noted as a bug on this Trac ticket from last year but it doesn't seem to have been changed.

    I could copy attachment.php into my child theme and make the change, but I don't want to mess with the core files in order to keep the theme intact for updates. Does anyone else have this issue and/or is there something obvious I'm missing? Thanks.

    Posted 13 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.