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

Description of some image is not visible #894

Open
milzulempis opened this issue Aug 2, 2021 · 1 comment
Open

Description of some image is not visible #894

milzulempis opened this issue Aug 2, 2021 · 1 comment

Comments

@milzulempis
Copy link

I've got unexpected behavior.
Didn't understood why there is no description visible for one image.

turns out in controller.php line 882

// Retrieve attachment IDs.
$uris_flat = "('" . implode("','", array_keys($uris_base)) . "')";
$q = $wpdb->prepare("SELECT post_id, meta_value FROM $wpdb->postmeta WHERE `meta_key` = %s AND LOWER(`meta_value`) IN $uris_flat LIMIT %d", '_wp_attached_file', count($uris_base)+10);

When I have in media 2 different images with case sensitive names like:
2020/10/03_cannelle.png
2020/10/03_Cannelle.png

it gets id for both of them althought one is not in url list and image with max id is left out due to limit.

I made a quick fix for myself with limit increase.
But maybe this LOWER() shoud be removed?
At least in case sensitive file systems.

@archetyped
Copy link
Owner

Thanks for the report, I will look into this.

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

No branches or pull requests

2 participants