Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: get_attached_file not returning global media path #147

Open
1 task done
davegreenwp opened this issue Apr 5, 2024 · 1 comment
Open
1 task done

[Bug]: get_attached_file not returning global media path #147

davegreenwp opened this issue Apr 5, 2024 · 1 comment

Comments

@davegreenwp
Copy link

davegreenwp commented Apr 5, 2024

Description of the bug

The core get_attached_file function is returning false when trying to retrieve an image that is in the global media library.

Reproduction instructions

  1. Attempt to get the path to the image using get_attached_file( $image_id )

Expected behavior

Receive an image path in the response to get_attached_file( $image_id ).

Environment info

Standard WordPress multisite setup

Relevant log output

No response

Additional context

A customer has raised a compatibility issue with one of our products, and we're looking for insight into how we can patch this.

Naturally, the switch_to_blog approach isn't working as there is more going on here. Any advice welcome!

Code of Conduct

  • I agree to follow this project's Code of Conduct
@hiheaven
Copy link

hiheaven commented Jul 5, 2024

Same issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants