Support » Plugin: Post Types Order » Pages Not Sortable – Plus Major Issues Installing Pro Vers.

  • Resolved jewcbox

    (@jewcbox)


    Hi,
    I am battling a few issues. To Summarize, Pages are not sortable, nor does that post type (“Pages”) appear in the list of CPT’s, within the plugin’s settings page.

    First thing’s first, here’s some env. info:

    WP Ver: 5.7
    PHP Ver: 7.4

    I had quite the collection of plugins installed, including:

    • Divi Theme + Builder
    • WooCommerce
    • B2BKing for WooCommerce (Custom customer fields, etc.)
    • Misc. Other Plugins

    Originally, I had the non-pro version installed, and it was working for custom post types just fine. Ironically, I had not tried reordering Pages, until today, due to this being a 2-day old project, started with a clean install of WP.

    Today, I noticed I couldn’t reorder Pages, and started digging.
    It might be important to note that I am very in tune with my browser’s web dev. console. Both for watching for JS errors and HTTP requests/responses. Some usual chatter, but no errors and nothing I haven’t seen before on every other wordpress project of mine.

    I am very familiar with this plugin’s settings. I’ve tried everything.

    Some Observations:

    1:
    I noticed that the jquery class “ui-sortable” is not added to the parent element/container.

    Additional steps taken, to no avail:

    2:
    I disabled all plugins, including this plugin, followed by re-enabling only this plugin.

    3:
    I then took a look at the value of cpto_options within the wp_options db table, using an unserializer to convert from serialized to JSON. Next, I added "page":"show" into the list of post types, re-serialized it, and updated the db. No changes noticed.

    4:
    Next, I figured it wouldn’t hurt to buy the pro vers.
    Upon activation of the pro version, I got a hard PHP error.

    I wish i could be more helpful and provide the full error log, but I just setup this cloudways cloud hosting and the log buffer is tiny, and didn’t think to copy the exact error, but basically:

    It was throwing a Divi-related error but was bubbling up from the plugin’s WP call to remove/deactivate the non-pro version of the plugin.
    Upon manually deleting the folder, I got a similar error, which entailed manually removing the non-pro plugin from the list of active plugins within wp_options, which put the errors to bed.

    5:
    With the pro version activated, looking at the plugin’s settings page, I immediately noticed that all the custom post types (for B2BKings, etc) were no longer displayed nor sortable. I was sure this was merely from disabling the plugins, but this persisted after re-enabling a few test subjects, responsible for some of the custom post types.

    Below is the full list of post types that the pro version included on the settings page: (note that Pages is included)

    • Posts
    • Media
    • Pages
    • Projects
    • Products

    For clarification, at this stage, Pages remain unsortable.

    I have logging on, but it’s not really reporting anything useful.:

    -----
    2021-03-27 18:50:13 Found Sort ID 234 (Sort #234), Sort View ID 235, for query hash ea01416dcefae974db7e98edefae6dbb
    -----
    2021-03-27 18:49:46 Found Sort ID 234 (Sort #234), Sort View ID 235, for query hash ea01416dcefae974db7e98edefae6dbb
    -----
    2021-03-27 18:47:26 Found Sort ID 234 (Sort #234), Sort View ID 235, for query hash f534ddcfae8fd43ef498fea7cbc13cb0
    -----
    

    Those seem to pertain to viewing “All Pages

    6:
    I figured, my next best bet would be to revert to the non-pro version, to resolve sortability for all other post types besides Pages.

    For the record, with the non-pro version installed and activated, here’s the list of reported/sortable post types (compared to the previous list, using the pro vers.):

    • Post
    • Media
    • Reusable Block
    • Group
    • Conversation
    • Offer
    • Rule
    • Registration Role
    • Registration Field
    • Project
    • Product
    • Order
    • Coupon

    The handful of post types tested from the list above are sortable. But not with the pro version. You’ll also notice that the Pages post type is not reported above.

    Before reaching out, I went through and commented out all PHP routines in my functions.php file.

    I have maybe 15 other client sites that utilize this plugin just fine, so it might pertain to the newest version of WordPress. Regardless, there are also some issues with the pro version that might need to be touched on.

    Email me directly if you need any additional information and I don’t respond here. chris_at_ingis.com

    • This topic was modified 1 month, 2 weeks ago by jewcbox.
    • This topic was modified 1 month, 2 weeks ago by jewcbox.
    • This topic was modified 1 month, 2 weeks ago by jewcbox.
    • This topic was modified 1 month, 2 weeks ago by jewcbox.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jewcbox

    (@jewcbox)

    Here’s how I temporarily/manually resolved Sorting Pages:
    —————————————————————————————————————

    STEP #1:
    ……………………………………………………….

    The only way “Pages” is going to have a chance at being displayed in the settings page, is if you change:

    • file: includes/class.options.php
    • method: plugin_options_interface()
    • line: 93

    FROM:
    if(is_post_type_hierarchical($post_type_name))

    TO:
    if($post_type_name != 'page' && is_post_type_hierarchical($post_type_name))

    STEP #2 (Same File):
    ……………………………………………………….

    • file: includes/class.cpto.php
    • method: archiveDragDrop()
    • line: 272

    FROM:
    if ( is_post_type_hierarchical( $screen->post_type ) )

    TO:
    if ( $screen->post_type != 'page' && is_post_type_hierarchical( $screen->post_type ) )

    • This reply was modified 1 month, 2 weeks ago by jewcbox.
    • This reply was modified 1 month, 2 weeks ago by jewcbox.
    • This reply was modified 1 month, 2 weeks ago by jewcbox.
    Plugin Author Maya

    (@tdgu)

    Hi,
    If you own the advanced version, always contact us through the plugin page for fast support.
    The free code can’t re-order hierarchical post types. You can make the changes in the code per your description, still, there is no guarantee that it does not produce any issues in certain set-ups.

    #4 Divi incorporates the free code, so ensure you disable it if want to use the advanced version. Don’t know the exact interface to check but should be obvious through the Divi options.

    #5 If the custom post type does not exist, the plugin will not show it anywhere. If is defined but there is no main menu interface for it, you can still select it through the Sort Settings https://www.nsp-code.com/advanced-post-types-order-description-and-usage/create-simple-sort-for-a-custom-post-type/
    The log you mention, is recording the sort matches is found for front queries.

    #6 Instead the free code, at the Setings area, the The Advanced Post Types Order plugin shows the available ( active ) post types interfaces, meaning this control where the Re-Order pages should show up. That does not meant the custom post types can’t be selected through the sort, see the link above.

    Thanks

    Thread Starter jewcbox

    (@jewcbox)

    Hi,
    As per #4, wow that’s super helpful to know. Thank you! Yeah i can handle figuring that out.

    #5, roger!

    Thanks for your help. I don’t know why I was so headstrong on resolving this, on Saturday, it’s not the end of the world if I cant reorganize my pages lol!!
    Thanks dude.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.