Remove Google Fonts and Can't Save Settings

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Remove Google Fonts and Can't Save Settings

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10402
    Daman Mehta
    Daman Mehta
    Participant

    Hi,

    Due to the NDA signed for a client. I can’t share my original site.
    But i have these issues, even on a new fresh installs.

    1). I can’t save any settings.
    If you go to: Autocomplete & Suggestions < Autocomplete
    Turn the options to Off and Save.
    You will see they don’t turn off at all.

    2). Somewhere plugin hooks google fonts in header.
    —————————————
    <link href=’//fonts.googleapis.com/css?family=Lato:300|Lato:400|Lato:700′ rel=’stylesheet’ type=’text/css’>
    <link href=’//fonts.googleapis.com/css?family=Open+Sans:300|Open+Sans:400|Open+Sans:700′ rel=’stylesheet’ type=’text/css’>
    ——————————————

    Is there any way i can remove these? They aren’t loaded in the right way and puts a load on server. You can see this in google page speeds.

    Or if atleast you can tell me, which PHP files hooks these to header. I can remove them from core files of plugin by my self.

    Thanks,
    Daman

    #10403
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    1. POST method limit problem

    Interestingly, the values are saved to a certain point. Until the Frontend search settings -> Date filters, all values are saved, that means that the variables beyond that point are unset or never sent.
    I was suspecting that the post data might be trimmed by a misconfiguration in the php.ini file, but there was no FTP data included in your ticket, so I had to install the PHP Settings plugin to check my theory.

    I was correct, the

    max_input_vars

    php configuration variable is set to 180, which is extremely low: https://i.imgur.com/t9JtGer.png

    This means that it’s not possible to send more that 180 variables over a post request. I highly suggest changing this option to 3000 or even 5000, as many plugins tend to send a decent amount of variables when saving options.

    I have left the PHP settings plugin active so you can check this otpion again after changing the php.ini file, I hope you don’t mind.

    2. Google fonts removal

    The easiest way is to just put this code to the functions.php file in your active theme directory:

    add_filter('asp_custom_fonts', 'asp_null_css');
    function asp_null_css($css_arr) {
        return array();
    }

    I hope this helps!

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.