• Resolved johannes27

    (@johannes27)


    Hi

    When I activate the Mathematica Toolbox plugin all my Zotpress reference lists get a long empty space on top (80 blank lines or so). This also occurred with the previous WordPress version. I deactivated all other plugins and changed my site’s theme, but the Mathematica Toolbox seems to be the only cause. I also contacted the developer of Zotpress about this issue.

    I hope this can be resolved soon, as I want to use both plugins.

    Cheers
    Johannes

    https://wordpress.org/plugins/mathematica-toolbox/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author C. E.

    (@c-e-1)

    For someone like me who hasn’t used Zotpress before, what are the minimum steps, after installing the Zotpress plugin, to reproduce the problem?

    Thread Starter johannes27

    (@johannes27)

    Thank you for the quick reply!

    The following steps should be sufficient:

    1. Install and activate Zotpress and Mathematica Toolbox
    2. create a page with any content (or none) and use any Zotpress shortcode for a bibliography, e.g. [zotpress sortby=”date”]

    You will have to get a public Zotero group and connect Zotpress to it.
    https://www.zotero.org/groups

    I hope this helps.

    Plugin Author C. E.

    (@c-e-1)

    I have reproduced the problem and concluded that it happens because of lines 118 to 120 in the current release of mathematica-toolbox/includes/Mathematica-WP-Toolbox-loader.php:

    remove_filter( 'the_content', 'wpautop' );
    		add_filter( 'the_content', 'wpautop' , 99);
    		add_filter( 'the_content', 'shortcode_unautop',100 );

    Specifically the first two lines, which change the priority of the wpautop filter. This is a commonly used trick to make sure that the wpautop filter does not affect text inside shortcodes, which in the case of Mathematica Toolbox is needed to prevent WordPress from messing with Wolfram Language code.

    Zotpress apparently rely on this filter to work inside shortcodes, that’s why it fails when it’s used in conjunction with Mathematica Toolbox. Since I need to use this trick I will not make any changes to the plugin, but if you want to you can remove the lines above, although it will probably also affect highlighting of Wolfram Language code.

    Perhaps Zotpress can do something about this. There is no need to rely on WordPress filters to format programmatically generated content they way they are.

    Thread Starter johannes27

    (@johannes27)

    Ok, thanks C.E.! I forwarded this to the developer of Zotpress and hope she can make the necessary changes.

    Thread Starter johannes27

    (@johannes27)

    Your workaround works for now. Thanks!

    • This reply was modified 6 years, 10 months ago by johannes27.
    • This reply was modified 6 years, 10 months ago by johannes27.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Incompatibility with Zotpress’ is closed to new replies.