All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

{absolute_results} shows limit

Paul Stolk 5 Feb 2013 09:11 question, complete

Hi,

When i use the following:
{if count == 1}

{if low_search_keywords}Searched for {low_search_keywords}.{/if}
Total results: {absolute_results}.


{/if}
The absolute_results gives me the number I filled in, in the limit paramater.

I have just updated EE to 2.5.5. Also i am using low search 2.1.2

Also i receive the following error:
Severity: Warning

Message: htmlspecialchars() expects parameter 1 to be string, array given

Filename: helpers/low_search_helper.php

Line Number: 270
A PHP Error was encountered

Severity: Warning

Message: htmlspecialchars() expects parameter 1 to be string, array given

Filename: helpers/low_search_helper.php

Line Number: 270

Replies

  1. Low 5 Feb 2013 09:20

    The absolute_results thing could be a caching issue. Try flushing the cache and search again. Also, that var is generated by EE's native channel:entries module, so I have control over how it's parsed...

    About the errors -- what is the search form you're using?

  2. Paul Stolk 5 Feb 2013 09:24

    I cleared the cache, etc, but the absolute count stays equal to the number in the limit paramater unless the absolute count is lower then the limit.

    regarding the form, see below the code I am using:
    (I have used space so you can see the code..)
    {exp:low_search:form collection="aanbiedingen" search_mode="all" result_page="zoeken/aanbiedingen" form_class="search_on_top" {if segment_2 == "aanbiedingen"} query="{segment_3}"{/if} {if segment_2 == "aanbieding_detail"} query="{segment_4}"{/if}}
    < fieldset >
    {if keywords}
    < input type="text" name="keywords" id="keywords" onfocus="if (this.value == '{keywords} ') {this.value = '';}" onsubmit="if (this.value == '{keywords} ') {this.value = '';}" onBlur="if (this.value == '') {this.value = '{keywords} ';}" value="{keywords} " />

    {if:else}

    < input type="text" name="keywords" id="keywords" onfocus="if (this.value == 'Vind een aanbieding...') {this.value = '';}" onsubmit="if (this.value == 'Vind een aanbieding...') {this.value = '';}" onBlur="if (this.value == '') {this.value = 'Vind een aanbieding...';}" value="Vind een aanbieding..." />
    {/if}
    < button type="submit" >< /button >
    < /fieldset >
    {/exp:low_search:form}

  3. Low 5 Feb 2013 09:36

    Any chance I can take a look myself? You can send superadmin login credentials to hi at gotolow dot com.

  4. Paul Stolk 5 Feb 2013 09:40

    Send them.

  5. Paul Stolk 5 Feb 2013 09:54

    Just found out that the {absolute_results} and the {total_results} gives me back the same number..

  6. Low 5 Feb 2013 10:00

    {total_results} should give you the total amount of entries on the page, generated by the tag.

    {absolute_results} should give you the absolute total number of results that are returned by the tag, regardless of pagination.

  7. Paul Stolk 5 Feb 2013 10:02

    It should, but it doesn't.. Can't find out why..

  8. Paul Stolk 5 Feb 2013 10:10

    Just found more information: In the channel parameter i have disabled the pagination.

    When enabling this(and also placing the pagination tag), the 2 tags work how they supposed to be..

  9. Low 5 Feb 2013 10:13

    Ah right, that's indeed it. I knew I'd seen this before somewhere. Making a mental note.

    Still looking into the php error.

  10. Low 5 Feb 2013 10:45

    As emailed, have you recently upgraded to Low Search 2.1+?

  11. Low 5 Feb 2013 10:47

    Ah, you did. :)

    The error should not occur anymore. It was an old URL that caused it. Not very nice, I admit, and I'll look into fixing that for better backward compatibility.

    For now, you should be good to go. And install LS 2.2.0, which I'm about to release today.