• Resolved flikweert

    (@corneflikweert)


    Since the update to version 1.6 my website has been broken. At the place where one specific piece of content has to be shown, all content is now shown.

    At every place where a piece of content is requested, all content from the editor is shown.

Viewing 7 replies - 1 through 7 (of 7 total)
  • kathyb

    (@kathybarber)

    Me too, I’ve temporarily rolled back to a previous version successfully. I really like this plugin so am hoping for an update or fix.

    ivorst

    (@ivorst)

    Same here. Rolling back to v1.5 fixed it for now…

    bucketpress

    (@bucketpress)

    Hey @ivorst @kathybarber @corneflikweert

    If you look at the changlog at https://www.ads-software.com/plugins/content-parts/#developers , you will see that the plugin now ‘Automatically output <div> blocks around content parts in the main content on single posts and pages. Disable via the content_parts_auto_content filter.’

    Prior versions didn’t have that. So we’ll need to add the following to our theme’s functions.php to solve your issues:

    add_filter( 'content_parts_auto_content', function($url){
    	return false;
    });
    Plugin Author Ben Huson

    (@husobj)

    Apologies for this.
    I hadn’t anticipated all the different way in which the Content Parts plugin may be being used.

    For now, please implement the fix above or rollback to a previous version.
    I will release an update removing this as default functionality and make it opt-in using the above filter to return true, or perhaps an option in the admin.

    My aim was to give a better default experience where users could just install it and style the new provided div structure. Apologies again for the issues this has caused.

    bucketpress

    (@bucketpress)

    @husobj

    I think implementing the auto divs is a good idea, but it should be limited to only when the_content() is called. i.e when users have no need to use the plugin’s custom template tags such as the_content_parts(). This is useful for users who have no need to format or retrieve specific parts. So this makes the plugin work out of the box for users who don’t want to edit their theme’s templates.

    However, when using the plugin’s template tags such as the_content_parts(), we should revert back to what it was prior ver 1.6 .

    Plugin Author Ben Huson

    (@husobj)

    @bucketpress

    I have just released a 1.7 version which rolls back to previous behaviour and adds a settings page where auto formatting can be activated per post type. I think this is probably safer than blanket enabling for everyone as the extra div structure could cause issues with some themes.

    Autoformatting can also be enabled/disabled via the content_parts_auto_format_post_types filter which should contain a list of post types for which auto formatting is active. Add extra post types to this array, or remove them using the filter at a later priority.

    I agree with your idea above that auto formatting should only affect the_content() as if you’ve used the custom tags it is likely because you want more control. I’ll check if anything further needs changing to address that.

    @husobj

    Nice work. Working good now!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘1.6 update – breaks website’ is closed to new replies.