Not finding tags
-
Hi David!
For some reason when I use the Search Box and search for a tag that I know exists it won’t find the images. I’m reverted back to the GA version rather than the dev edition but the behavior is the same.When I use the Terms Search box it does find the images correctly.
Any ideas on why that would be?
-
Congratulations and thank you; you have found a small MLA bug.
I have corrected the defect and uploaded a new Development Version which should let you find tag values with the “Search Media” box. Of course, you must also check the “Term Search” box for the Tags taxonomy in the Settings/Media Library Assistant General tab.
I will mark this topic resolved when the next MLA version, containing the fix, goes out. Please update it if you have any problems or further issues with the latest Development Version.
Thanks for your report and for your continued interest in the plugin.
Hi again!
I installed the updated dev version but it doesn’t seem to work properly, but let’s make sure that I’m describing the issue properly first.I have images with ATT Tags such as Children, Maternity. I tried searching for both of those terms in both the Search Box found on the right side, where I have “Terms” checked; and I also tried using the Terms Search button.
In both cases the search doesn’t produce the results- no images are found. Interesting
I did upload and overwrite some images via FTP. They were the same images just a slightly larger size and should be the same metadata. I just noticed that wordpress says a particular file is the incorrect size. Could that have corrupted something? Is there a way to reindex the images to be sure?
Let me know if I should try something else. Very much appreciate your incredible support. thank you.
Thanks for taking the time to try the new Development Version and for your update. I regret that it did not solve your problem. I appreciate your patience and your help with some additional questions.
Do the terms appear in the “Att. Tags” column of the Media/Assistant submenu table? If you click on a term in that column are the images you expect to see present in the filtered list?
You wrote “I tried searching for both of those terms“; are you searching for each term separately or for the combination “Children Maternity” in one search? If it’s the same search, did you change the connector option to “Or”?
In your first post, you could find the images with the Terms Search popup but not with the Search Media box. Your second post says that neither of these features can find the images. Has the problem changed between your posts?
Have you tried unchecking all the search field boxes under the Search Media box except “Terms”?
If you can do it, an experiment would be very helpful. Could you try adding “
>|<
” to the Search Media box before your search term, e.g., “>|<Children
“? This should display nine ugly but informative PHP warning messages with debugging information that I can look at.You also wrote “I did upload and overwrite some images via FTP“; I do this from time to time as well. Replacing the image files via FTP will not disturb the database information or change the terms assigned to the Media Library item unless you use the MLA mapping rules on the item after you replace the files.
Any additional information you can provide will be helpful; thanks!
Hi David,
Do the terms appear in the “Att. Tags” column of the Media/Assistant submenu table? If you click on a term in that column are the images you expect to see present in the filtered list?
Yes, they appear in the column and when I click it shows the associated images.You wrote “I tried searching for both of those terms”; are you searching for each term separately or for the combination “Children Maternity” in one search? If it’s the same search, did you change the connector option to “Or”?
I tried searching separately and now tried with the “Or” but neither will work. It does seem to pick up a search term in the Title or Name, just not the tag.In your first post, you could find the images with the Terms Search popup but not with the Search Media box. Your second post says that neither of these features can find the images. Has the problem changed between your posts?
Yes, it seems to have changed. But I’m wondering if it has something to do with the FTP upload I made, however, I used the same names. Strangely, however, the image size doesn’t seem to have updated to the actual size of the new image I uploaded.Have you tried unchecking all the search field boxes under the Search Media box except “Terms”?
Yes, I’ve tried most combinations.If you can do it, an experiment would be very helpful. Could you try adding “>|<” to the Search Media box before your search term, e.g., “>|<Children”? This should display nine ugly but informative PHP warning messages with debugging information that I can look at.
No Items FoundYou also wrote “I did upload and overwrite some images via FTP”; I do this from time to time as well. Replacing the image files via FTP will not disturb the database information or change the terms assigned to the Media Library item unless you use the MLA mapping rules on the item after you replace the files.
Any additional information you can provide will be helpful; thanks!
When I look at the “ATT. Tags” cloud it does seem to show the correct number of images under column “Attachments”. I’m not sure what else I can provide. Is it possible to have it reindex or reload the files and pick up the tags again? I’ll definitely help troubleshoot.
Thanks for taking the time to follow up on my suggestions and answer my questions thoughtfully and thoroughly. It looks like you have done a complete job of experimenting and documenting your results.
You wrote “No Items Found” for the “>|<” experiment; does that mean the PHP warnings did not display? You should have seen messages on your screen like this one:
`
Warning: DEBUG: mla_query_posts_search_filter = “array ( ‘search_string’ => ”, ‘search_parameters’ => array ( ‘debug’ => ‘console’, ‘s’ => ‘Slim’, ‘mla_search_fields’ => array ( 0 => ‘title’, 1 => ‘content’, ), ‘mla_search_connector’ => ‘AND’, ‘sentence’ => false, ‘exact’ => false, ), ‘search_clause’ => ‘ AND ( ((mladev_posts.post_content LIKE \’%Slim%\’) OR (mladev_posts.post_title LIKE \’%Slim%\’)) ) ‘, )”. in C:\Users\dlingren\Documents\My Data\Data Files\Web Design\VirtualHosts\mladev\wp-content\plugins\media-library-assistant\includes\class-mla-data.php on line 2337
`If the messages did not display you might need to adjust your wp-config.php file to enable them. If you have access to your error.log file you can use “<|>” to write messages there instead of to the screen.
You also wrote “Strangely, however, the image size doesn’t seem to have updated to the actual size of the new image I uploaded.” Copying a new file to your site by FTP outside of WordPress will not update anything in the WordPress database. In the Media/Edit Media screen you will see some information in the “Save” meta box including File name, File type, File size and Dimensions. Only the “File size” entry is taken directly from the file itself. The other information including Dimensions is stored in the database when the file is first uploaded and will not change if you simply replace the file via FTP.
There are plugins such as “Enable Media Replace” that do a somewhat better job, but they have their own issues.
Finally, you asked “Is it possible to have it reindex or reload the files and pick up the tags again?” Based on the information you have provided I do not think that would help. Clicking on a term in the submenu table and getting the right results indicates a valid database, as does the “Attachment” count.
The Terms Search and Search Media features work differently from the submenu table click and the Attachment count. Both of them do a text/keyword search on the “Name” of the term. It is possible there is some subtle issue with the content of the Name field that is not visible (but I think it is unlikely). You can try uploading a new image from scratch and assigning a new term, such as “test” to it. Then try Terms Search and Search Media for the new term.
If all else fails, perhaps you can give me a temporary account on your site so I can do my own testing. I realize that may not be possible.
Thank you for your patience and understanding. This is an interesting problem!
Thank YOU for being so patient and taking time to help!
If found this in the error log but it didn’t display in wordpress front end search.[07-Mar-2015 20:30:17 UTC] PHP Warning: DEBUG: _execute_list_table_query $wp_filter = "array ( 'posts_search' => array ( 10 => array ( 'MLAData::mla_query_posts_search_filter' => array ( 'function' => 'MLAData::mla_query_posts_search_filter', 'accepted_args' => 2, ), ), ), 'posts_join' => array ( 10 => array ( 'MLAData::mla_query_posts_join_filter' => array ( 'function' => 'MLAData::mla_query_posts_join_filter', 'accepted_args' => 1, ), ), ), 'posts_where' => array ( 10 => array ( '000000006aad8e0d000000000ddd8c60invalidate_main_query' => array ( 'function' => array ( 0 => WPSEO_Sitemaps::__set_state(array( 'sitemap' => '', 'stylesheet' => '<?xml-stylesheet type="text/xsl" href="//www.genineesposito.com/main-sitemap.xsl"?>', 'bad_sitemap' => false, 'transient' => false, 'max_entries' => 1000, 'post_t in /home1/geninees/public_html/wp-content/plugins/media-library-assistant/includes/class-mla-data.php on line 1924 [07-Mar-2015 20:30:17 UTC] PHP Warning: DEBUG: mla_query_posts_search_filter = "array ( 'search_string' => '', 'search_parameters' => array ( 'debug' => 'console', 's' => 'Children', 'mla_search_fields' => array ( 0 => 'terms', ), 'mla_search_connector' => 'OR', 'sentence' => false, 'exact' => false, ), 'search_clause' => ' AND ( 1=0 ) ', )". in /home1/geninees/public_html/wp-content/plugins/media-library-assistant/includes/class-mla-data.php on line 2247 [07-Mar-2015 20:30:17 UTC] PHP Warning: DEBUG: mla_query_posts_where_filter = "array ( 'where_string' => ' AND ( 1=0 ) AND wp_posts.post_type = \'attachment\' AND ((wp_posts.post_status = \'inherit\'))', 'where_clause' => ' AND ( 1=0 ) AND wp_posts.post_type = \'attachment\' AND ((wp_posts.post_status = \'inherit\'))', )". in /home1/geninees/public_html/wp-content/plugins/media-library-assistant/includes/class-mla-data.php on line 2316 [07-Mar-2015 20:30:17 UTC] PHP Warning: DEBUG: mla_query_posts_join_filter = "array ( 'join_string' => '', 'join_clause' => '', )". in /home1/geninees/public_html/wp-content/plugins/media-library-assistant/includes/class-mla-data.php on line 2370 [07-Mar-2015 20:30:17 UTC] PHP Warning: DEBUG: mla_query_posts_orderby_filter = "array ( 'orderby_string' => 'wp_posts.post_modified ASC', 'orderby_clause' => 'wp_posts.post_modified ASC', )". in /home1/geninees/public_html/wp-content/plugins/media-library-assistant/includes/class-mla-data.php on line 2472 [07-Mar-2015 20:30:17 UTC] PHP Warning: DEBUG: mla_query_posts_clauses_filter = "array ( 'where' => ' AND ( 1=0 ) AND wp_posts.post_type = \'attachment\' AND ((wp_posts.post_status = \'inherit\'))', 'groupby' => '', 'join' => '', 'orderby' => 'wp_posts.post_modified ASC', 'distinct' => '', 'fields' => 'wp_posts.*', 'limits' => 'LIMIT 0, 100', )". in /home1/geninees/public_html/wp-content/plugins/media-library-assistant/includes/class-mla-data.php on line 2511 [07-Mar-2015 20:30:17 UTC] PHP Warning: DEBUG: mla_query_posts_clauses_request_filter = "array ( 'where' => ' AND ( 1=0 ) AND wp_posts.post_type = \'attachment\' AND ((wp_posts.post_status = \'inherit\'))', 'groupby' => '', 'join' => '', 'orderby' => 'wp_posts.post_modified ASC', 'distinct' => '', 'fields' => 'wp_posts.*', 'limits' => 'LIMIT 0, 100', )". in /home1/geninees/public_html/wp-content/plugins/media-library-assistant/includes/class-mla-data.php on line 2535 [07-Mar-2015 20:30:17 UTC] PHP Warning: DEBUG: _execute_list_table_query WP_Query = "array ( 'request' => array ( 'm' => 0, 'orderby' => 'post_modified', 'order' => 'ASC', 'post_type' => 'attachment', 'post_status' => 'inherit', 'offset' => 0, 'posts_per_page' => 100, ), 'query_parameters' => array ( 'use_postmeta_view' => false, 'orderby' => 'post_modified', 'order' => 'ASC', 'detached' => NULL, 'debug' => 'console', ), 'post_count' => 0, 'found_posts' => 0, )". in /home1/geninees/public_html/wp-content/plugins/media-library-assistant/includes/class-mla-data.php on line 1944 [07-Mar-2015 20:30:17 UTC] PHP Warning: DEBUG: _execute_list_table_query SQL_request = "'SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND ( 1=0 ) AND wp_posts.post_type = \'attachment\' AND ((wp_posts.post_status = \'inherit\')) ORDER BY wp_posts.post_modified ASC LIMIT 0, 100'". in /home1/geninees/public_html/wp-content/plugins/media-library-assistant/includes/class-mla-data.php on line 1946
I’d be happy to give you access if you wish, just lmk and I’ll message you.
-KerryThat’s excellent – thanks for digging It out. I will have a look and respond in a day or two.
I have reviewed the debug information you posted, and it looks like you were not using the most recent Development Version when those messages were logged. In particular, I looked at this bit of information:
[07-Mar-2015 20:30:17 UTC] PHP Warning: DEBUG: mla_query_posts_search_filter = “array (
‘search_string’ => ”,
‘search_parameters’ =>
array (
‘debug’ => ‘console’,
‘s’ => ‘Children’,
‘mla_search_fields’ =>
array (
0 => ‘terms’,
),
‘mla_search_connector’ => ‘OR’,
‘sentence’ => false,
‘exact’ => false,
),I do not see the
mla_search_taxonomies
list in thesearch_parameters
array. That’s the bug I found and fixed in the latest update.If you go to the Plugins/Installed Plugins screen and look at the Media Library Assistant plugin, the description should begin with a date such as “20150306” (that’s the latest version). If you see anything else, try downloading and installing the Development version again, then re-running your tests.
Since you do not get the debug messages on the screen, you could try adding “<|>” before the search string, e.g., “<|>Children”. That will write more complete information to the error log.
Let me know what you find. If the error persists, I have some ideas for more debug information I can add to narrow the search.
Hi David, I did revert back to the non-development version when I was having issues. Just now I changed it back to the 20140306 version and it is working again properly. I’m not sure if that is due to reinstalling it or that I deleted most of the images and uploaded new ones, regardless it seems to be working. thanks for catching the issue. Keep you posted if I see any other anomalies.
Do you have any recommendations for easily replacing images when I need to change sizes or metadata?
Thanks for your update with the good news. I am happy to hear the Development Version is working for you, and I will mark this topic resolved when the next official MLA version goes out with the fix.
I have never found a good technique for “easily replacing images when I need to change sizes or metadata“. If you change the size or meta data, it’s a new image and should be uploaded as a new Media Library item. You may find some tips or ideas in this earlier topic along similar lines:
Custom Field Map All Attachments not working
Starting about nine posts into that topic is a discussion of the Image Editor, Enable Media Replace and so forth.
I have given some consideration to building a new plugin for tasks like this but so far I have not found the time to make any serious progress on it. If you find something that works please share it!
Thanks again for working with me on the “Terms Search” issues and for your interest in the plugin.
I have released MLA version 2.10, which contains the Terms Search enhancements this topic requires.
I am marking this topic resolved, but please update it if you have any problems or further questions regarding the Terms Search features.
- The topic ‘Not finding tags’ is closed to new replies.