You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
With the Origin module in the Extension Manager activated, some /?attachment_id=XXX URLs will not get properly redirected. Although the response is a 301, there is no location header. This causes GSC to report them as "Redirect error"
To Reproduce
Steps to reproduce the behavior:
Go to Media in the WordPress admin
Upload an image file, without assigning it to any post or page, take note of the image ID
In a new tab, go to the site main URL and append ?attachment_id= followed by the ID from step 2
Hit enter, the page will remain blank.
Expected behavior
There should be a redirect to the image location (WordPress default behavior) or a redirect to the attached page or post (Origin module behavior) but neither happens because the first is overruled while the second does not apply.
I would suggest falling back to the WP default redirection when no attached page or post is found.
The text was updated successfully, but these errors were encountered:
sybrew
transferred this issue from sybrew/The-SEO-Framework-Extension-Manager
Feb 21, 2025
This can only happen if the post_parent points to a post that has been deleted.
WordPress intends to clean up these pointers when a post gets deleted, but it's possible that this doesn't always happen properly.
We should add a check to test whether the page parent can be found and redirect to the image directly instead.
Describe the bug
With the Origin module in the Extension Manager activated, some /?attachment_id=XXX URLs will not get properly redirected. Although the response is a 301, there is no location header. This causes GSC to report them as "Redirect error"
To Reproduce
Steps to reproduce the behavior:
?attachment_id=
followed by the ID from step 2Expected behavior
There should be a redirect to the image location (WordPress default behavior) or a redirect to the attached page or post (Origin module behavior) but neither happens because the first is overruled while the second does not apply.
I would suggest falling back to the WP default redirection when no attached page or post is found.
The text was updated successfully, but these errors were encountered: