Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi Jesse,

    I am not seeing any issues after I tested on my latest install, seems to work like a charm (but I did sure read this thread before I tested)!

    I can only hope it is a conflict with your theme or another plugin?

    Cheers
    Seth

    I second this issue – on vanilla WP install with SCPO plugin you CAN’T order the gallery images properly. I am pretty much sure that it’s because plugin doesn’t have an option to exclude media type attachment from sorting – I will try to find solution later today….

    OK, I needed this fast so I just did quick’n’dirty hack so it won’t include attachments in SCPO Here is solution (I hope author will include in next update so we don’t have to do it every time):
    In plugin directory edit file simple-custom-post-order.php
    locate line 148 (it should be inside refresh function) and current line is like this:

    $results = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type = '".$object."' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') ORDER BY menu_order ASC" );

    Now EXCLUDE attachment page from being queried and replace that line with this line:

    $results = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type = '".$object."' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') AND post_type != 'attachment' ORDER BY menu_order ASC" );

    NOTE: only thing changed here is AND post_type != 'attachment'

    Everything should work OK now.

    Hey everybody,

    I thought it was a problem with Advanced Custom Fields I am using for creating galleries for posts, but it turns out this one is mocking! I inserted your fix, @peterbra, but it does not work for ACF image galleries, unfortunately (do not seem to be normal attachments). I am really hoping this is going to be fixed…..

    physalis

    You should see what kind of post is that and just exclude it from mysql query (so it’s never processed). It should be easy fix, but of-course, with every plugin update – you will have to add that post-type as an exclusion ??

    If it’s creating it’s own db tables – it’s going to be slightly more complicated, but definitely doable.

    Hey @peterbra,

    ACF galleries are not a specific post type, so I’d have to exclude every post type using the galleries – this does not sound like a fix at all, haha :D. I think it is saved as arrays to the database, which would be more complicated then.

    Ref. https://www.advancedcustomfields.com/resources/gallery/

    Best

    physalis

    Well bro – if you are good with PHP – check in mysql and see how it’s storing data and try to manipulate it (I don’t have time to play with it now), and then find you own fix for that – I never worked with that plugin as I think that it’s always best to use native WP stuff and just manually modify them through functions ( you know what you did so it’s easy to update in some point of time if needed + relying on plugin can be fuzzy e.g. plugin author stops updating it and after 5-6 WP updates it breaks so does the whole site).

    Good luck with that bro !

    Yeah, bro — I am just beginning with PHP, more of a frontend guy, so I would be a bit lost here, but understand completely what you mean.

    ACF normally is very conform to WordPress standards, so I do not know how the data is actually stored for its image galleries. I would have thought it would be an attachment as well (as its image field does), but it seems different.

    However, thanks for effort for the first fix and in trying to help out here ;)!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Plugin is BROKEN for WP 4.1, breaks Media Library’ is closed to new replies.