WordPress.org

Ready to get started?Download WordPress

Forums

Bulk Delete
[resolved] Can't delete Custom Post Types (13 posts)

  1. JayUK91
    Member
    Posted 8 months ago #

    Hi,

    Firstly - I've had this plugin for a while and it has always worked flawlessly on my installation, so thanks for your work.

    However, recently it will no-longer delete any of my custom post types.

    I just get this error when filtering to delete only custom post types: "Deleted 0 posts from the selected custom post type"

    Other filters seem to work fine, e.g. by post status.

    The only thing I have changed on my site is to keep this plugin up-to-date, and I have upgraded to WordPress 3.7.1

    I am using plugin version 4.2 an WP 3.7.1

    http://wordpress.org/plugins/bulk-delete/

  2. Sudar
    Member
    Plugin Author

    Posted 8 months ago #

    I have not tested the Plugin in WordPress 3.7.x yet. So not sure if any change in 3.7.x broke the plugin.

    Just give me time till next week (you know the reason for the delay ;) ) and I will fix it.

    Meanwhile let know what are the filters you are using and also your PHP version.

  3. Sudar
    Member
    Plugin Author

    Posted 8 months ago #

    I just tried to delete posts from custom post types in WordPress 3.7.1 and I am able to do it without any issues.

    Are you still facing this issue? If yes, can you give me the following details?

    • PHP version
    • List of filters that you choose.
  4. JayUK91
    Member
    Posted 8 months ago #

    Hi Sudar,

    Yes I'm still having this issue unfortunately.

    Plugin 4.2.1
    PHP version is 5.2.6
    WordPress 3.7.1

    Filters My typical deleting habits are as follows:
    Bulk Delete Posts > By Custom Post Types
    - [custom-post-type] - Published Posts
    - Only restrict to posts which are older than 30 days
    - Delete permanently
    - Delete now

    However, I have tried all variations of these filters (e.g. 'Move to Trash' rather than 'Delete') and still no luck.

    However, as I said if deleting 'By Post Status', for example, it works fine. It just seems to break when filtering involving my custom post types.

  5. Sudar
    Member
    Plugin Author

    Posted 8 months ago #

    I just tried again and it seems to work fine. But I am using PH 5.3.26. I am not sure if that could be an issue though.

    One stupid question. Are you sure you have posts which are older than 30 days to begin with?

    Also would it be possible for you to give me access to your server for debugging?

  6. JayUK91
    Member
    Posted 8 months ago #

    Hi, yes I have plenty of old posts. I have also tried varying the days to less and more but this makes no difference.

    It always used to work fine, so I can't see it being a PHP issue unless you've knowingly upgraded any deprecated code, right?

    To further test this I have now uninstalled the 4.2.1 version of your plugin, and installed version 3.5. And sure enough, Custom Post Types can now be deleted without a problem.

    Do you have any thoughts?

    I'm a little hesitant to give server/admin access as this is a live membership-based site. But if you deem it necessary I may be able to comply.

    Thank you for your help so far.

  7. Sudar
    Member
    Plugin Author

    Posted 8 months ago #

    I was going through the code diff between the different versions and the only feature that I have added was the ability to delete custom post types based on post status.

    I suspect there is some bug in that feature. Can you tell me the following details about your custom post type

    • How are you creating custom post types? By plugin or through code
    • What is the slug, singular label, plural label and name of the custom post type?
    • Have you enabled search and rewrite for the custom post type?
  8. JayUK91
    Member
    Posted 8 months ago #

    Hi,

    It's a custom made theme (made for me) with the custom field coded in. The way the theme has been built allows me to rename this custom field at any time, but at the minute the custom field name is "Listing" and the slug is "cars-for-sale". The custom fields can be searched from the frontend.

    Not sure if this helps at all, but it's as much information as I know.

  9. Sudar
    Member
    Plugin Author

    Posted 8 months ago #

    By custom field do you mean custom post type?

    I need to understand how the custom post type is setup for you to debug this issue. I understand that it may not be possible for you to give me access to your server. But can you share the source code of your theme?

    If you wish to contact me privately, then you can find my email address at http://sudarmuthu.com/contact

  10. JayUK91
    Member
    Posted 8 months ago #

    Apologies, yes Custom Post Type.

    I will email you when I get a moment.

    Thanks

  11. Sudar
    Member
    Plugin Author

    Posted 8 months ago #

    I think the hypen in the custom post type was the issue. I have released v4.2.2 of the plugin with a fix for this.

    Kindly try it and let me know if you are still facing this issue.

  12. JayUK91
    Member
    Posted 8 months ago #

    Hi Sudar,

    Looks like you've nailed it. I've installed the updated plugin, and everything seems to be working fine!

    I'll let you know if I stumble upon any errors in the future, but thank you so much. You're a credit to the WP community.

  13. Sudar
    Member
    Plugin Author

    Posted 8 months ago #

    Cool. Nice to know that this fixed the issue that you were facing.

    PS: <shamelessplug> I would really appreciate if you can leave a reivew for the plugin at http://wordpress.org/support/view/plugin-reviews/bulk-delete. It will allow more people to discover this plugin. Thanks.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.