Warning message after update + Show More results doubt

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Warning message after update + Show More results doubt

This topic contains 8 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years, 1 month ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #11924
    Federico
    Federico
    Participant

    Hello Ernest,
    I’m having some trouble after the update to ASP 4.10.
    Basically, it all works, but whenever I click on ‘Save all tabs!’, I receive these warning messages (with and without custom ajax handler):

    Warning: Cannot modify header information – headers already sent by (output started at /web/htdocs/www.XXX.it/home/wp-includes/script-loader.php:1328) in /web/htdocs/www.XXX./home/wp-content/plugins/ajax-search-pro/includes/classes/actions/class-asp-cookies.php on line 54

    Warning: Cannot modify header information – headers already sent by (output started at /web/htdocs/www.XXX.it/home/wp-includes/script-loader.php:1328) in /web/htdocs/www.XXX.it/home/wp-content/plugins/ajax-search-pro/includes/classes/actions/class-asp-cookies.php on line 55

    Warning: Cannot modify header information – headers already sent by (output started at /web/htdocs/www.XXX.it/home/wp-includes/script-loader.php:1328) in /web/htdocs/www.XXX.it/home/wp-content/plugins/ajax-search-pro/includes/classes/actions/class-asp-cookies.php on line 56

    ASP works and the changes are saved, but still the warning messages are kind of worrisome.
    In the last month the only thing I did was installing a SSL DV certificate, and everything went smoothly.

    Would you mind taking a look at it?

    I have another question. In the future I need to load a LOT of custom post types. Right now there are 2000 items, and since I want to display all of them on start (auto-populate), it’s obviously slow. Well, not obviously, but my host solution is very cheap and basic.
    The ideal solution would be to limit the load to something like 480 items, and enable the ‘Show ‘More results..’ option. I tried to enable it and all the conditions are met, but if I cut the limit to a small number (let’s say, 10), I don’t see the link ‘load more results’. I do believe it’s just a question of settings because I remember seeing it working in the past in the vertical layout, but now I don’t see anything with it either. I can’t seem to make it appear again!

    Sorry for the incovenience, and thank you, as always, for your precios support.

    #11925
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for notifying me about that.

    You can safely ignore these warnings, they are displaying most likely because another plugin or the theme tries to load up a script or stylesheet file when ajax search pro is clearing it’s cookies. It does no harm whatsoever, and the cookie clearing is only executed whenever a search instance is saved on the back-end, nowhere else.

    Nevertheless I will disable or move that part in the next hotfix release so the errors will go away. I sort of hoped that this error would not come up after the release, as I was not able to confirm if certain circumstances will cause it or not. Obviously it’s not going to work this way, as I hoped.

    About the pre-loading of items: I would highly advise not loading up hundreds of items at all, it sort of defeats the purpose of the plugin, but that is not the biggest issue. Displaying hundreds of images (and overall nodes) will lag most browsers and probably increase the memory usage as well. Even worse, the navigation/scroll scripts may malfunction at that many items – make the browser unresponsive. The show more results option is limited to 3 times the original limit set, so for 100 initial items you can only load 200 more, so that is probably what you are experiencing there.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #11931
    Federico
    Federico
    Participant

    Thank you for the reassurance.

    The images are not a problem: I disabled them along with all animations, since it’s a glossary, so it only shows the titles and it’s fast enough to show 48 items in a flash. And you were right: the “more results” link wouldn’t show because I inverted the limits.
    Now the link is visible (I set the results limits to 48, and 9999 on results page), but I have two problems (and something I don’t understand):

    1) The link won’t show on startup (auto-populate = more than 1000 items in the DB). It shows only when I use a dropdown menu to filter the posts or when I write something in the search box.
    If I filter with a dropdown menu (example: category = “Lemma generico”, more than 1000 items in the DB), the link shows 96 results (48 x 2).
    If I write something in the search box (example: “a” = more than 1000 items in DB), the link shows 1862 results (all results with “a”, I think), while I still would expect 96.

    2) More importantly: the link doesn’t work. If I click on it, nothing happens, although I set it up as “Show more ajax results”.

    The ideal behaviour would be: loading 48 results (an entire page of results, since I’m showing 4 colums with 12 rows each) while showing the option “more results (96)”, and the possibility to click on it multiple times to expand the research (and unlock the pagination with more than 48 items) in order to obtain fast queries even with thousands of items in the DB.

    #11936
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    It is indeed not working, I can confirm the same behavior on my test environment. It must be of the new prevention method not recognizing the auto populate correctly – therefore the more results link does not trigger.

    I will look into all of these in more detail and release a hotfix as soon as possible.

    Until then, I’ve made a temporary fix for the more results trigger, which you can place into the functions.php file in your theme directory:

    If no other major bugs will come up in the next couple of days, I will upload the hotfix release for approval, it should be out within 7 days, depending how fast the approval process is from codecanyon. This update took 5 days for them, I guess they got much busier lately.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #11940
    Federico
    Federico
    Participant

    Thank you very much. Now the link works.

    I still don’t understand why the ‘show more results’ acts this way (with, for example, results limit = 48):

    1) If I don’t type anything and just filter the results with a dropdown menu, even if there should be 1000+ results, it shows 48 results (correct) and the link “Show more results (96)”; if I click on it, it loads 96 more items and shows the link “Show more results (48)”; if I click on it one last time, it loads these last items and then the link stops appearing, even though there should still ben 1000+ results.

    So it only loads, in the end, 48 + (48 x 2) + (48 x 1) + stops working.

    2) If I type something (example “a” = 1000+ items), now it works just perfectly: it shows the first 48 items, and the link “Show more results (1862)” [= the correct number of items with the string “a”]; every time I click on it, it just loads 48 more items, and I can do this repeatedly as long and there are items.

    I just wanted to describe it in detail now that see how it works. Hope it helps.
    Thank you very much for your time and your fix! As for me, I’m not in a hurry, so there are no problems. I’ll wait patiently for the fix :).

    #12017
    Federico
    Federico
    Participant

    Hello Ernest,
    I just wanted to tell you that now, with the 4.10.1 update, everything works fine – the warning is gone -, and ask you if it’s possible to ‘hack’ the current “Show more results” multiplicator number, which by default seems to be 10x (example: for “result limit” = 10, “Show more results” = 90) to something else, in order to catch, if required, more or all items.
    And a big thank you: it’s rare nowadays to find such good and prompt customer support!

    Best,

    Federico

    #12030
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Federico,

    You are very welcome, I’m doing my best to make this plugin better every day.

    To access and change the remaining limit modifier, use this function:

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #12032
    Federico
    Federico
    Participant

    Thank you very much; thanks to your plugin, my project is now a complete success!

    #12038
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Warning message after update + Show More results doubt’ is closed to new replies.