• Resolved GoldHatTrick

    (@goldhattrick)


    Recently updated themify-base on my test site & it returned a fatal error undefined function themify_https_esc() at line 677.

    Just to let others know that I fixed this by changing the function called

    themify_https_esc() to themify_base_https_esc()

    in the relevant php file (where the error message said the undefined function was in).

    Other than losing some customization (some fonts reverted back to default), this seems to work.

    Correcting the fonts via the customizer still worked.

    I don’t know if this is a permenant fix or not. I’ve kept the previous version backed-up & won’t be updating my live site until I’m sure.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thanks for sharing, I was panicking after I thought that I lost everything. Which php file was this in? I’ve gone through all of mine to no avail. Here is the error message that I received:

    Fatal error: Call to undefined function themify_https_esc() in /home/content/there were some numbers listed here which i’ve removed for privacyhtml/wp-content/themes/themify-base/themify/customizer/class-themify-customizer.php on line 677

    I don’t know much coding, so I would appreciate any input you might have.

    Thread Starter GoldHatTrick

    (@goldhattrick)

    Based on the error message, it should be in the class-themify-customizer.php file which would be in the customizer folder in the themify folder in the themify-base folder which would be in the themes folder which would be in the wp-content folder, etc.

    Follow the entire folder path of the error message to find it.

    About 2/3’s of the way in the file on line 677, there is a “Build a CSS rule” to edit.

    The typo is here:
    function build_css_rule( $selector, $style, $mod_name, $prefix = ”, $suffix = ” ) {
    $mod = $this->get_cached_mod( $mod_name );
    $out = ”;
    if ( ! empty( $mod ) ) {
    if ( ‘font’ == $style || ‘logo’ == $style || ‘tagline’ == $style || ‘decoration’ == $style ) {
    // Font Rule
    $font = json_decode( $mod );
    if ( isset( $font->family->name ) && ” != $font->family->name ) {
    if ( isset( $font->family->fonttype ) && ‘google’ == $font->family->fonttype ) {
    $user_subsets = themify_base_get( ‘setting-webfonts_subsets’, array(‘latin’) );
    $font_hash = $font->family->name . $font->family->variant . $user_subsets;
    wp_enqueue_style( ‘custom-google-fonts-‘ . md5($font_hash), themify_https_esc(https://fonts.googleapis.com/css’ ) . ‘?family=’ . str_replace( ‘ ‘, ‘+’, $font->family->name ) . ‘:’ . $font->family->variant . ‘&subset=’ . implode(‘,’, $user_subsets) );
    }

    Change:

    themify_https_esc(

    to

    themify_base_https_esc(

    Save the file.

    So far, my test site has been fine with this.

    Be sure you have a backup of your site just in case. If this doesn’t work, restore the backup & keep using the previous theme version until a permenant fix.

    Thread Starter GoldHatTrick

    (@goldhattrick)

    I now have the next version (version 1.1.1).

    Just tried this one on my test site & it appears to be fine.

    I am marking this topic as resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fix for 1.1.0 fatal error undefined function’ is closed to new replies.