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: Media search returns no return in admin dashboard if #3821

Closed
1 task done
burhandodhy opened this issue Jan 29, 2024 · 1 comment · Fixed by #3837
Closed
1 task done

BUG: Media search returns no return in admin dashboard if #3821

burhandodhy opened this issue Jan 29, 2024 · 1 comment · Fixed by #3837
Assignees
Labels
bug Something isn't working
Milestone

Comments

@burhandodhy
Copy link
Contributor

Describe the bug

Media search returns no result in the admin dashboard if the Documents and Protected Content features is enabled and the site has the ep_ajax_wp_query_integration filter set to true.

The problem is happening because the documents feature adds the mime type filter to search query

 "terms": {
                        "post_mime_type": [
                            "application\/pdf",
                            "application\/vnd.ms-powerpoint",
                            "application\/vnd.openxmlformats-officedocument.presentationml.presentation",
                            "application\/vnd.ms-excel",
                            "application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                            "application\/msword",
                            "application\/vnd.openxmlformats-officedocument.wordprocessingml.document",
                            ""
                        ]
                    }

Steps to Reproduce

  1. Add the add_filter( 'ep_ajax_wp_query_integration', '__return_true' ); in your codebase.
  2. Make sure Protected Content and Documents are enabled
  3. Search for the media name

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress and ElasticPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@burhandodhy burhandodhy added the bug Something isn't working label Jan 29, 2024
@burhandodhy burhandodhy self-assigned this Jan 29, 2024
@Serverfox
Copy link

Thank you for taking care!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants