Thanks for your report and for the details you’ve provided. What an intriguing set of symptoms.
The “Inserted in” function does a pretty simple text match between the content of you post/page and the file name of the Media Library item. I’d like to reproduce your symptoms on my own system so I can investigate further.
Could you post a link to one or more of the pages with the false “Inserted in” reports and the URL of the item with the false reports? Any additional details you can provide would be very helpful.
I use a plugin to vacuum revisions, and based on reading some of your other detailed threads, you try to be efficient in the post-save, so probably these videos were at some point inserted in posts they currently make claim to, but the revisions no longer exist.
I’ve found that just hammering the database with something like:
SELECT * FROMpostsWHEREpost_contentREGEXP '\\[video.*blah..blah.*\\.mp4"\\]\\[/video\\]' AND NOTpost_type= 'revision' AND NOT post_status = 'draft'
Mostly solved my immediate problem.
You asked for a page that has the problem. I’m not sure I can provide that without offering you temporary admin access.. (something I have no problem with, but just saying).
Or is my vacuum plugin, “Optimize Database after Deleting Revisions”, theory probably the source of the issue?
And if so, I’m not sure how to reconcile it. Perhaps, yet another feature to your quite rich product’s assets could introduce a button that rebuilds he “inserted in” field contents from scratch?
Thanks for your update with the additional information.
You wrote “ introduce a button that rebuilds he “inserted in” field contents from scratch” In fact, the Inserted in information is never cached; the database queries are performed from scratch each time the Media/Assistant admin submenu or Media/Edit Media admin submenu are loaded. That’s why I provided an option setting to disable them when they are not needed.
Here is an example of the query made on the Media/Edit Media screen for an item (“Panoche Summit”) on my test system:
SELECT ID, post_type, post_status, post_title, CONVERT(post_content`
USING utf8 ) AS POST_CONTENT
FROM mladev_posts
WHERE (post_type <> ‘revision’)
AND ( ‘1’=’0′
OR ( POST_CONTENT LIKE ‘%2017/11/Panoche-Summit-150×100.jpg%’)
OR ( POST_CONTENT LIKE ‘%2017/11/Panoche-Summit-300×200.jpg%’)
OR ( POST_CONTENT LIKE ‘%2017/11/Panoche-Summit-768×512.jpg%’)
OR ( POST_CONTENT LIKE ‘%2017/11/Panoche-Summit-1024×683.jpg%’)
OR ( POST_CONTENT LIKE ‘%2017/11/Panoche-Summit-624×416.jpg%’)
OR ( POST_CONTENT LIKE ‘%2017/11/Panoche-Summit.jpg%’) )
`
As you can see, revisions are excluded so that shouldn’t be a contributing factor. The query does a simple “LIKE” query for the full file name and every intermediate size of the file.
It would be great if you could post the “Attachment Metadata” and “Inserted in” meta box contents from one item along with the content metabox from one of the false positive posts/pages. You can also email me the information if that’s better for you. If you give me your contact information and I will send you an email address you can use to send the information to me. You can use the Contact Us page at our web site:
Fair Trade Judaica/Contact Us
I look forward to seeing the information or hearing from you. Thanks for your help and your interest in the plugin.
Thanks for contacting me offline with additional details on your results. I’ve responded with some suggestions on next steps.
I have also uploaded a new MLA Development Version dated 20171220 with some extra debug logging in the affected code. To get the Development Version, follow the instructions in this earlier topic:
504 Time-Out issue
Let me know how you’d like to proceed. Thanks for your help with this issue.
I have released MLA version 2.70, which contains the additional logging code I mentioned in the earlier post. I am ready to give you whatever help I can to resolve your where-used reporting problem. Let me know how you would like to proceed.
It has been over two months since my last post in this topic. I assume you have found a solution that works for your application.
I am marking this topic resolved, but please update it if you still have problems or further questions regarding MLA’s where-used reporting.