• Resolved drkevinsullivan

    (@drkevinsullivan)


    It appears that I have sync to group library working. There’s one remaining problem, though. When I browse to Admin>Zotpress>Browse, I get a page at the top of which is what appears to be a status indicator that just says “Loading …” Moreover, when I render my library on a page, I get that same item. I don’t know what’s even meant to be displayed there, and I’m not even 100% sure there’s something wrong, though I looks like it. Can you explain? And thank you for your attention. It’s much appreciated.

    Admin > Zotpress > Browse > [Top Level] [Loading …]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter drkevinsullivan

    (@drkevinsullivan)

    Looks like this is the relevant code. Weird that “Loading …” doesn’t appear as a string anywhere in the code base (I’m looking on GitHub.) I guess the message is rendered as an image! In any case, it looks like the box is meant to list selectable tags (and the first box to list selectable collections). I have no collections defined and only one tag. Is that the problem … that what I’m seeing is the contents of the list as initialized and never overwritten because, for some reason, the system isn’t finding any tags (even tho I have defined at least one)?

    <div id=”zp-Browse-Tags”>
    <label for=”zp-List-Tags”><span>Tags</span></label>
    <select id=”zp-List-Tags” name=”zp-List-Tags”<?php if ( $tag_id ) { ?> class=”active”<?php } ?>>
    <?php if ( !$tag_id ) { ?><option id=”zp-List-Tags-Select” name=”zp-List-Tags-Select”>No tag selected</option><?php } ?>
    <?php

    //$zp_tags = get_terms( ‘zp_tags’, array( ‘hide_empty’ => false ) );
    $zp_tags = $wpdb->get_results(“SELECT * FROM “.$wpdb->prefix.”zotpress_zoteroTags WHERE api_user_id='”.$api_user_id.”‘ ORDER BY title ASC”, OBJECT);

    foreach ( $zp_tags as $zp_tag )
    {
    //if ( get_option( ‘zp_tag-‘.$zp_tag->term_id.’-api_user_id’ ) != $account_id ) continue;

    echo “<option class=’zp-List-Tag’ rel='”.$zp_tag->id.”‘”;
    if ( $tag_id == $zp_tag->id ) echo ” selected=’selected'”;
    echo “>”.$zp_tag->title.” (“.$zp_tag->numItems.”)”;
    echo “</option>\n”;
    }

    ?>
    </select>
    </div>

    Thread Starter drkevinsullivan

    (@drkevinsullivan)

    Ok, indeed, the problem is that the logic broken when there are no collections / tags yet defined. It was sufficient (not sure if it was entirely necessary) to define at least one collection and one tag. The suggested fix is to detect situations (in the code I quoted) where the collection set or tag set is empty, and then replace “Loading …” with text that indicates “No tags yet defined” or “No collections yet defined” or something like that. Otherwise it’s super-confusing for someone just starting out with this software. The documentation, as far as I can tell, isn’t enough, you gotta read the code to see where the program is going wrong (at least as far as useful messaging is concerned).

    Thread Starter drkevinsullivan

    (@drkevinsullivan)

    Resolved (without fix)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Loading …’ is closed to new replies.