Media Library “View” Button Redirects to Homepage

#941440
  • Resolved Valerie Burns
    Rank Math free

    I’m experiencing an issue with my WordPress site where clicking the “View” button on items in the Media Library redirects me to the homepage instead of showing the media file or attachment page. After conducting a conflict check, I have determined that the issue is caused by Rank Math.

    Here are the steps I’ve taken to troubleshoot the issue:

    Disabled the “Redirect 404 errors to homepage” feature in Rank Math. The problem persists.
    Reset permalinks under Settings > Permalinks. No change.
    Checked the 404 Monitor and Redirection Logs, but no 404s or redirects related to the media library URLs are logged.
    Conducted a full plugin conflict test. With only Rank Math active, the issue persists.
    Additional Details:

    WordPress Version: 6.7.1
    Rank Math Version: 1.0.234.1
    Theme: Avada 7.11.13
    Hosting: WP Engine
    Steps to Reproduce:

    Go to Media Library.
    Click on the “View” button for any media item.
    Observe the redirection to the homepage instead of the media file or attachment page.
    Expected Behavior: Clicking “View” in the Media Library should show the media file or the attachment page.

    Could you please help me resolve this issue? If there are any additional debugging steps or settings I need to adjust, let me know.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Valerie Burns
    Rank Math free

    Additional information:

    I just noticed that Wordfence is making 128 repeated calls when the media library is accessed. Could it be related? Here is the error from Query Monitor:

    Query Count Time Callers Potential Troublemakers
    SELECT name, val
    FROM wp_f2ac1be36f_wfconfig
    WHERE autoload = ‘yes’ /* From [archframestage.wpenginepowered.com/wp-admin/upload.php] in [/nas/content/live/archframestage/wp-content/plugins/wordfence/lib/wfConfig.php:304] */ 128 0.1520 wfConfig::loadAllOptions
    128 calls
    wfConfig::hasCachedOption
    67 calls
    wfConfig::getCachedOption
    60 calls
    wfConfig::updateCachedOption
    1 call

    Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    We’ve checked your site, and it seems that Rank Math is deactivated at the moment.

    However, we have the option to redirect your attachment URLs to your homepage (if unattached/orphan) which seems to be the cause of this issue.

    To disable that, head over to Rank Math > General Settings > Links and disable the Redirect Attachment option:

    redirect

    Here’s a link for more information:
    https://rankmath.com/kb/should-you-redirect-attachments/

    Looking forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

The ticket ‘Media Library “View” Button Redirects to Homepage’ is closed to new replies.