[Resolved] Query Loop

Home Forums Support [Resolved] Query Loop

Home Forums Support Query Loop

  • This topic has 17 replies, 4 voices, and was last updated 2 months ago by David.
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #2244035
    Anders Nielsen

    Hi there

    1. Any way I can have grid with 4 columns of the query loop (default only 2 is there in the template)?

    2. Also when I open to edit the content, the query loop always says “no posts found” – but there are post… and they are also displayed on the frontend.?

    3. When setting the show excerpt dynamic text less than 30 characters – it just displays the full excerpt text.?

    This is my site: Angst.dk

    #2244320
    Ying
    Staff
    Customer Support

    1. If you select the Container block under Grid, you can set its width to 25%which means 4 columns.

    2. Can you take a screenshot of the entire page editor when the msg shows? Please include the query loop settings in the screenshots?

    3. I can’t replicate this issue on my end, can we see an example?

    #2244364
    Anders Nielsen

    Created a video for 2-3 in the private section

    This is my site: Angst.dk

    #2244387
    Ying
    Staff
    Customer Support

    So according to your video, NO.2 seem working now. I think it’s because when you set the post number to 500, the overview runs overtime, then return a no result in preview.

    For NO.3, can you try using Headline block, then enable its dynamic data?
    If this doesn’t work, can you link us to the static page with query loop block and one of your post that the word count is not correct?

    #2244439
    Anders Nielsen

    No I don’t agree that nr. 2 is working now. You can set the number to 20 or 5 and it “might” work. You can reload the page at 10 pages – and you can get the error.

    I have 3 posts, so setting the number to 500 should not cause any delay in loading!

    No 3 – there is also a bug.. I can try the workaround, but the bug is there! (what more do you need than the video?)

    There are two bugs in number 3…

    1. you can’t set the number “1” – if you are slow writing “19” it will fail.

    2. the block stops loads the whole excerpt when numbers are below 30 (in my setup)

    This is my site: Angst.dk

    #2244521
    Fernando
    Customer Support

    Hi Anders,

    2. Similar to Ying, I also can’t seem to replicate the issue: https://share.getcloudapp.com/12uLEopA

    Does this occur almost everytime you set it to 500 or any value? Can you try changing it to small values like 1,2,3,4 and 5 repetitively to see if the issue will exist there as well? Curently, I’m thinking perhaps it’s just the backend failing to contact your server at the time of your change which is instantaneously?

    3. In Appearance > Customize > Layout > Blog, what value do you have set in the excerpt word count? If you try to set it to a higher value like 100, does the excerpt count in the Query Loop Block work better? Currently, it seems that it may be affecting the Query Loop Block count which may be a bug, but I’ll have to let the team know.

    Hope to hear from you soon, and thank you for reporting this!

    #2244625
    Anders Nielsen

    Does this occur almost everytime you set it to 500 or any value?

    any value

    Can you try changing it to small values like 1,2,3,4 and 5 repetitively to see if the issue will exist there as well?

    Yes, sometimes it’s there

    I’m thinking perhaps it’s just the backend failing to contact your server at the time of your change which is instantaneously?

    I don’t have any issues likes that in my setup

    3. In Appearance > Customize > Layout > Blog, what value do you have set in the excerpt word count?

    55

    If you try to set it to a higher value like 100, does the excerpt count in the Query Loop Block work better?

    no

    Currently, it seems that it may be affecting the Query Loop Block count which may be a bug, but I’ll have to let the team know.

    I think there are more than one bug here

    This is my site: Angst.dk

    #2244758
    David
    Staff
    Customer Support

    Hi there,

    #2 regarding the Posts per Page can we get a temporary admin access login to see whats going on ?

    #3 The Dynamic Content block is a GP Specific block built for Block Element – Content Templates. It was not designed for use inside a Query Loop. In the future it will be deprecated in place of the GB 1.5 Headline blocks dynamic data. So, if you want to add an Excerpt inside Query Loops then please use the Headline Block and its dynamic data options.

    #2244779
    Anders Nielsen

    #2 see private section
    #3 ok, makes sense then

    This is my site: Angst.dk

    #2244792
    David
    Staff
    Customer Support

    So the wp-json response to the post query of 500 posts per page is throwing a 400 error:

    2022-06-06_11-25-35

    And thats because the WordPress REST API has a hard limit of 100 posts.
    That error will appear if the value is over 100

    It kinda makes sense that we add a limit of 100 to that field because if this limitation.
    Do you ever see the need to have a greater value then this ?

    #2244803
    Anders Nielsen

    Yes, this category-page will have around 550 blogpost listet (only titles shown – no images etc.)

    So that is bad for my site architecture – if only 100 is possible.

    See page in private section

    This is my site: Angst.dk

    #2244808
    David
    Staff
    Customer Support

    WP added that 100 post limit as it can severely harm site performance.
    But i found this snippet:

    function increase_per_page_max($params){
        $params['per_page']['maximum'] = 600;
        return $params;
    }
    
    add_filter('rest_post_collection_params', 'increase_per_page_max');

    Which will increase that limit to 500 or whatever you set it.
    You can try that adding that, and inspect the your site to see if an error is returned when you set the Post per Page to 500.

    #2244935
    Anders Nielsen

    ok, can i add more Query Loops – so the limits still are set to 100

    so 5 Query Loops containers = 500 posts.

    Thanks for the snippet

    This is my site: Angst.dk

    #2244938
    David
    Staff
    Customer Support

    Yes, you can use multiple Query Loops on a single page.

    #2244940
    Anders Nielsen

    Ok, I think that will be the solution then.

    Thanks.

    This is my site: Angst.dk

Viewing 15 posts - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.