WordPress.org

Ready to get started?Download WordPress

Forums

SendPress Newsletters
[resolved] "Create Email" page garbled after installation of Zotpress (8 posts)

  1. jpod
    Member
    Posted 6 months ago #

    Thanks for SendPress, it's really useful. However, after I installed Zotpress, I noticed that Zotpress apparently tries to add its 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 SendPress and Zotpress, 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/sendpress/

  2. itdoug
    Member
    Plugin Author

    Posted 6 months ago #

    It sounds like they are conflicting with us if it shows up on our page. There may not be much we can do if they are showing stuff they shouldn't on our create email page

    I'll get someone to take a look but this won't be a super high priority at the moment given some other features we are working on. I would also recommend contacting Zotpress in their forums.

  3. itdoug
    Member
    Plugin Author

    Posted 6 months ago #

  4. jpod
    Member
    Posted 6 months ago #

    Thanks for looking into it, I understand that this isn't high priority. I also informed Zotpress about the bug, but the Zotpress author hasn't replied yet.

    See:
    http://wordpress.org/support/topic/zotpress-garbles-admin-pages-of-sendpress

    As for who needs to fix what, I’m looking through the code right now, Zotpress uses the following to add its citation features to the posts and pages editors:

    /* Adds a box to the main column on the Post and Page edit screens */
        function Zotpress_add_meta_box()
        {
            $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 doesn't seem fishy to me (I'm no WordPress expert though). Did you add a post-type for e-mails?

  5. jpod
    Member
    Posted 6 months ago #

    You did! I think I can see what's going on now. Zotpress makes certain assumptions about how pages that are used to create/edit new posts of any registered post type should look and these assumption do not apply to your "Create Email" page.

    My solution is simply to add a line if ( in_array ( $post_type, array ( 'sp_newsletters', 'sp_report', 'sptemplates', 'sendpress_list' ) ) ) continue; to the for loop I’ve posted above. I am not fluent enough in WordPress to know who should fix their plugin, but it seems to me it's easier for ZotPress to do this and I’ll post in on their forums. Thanks a lot for the reply and sorry for asking before having a more through look at the code; but I needed a break and just couldn’t parse it back then.

  6. Josh Lyford
    Member
    Plugin Author

    Posted 6 months ago #

    Hi jpod,

    i have added a remove action that will run only on SendPress admin pages. It will be in the next release this should take care of the conflict. The added coded is below.

    remove_action('admin_init', 'Zotpress_add_meta_box', 1);

  7. jpod
    Member
    Posted 6 months ago #

    Thanks a lot! Much simpler than my solution. And it's good to know that things will not stop working after the next upgrade :-).

  8. jpod
    Member
    Posted 6 months ago #

    Oops, forgot to mark as solved.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.