• Resolved jpod

    (@jpod)


    Thanks for Zotpress, it’s really useful. However, when I use Zotpress together with SendPress, then Zotpress apparently tries to add citation features to the “Create Email” page of SendPress, garbling the page as a consequence (see this screenshot). I deactivated all other plugins, save for Zotpress and SendPress, but the problem persists. I had a (very) brief look at the code, but could not discern what/which plugin causes the problem. Could you have a look at it? Thanks a lot!

    https://wordpress.org/plugins/zotpress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jpod

    (@jpod)

    I figured out what is/was going wrong and how to fix it, and it may point to a more general problem.

    Zotpress uses the function Zotpress_add_meta_box() (line 93 in zotpress.php) to add its citation features to all registed post types, the relevant loop being:

    $post_types=get_post_types('','names');
    
    foreach ($post_types as $post_type )
    {
    	add_meta_box(
    		'ZotpressMetaBox',
    		__( 'Zotpress Reference', 'Zotpress_textdomain' ),
    		'Zotpress_show_meta_box',
     		$post_type,
    		'side'
     	);
    }

    That is, Zotpress appears to assume that the lay-out of all pages that are used to edit or create posts of a registered post type is more or less the same. However, SendPress does not satisfy that assumption, and there maybe be more plugins or themes out there that don’t.

    I don’t know whether there is a standard on how pages that are used to create or edit posts of a registed type in WordPress should look. Maybe you could considerer limiting the above loop to “safe” post types or give users the option to select the post types for which they want to use Zotpress?

    I, for the time being, solved my problem by adding the follwoing line to the beginning of the above loop (“sp_newsletters”, “sp_report”, “sptemplates”, and “sendpress_list” are the post types registed by SendPress):

    if ( in_array ( $post_type, array ( 'sp_newsletters', 'sp_report', 'sptemplates', 'sendpress_list' ) ) ) continue;

    That said, it would be great if that fix wouldn’t be gone with the next update. Could you include something along these lines in the next version? Thanks a lot! Sorry that I didn’t figure that out myself earlier on, but I needed a break.

    See also: http://wordpress.org/support/topic/create-email-page-garbled-after-installation-of-zotpress

    Plugin Author Katie

    (@kseaborn)

    Great catch! I’m sorry about this issue and really appreciate your solution.

    Thread Starter jpod

    (@jpod)

    Thanks for fixing it :).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Zotpress garbles admin pages of SendPress’ is closed to new replies.