Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thank goodness that somebody else is having this issue. I have spent days trying to figure out what is going on and have failed.
    I am using WordPress 4.0
    I have a clients site that had 736 items in the media library. I uploaded 78 images. I then get a message from the client that they cannot see all the images in grid view.
    Looking in Chrome dev tools-> network I can see that admin-ajax.js is constanly making a request for second page of results.
    Each call to admin-ajax returns 40 items, mine is stuck on the second page.
    I counted the items showing and there are only 79 showing. So, as each call should return 40 items, I manually checked the json array returned by the first admin-ajax call and the second one (which is forever repeating). The second call returned an item in the array that was in the first. I am not sure if this is supposed to happen or if this is what is causing this problem.
    I have no plugins and have tried it on TwentyForteen also.
    I cannot seem to pin down what causes the issue, I have done a clean install on localhost and server but cannot pin down consistently why it happens.

    I have used the below code to give me the sub categories of selected categories.
    You add the following code twice:

    $subcats = get_categories('hierarchical=1&hide_empty=0&child_of='.$term_id);
    foreach ($subcats as $subcat)    {
      $this->cat_list .= ($subcat->cat_ID . ',');
    }

    on the next lines after:

    $this->cat_list .= $term_id . ',';

    which are originaly at line numbers 409 and 428.
    So you should have the following code twice:

    $this->cat_list .= $term_id . ',';
    $subcats = get_categories('hierarchical=1&hide_empty=0&child_of='.$term_id);
    foreach ($subcats as $subcat)    {
      $this->cat_list .= ($subcat->cat_ID . ',');
    }

    The extra lines of code obtain the sub categories of the category ($term_id) that the user can view.

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