• Resolved heiland

    (@heiland)


    Since the update to Version 2.20 I cannot select media by categories.

    A query like:
    SELECT SQL_CALC_FOUND_ROWS t54p7h_posts.ID FROM t54p7h_posts WHERE 1=1 AND t54p7h_posts.post_type = ‘attachment’ AND ((t54p7h_posts.post_status = ‘inherit’)) ORDER BY t54p7h_posts.ID_parent DESC LIMIT 0, 10
    returns the message:
    Unknown column ‘t54p7h_posts.ID_parent’ in ‘order clause’

    https://ww.wp.xz.cn/plugins/media-library-assistant/

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

    (@dglingren)

    Thanks for your report. Thanks as well for posting the text of the SQL query and the resulting message, which is very helpful.

    I regret that I have not been able to reproduce this problem on my test system. Can you give me the steps you performed to get the error?

    Looking at the SQL, it’s clear that the ORDER BY t54p7h_posts.ID_parent clause should be ORDER BY t54p7h_posts.ID. It also looks like this is coming from the Media/Assistant submenu, but I do not see how selecting by categories is involved.

    Thanks for your patience and any additional information you can provide.

    Plugin Author David Lingren

    (@dglingren)

    I believe I have found the cause of this problem.

    If I’m right, you can fix it immediately by going to the Settings/Media Library Assistant General tab and scrolling down to the “Table Defaults” section. If you see “None” in the Orderby dropdown, click on it and pick another value, such as “ID/Parent”. Scroll to the bottom of the screen and click “Save Changes” to record your new setting.

    Let me know if that works for you, so I can verify that I have found the true cause.

    I will fix the problem and make a new release shortly. Thanks again for reporting this issue.

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA version 2.21, which contains a fix for the Table Defaults Order by problem that caused your “Unknown column” problem.

    I am marking this topic resolved, but please update it if the new version does not solve this problem. Thanks for reporting it and for your interest in the plugin.

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

The topic ‘Unknown column posts.ID_parent' in 'order clause'’ is closed to new replies.