• Resolved fractaleater

    (@fractaleater)


    Using MLA 2.65.

    I’m attempting to cleanup my 200 or so webinars as I’ve moved them from my site to Vimeo. I’ve got a list of two dozen videos that need some special care to make dedicated pages to replace the direct video short code URL links throughout the site.

    Naturally, I attempted to use the “inserted in” screen option and MLA to identify the pages where the video URLs might be referenced. I tried a search for the first base file name, and MLA happily returned the post created when the video was added to wordpress. But there were dozens of links under the “inserted in” column. I checked the first two links, and could find no reference to the URL or the post id of the video in the post’s contents. There was a video embedded in a video short code, but the URL did not have the same file name as the video I was looking for. Neither the media post, nor the content post have parents.

    Checking the video’s post page shows an uneditable “inserted in” field that contains the same links as showed by MLA’s admin search.

    I’d like to figure out how to get “inserted in” working so that it only shows me posts where the media file is actually referenced.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author David Lingren

    (@dglingren)

    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.

    Thread Starter fractaleater

    (@fractaleater)

    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?

    Plugin Author David Lingren

    (@dglingren)

    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.

    Plugin Author David Lingren

    (@dglingren)

    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.

    Plugin Author David Lingren

    (@dglingren)

    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.

    Plugin Author David Lingren

    (@dglingren)

    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.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘“inserted in” too many rows’ is closed to new replies.