WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
[resolved] Plugin disables Featured Image box (6 posts)

  1. John Gardner
    Member
    Posted 3 years ago #

    Hi, I'm having a problem with the plugin that I don't know how to fix. When I activate Meteor slides v1.2.2 (with Debug on), I get the following message: The plugin generated 163 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    The reason I had to turn debug on because after activating Meteor Slides, the "featured image" meta box was no longer showing up on any other content type (Posts, Pages or even 2 I had created - Feature Boxes and Testimonials) other than Content Type "Slides". As soon as I deactivate the plugin, the Featured Image meta box returned.

    Also, while the plugin is activated, this text displays at the top of all screens in the admin section: Notice: Undefined index: post_type in /hsphere/local/home/custombuilt/dev2.custombuiltri.com/wp-content/plugins/meteor-slides/meteor-slides-plugin.php on line 366

    http://wordpress.org/extend/plugins/meteor-slides/

  2. Josh Leuze
    Member
    Plugin Author

    Posted 3 years ago #

    Hi jgardner, thanks for reporting this bug!

    Meteor Slides is set up add the featured image meta box to the slides post type without affecting other post types, but obviously this isn't working as it should!

    You said the Feature Boxes and Testimonials post types are your own custom additions? Are they added to your theme, or as plugins? Could you share the code for these post types so I can test this bug?

    Oh, and what theme are you using?

  3. John Gardner
    Member
    Posted 3 years ago #

    After doing some more testing, I may have jumped the gun a little. While no matter the theme I get the initial notice upon activation, it only appears to drop the featured image meta box on my theme (a child theme I wrote for Genesis) and on my custom post types. Perhaps some other change I made caused it to drop featured image on everything else and somehow I fixed it (luck, I would imagine).

    I created and registered the post types myself by mostly following a tut here/.

    There's about 200 lines of code for my 2 post types contained in 1 file. I've zipped it up and you can download it from here

  4. Josh Leuze
    Member
    Plugin Author

    Posted 3 years ago #

    I hadn't run this plugin in debug mode recently. None of the notices should affect the performance of the plugin in any way. I'll make sure those are fixed in the next version just in case. :)

    Thanks for sharing your code. I took a look at it, everything seems fine with your custom post types, but I doesn't look like you have added theme support for post thumbnails?

    Maybe you have them activated in your theme's functions.php in the default format:

    add_theme_support( 'post-thumbnails');

    Technically I think that activates for posts and pages, but in most cases works for other post types as well. But in most of the documentation that I have read, it shos to specify support for your custom post types, like this:

    add_theme_support( 'post-thumbnails', array( 'feature-boxes','testimonials' ) );

    That will work with Meteor Slides just fine, it will add "slides" to that array.

    Oh if you you want it on pages and posts as well, you'd have to add that to the array:

    add_theme_support( 'post-thumbnails', array( 'feature-boxes','testimonials','post','page' ) );

    I think this would be the correct way to do it, but it's always a bit murky deciding how these custom post types should coexist. You can read this thread if you want to see how I came to set up my plugin like this, maybe you have a better idea!

  5. John Gardner
    Member
    Posted 3 years ago #

    Thanks for the reply. Your idea worked perfectly. I never knew post-thumbnails had to be explicitly added for custom post types. I incorrectly assumed adding support for the thumbnail would add it for all types. Thank you very much for the education.

    Once I added add_theme_support( 'post-thumbnails', array( 'feature-boxes','testimonials' ) );, everything's working.

  6. Josh Leuze
    Member
    Plugin Author

    Posted 3 years ago #

    No problem, the post thumbnail documentation is kind of slim at the moment! Glad that worked for you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic