• Resolved fitzgeraa

    (@fitzgeraa)


    Using v.7.1.5 with WP 5.3.2 and Genesis 3.3.0. I am getting php errors after exceeding 50 item keys in a single shortcode. I see mention in the code comments:

    // Multiple item keys
    // EVENTUAL TODO: Limited to 50 item keys at a time … can I get around this?
    // TODO: Test this with a bib that has 50+ items

    I assume the errors are known, but here they are:
    Warning: count(): Parameter must be an array or an object that implements Countable in /home/jazzdisc/public_html/aaa_jazzmf/wp/wp-content/plugins/zotpress/lib/shortcode/shortcode.functions.php on line 636

    Warning: array_push() expects parameter 1 to be array, null given in /home/jazzdisc/public_html/aaa_jazzmf/wp/wp-content/plugins/zotpress/lib/shortcode/shortcode.functions.php on line 637

    Simply getting the number under 50 fixes things, but my question is – what chance is there to see this limit removed?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Katie

    (@kseaborn)

    I think that’s using the “item” attribute, right? Is it possible to refer to a collection or tag?

    Thread Starter fitzgeraa

    (@fitzgeraa)

    Correct – was using “item” attribute. Tried using “tag” and this does permit bibliography greater than 50 items.

    Adjusting will involve a change of workflow and some manual tagging (I don’t think Zotero has a bulk tagging feature), but I guess this could suffice. Thanks for the tip.

    Plugin Author Katie

    (@kseaborn)

    Oh good. Yes, I’m sorry it’ll take work, and I don’t know the details of your situation, but in general I believe that this is the more stable and semantic way — to use tags or a collection. Items have to be referred to by their keys, which have no semantic data. (Same with collections, but there’s less to deal with and therefore easier to look up later if you need to.) If you delete and re-add an item, the key changes as well. And the shortcodes get very long. The good news is that you only have to change the shortcodes where you wanted to use more than 50 items (but maybe that’s a lot, hope not).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘50 item limit in shortcode’ is closed to new replies.