• Resolved philology

    (@philology)


    I’ve just begun creating a WordPress blog and using Zotpress. I have a sidebar text widget that I use to display a short annotated bibliography, and Zotpress works there as expected (I use the simple zotpress shortcode, e.g., [zotpress item=”TSKXG3SX”]).

    In writing my first post, however, I’m running into a problem. I use the zotpressInText shortcode (e.g., [zotpressInText item=”{TSKXG3SX,10-11}”]) and the
    [zotpressInTextBib] shortcode at the bottom. The in-text item shows up as “(,,10-11) and the bibliography shows up as the spinning wheel. If I replace the zotpressInText shortcode with a simple zotpress shortcode, the citation appears both in the block and in the sidebar, but doubled up in each.

    I’m using WordPress 5.0.3, and I’ve tried with both the new and the classic editor.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter philology

    (@philology)

    I have a partial resolution to my problem.

    I decided to eliminate one possible cause of the issue, and I removed the [zotpress] shortcodes from the two sidebar text widgets (they weren’t really needed, and I could easily replace them with text). The [zotpressInText] and [zotpressInTextBib] shortcodes now work in post paragraph blocks, but they do not work if the [zotpressInText] shortcode is in a quote block.

    Thread Starter philology

    (@philology)

    The one problem that I continue to have is that I can’t get the [zotpressInTextBib] shortcode to work when the item includes page numbers. [zotpressInText item=”{TSKXG3SX}”] displays as expected, but [zotpressInText item=”{TSKXG3SX,10-11}”] displays the in-text citation as “(,,10-11)” and the bibliography as a spinning wheel.

    Thread Starter philology

    (@philology)

    I see the following exception when I include page numbers:
    Uncaught TypeError: Cannot read property ‘num’ of undefined
    at Object.<anonymous> (zotpress.shortcode.intext.min.js?ver=5.0.3:97)
    at Function.each (jquery.js?ver=1.12.4:2)
    at zp_format_intextbib (zotpress.shortcode.intext.min.js?ver=5.0.3:93)
    at Object.success (zotpress.shortcode.intext.min.js?ver=5.0.3:16)
    at i (jquery.js?ver=1.12.4:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
    at y (jquery.js?ver=1.12.4:4)
    at XMLHttpRequest.c (jquery.js?ver=1.12.4:4)

    Thread Starter philology

    (@philology)

    Using the JavaScript debugger that is built into Chrome, I’ve determined that the exception occurs on line 386:
    tempItem += ” data-zp-author-year='” + tempAuthor + “-” + tempItemYear + “‘ class=’zp-Entry zpSearchResultsItem zp-Num-” + window.zpIntextCitations[“post-” + zpPostID][item.key].num;

    The item.key is for a different item than the one in the [zotpressInText] shortcode. I’ll try to do further debugging tomorrow.

    Thread Starter philology

    (@philology)

    This appears to be a problem only with posts that have exactly one citation and that citation specifies page numbers. I’ll create a new topic for that specific situation when I’ve gathered more diagnostic data about what is happening.

    Plugin Author Katie

    (@kseaborn)

    Thanks for trouble-shooting. I’ll see what I can find on my end. Just to make sure our environments match, can you send your Zotpress API information and shortcodes to me? And are you using Gutenberg? https://katieseaborn.com/contact

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Zotpress works in text widget, not in post block’ is closed to new replies.