• https://photographybyrossi.com/?attachment_id=2610

    I think the “get_image_link” in the media.php is not working correctly. The link to my site with the offending attachment page is above. When I click on the image on that page, image id=2610, I expect to see a full size image of 2610. The results come up as an entirely different image.

    Can someone please help with this?

    I use a customized but it’s not a theme driven issue. I have tested this using WP twenty fourteen theme and the problem still exists.

    If the problem is elsewhere, and not the get_image_link, or in the media file please direct me to where to look.

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The link is working fine for me. Can you replicate the problem using the default Twenty Fourteen theme with all other plugins deactivated?

    Thread Starter Richard

    (@richrossi)

    OK, I activated theme twenty Fourteen and deactivated all plugins.

    My results are the same. When I click on image 2610, to view it in full size, a different image comes up.

    What is in your root .htaccess file? Do you have an .htaccess file in wp-admin? If so, what in that too?

    Thread Starter Richard

    (@richrossi)

    Here is the offending code, using Chrome Dev Tools.

    <article id="post-2610" class="art-post art-article post-2610 attachment type-attachment status-inherit hentry" style=""><h1 class="art-postheader"><a href="https://photographybyrossi.com/?attachment_id=2610" rel="bookmark" title="Proof-Final">Proof-Final</a></h1><div class="art-postcontent clearfix"><p class="attachment center"> <a href="https://photographybyrossi.com/?attachment_id=2626" title="Proof-Final" rel="attachment"> <img width="600" height="472" src="https://photographybyrossi.com/wp-content/uploads/Proof-Final-600x472.jpg" class="attachment-600x9999"

    Thread Starter Richard

    (@richrossi)

    here is what is in .htaccess in root:

    # Use PHP5.4 Single php.ini as default
    AddHandler application/x-httpd-php54s .php
    DirectoryIndex index.html.var index.htm index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml default.htm default.html home.htm index.php5 Default.html Default.htm home.html
    SetEnv PHPRC /home/classi86/public_html/php.ini
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    There is no .htaccess in wp-admin

    There#’s nothing wrong with your htaccess file and both https://photographybyrossi.com/?attachment_id=2610 & https://photographybyrossi.com/wp-content/uploads/Proof-Final-600×472.jpg are showing the same image for me.

    Thread Starter Richard

    (@richrossi)

    I’m confused! Let me ask you this? When I click on the image in the attachment page id-2610, what should be the result?

    My expectation is to see the full size image of image 2610.

    What I see is the full size image of (in this case) 2626. Is my thinking wrong on this?

    Thanks again.

    Can you replicate the problem using the default Twenty Fourteen theme with all other plugins deactivated?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Get image link is linking to a different image’ is closed to new replies.