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?
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.
Ok, thanks C.E.! I forwarded this to the developer of Zotpress and hope she can make the necessary changes.
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.