Exclude posts (or cpt, attachments, comments) by categories/taxonomy terms

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Exclude posts (or cpt, attachments, comments) by categories/taxonomy terms

This topic contains 5 replies, has 2 voices, and was last updated by NaturesLens NaturesLens 5 years, 4 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20172
    NaturesLens
    NaturesLens
    Participant

    Exclude posts (or cpt, attachments, comments) by categories/taxonomy terms

    No longer saving excluded term – we used to have past events as a term saved for exclusion – the UI no longer saves this properly – meaning all our past events are showing search results

    #20188
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Thank you for the details, it helps me a lot.

    I was able to figure out, that the issue might be related to a server configuration, but I am not sure yet. There is a server limit for how many inputs can be passed during a request. As you know, the plugin has lots of options, and in some rare cases they exceed the server defined limit. There is a bypass method implemented to resolve this issue, but in this case it does not seem to work as it should, and I don’t know why though.
    I see three possible ways of resolving this:

    1. To increase the server limit of the input vars, by changing this line in your server php.ini file:

    max_input_vars=500

    to:

    max_input_vars=3000

    After the change, the php or apache service needs to be restarted (or the server).

    2. Adding this to the wp-config.php file to try to change it on the run:

    ini_set('max_input_vars', 3000);

    This method works sometimes, other times it doesn’t. Worth a try.

    3. You can add temporary FTP details if none of the above does the trick, and I will try to debug why the bypass method does not work.

    Let me know!

    ——
    PS.: I have noticed a text ‘blur’ issue on the login screen. Check this screenshot. It is not a bit deal, but in case you want to fix that, you can use this custom CSS code:

    @media screen and (min-width: 850px)
    div.lg-x50.lg-y50 {
        -ms-transform: translate(-50%,-50%) !important;
        transform: translate(calc(-50% + 0.5px),calc(-50% + 0.5px)) !important;
    }

    It happens due to the percentage transform property. This custom CSS will add a 0.5 pixel shift to it, so the blurryness should disappear. For me it looks like this:
    Before
    After
    I hope this helps.

    Best,
    Ernest Marcinko

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


    #20344
    NaturesLens
    NaturesLens
    Participant
    You cannot access this content.
    #20345
    NaturesLens
    NaturesLens
    Participant
    You cannot access this content.
    #20357
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you very much, this helped me a lot. This took me a while to figure out, but I managed to solve it. Turns out a certain PHP core function (parse_str) is also limited by the input variable limit. This is an issue, as it is not even documented in the PHP documentation.
    I had to search for an alternative parse_str implementation, luckily other people had this issue before, and there was a solution. I have implemented an additional code section to resolve this.

    I will of course inlcude this in the upcoming release. Hopefully everything should be saved correctly now.

    I still highly recommend increasing the max_input_vars limit to above 1000, as other plugins may use more than 500 variables easily, and it is not easy to bypass that limit otherwise.

    Best,
    Ernest Marcinko

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


    #20361
    NaturesLens
    NaturesLens
    Participant

    Thanks Ernst – you are a rockstar!

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

You must be logged in to reply to this topic.