• Resolved Richard D'Angelo

    (@craftpronj)


    I saw there were problems with 3.4.30 and, knowing @nikeo and the Customizr team, I knew they would be fixed quickly. After updating to the bug-fixed 3.4.31 version, my front page wouldn’t load because I’m using more than one Code Snippets from the Customizr site. I immediately reverted to the previous theme version. The code at the bottom in my child’s function.php resulted in a syntax error for “undeclared function “tc__f”.

    add_filter($hook_prefix.'text_sanitize', 'no_sanitize_text', 20, 3);
    function no_sanitize_text($text, $fp_single_id, $fp_id){
    global $hook_prefix;
    $option_prefix = ( $hook_prefix == 'fpc_') ? $hook_prefix : '';
    $featured_text = apply_filters( $hook_prefix.'text', tc__f( '__get_'. $option_prefix .'option' , 'tc_featured_text_'.$fp_single_id ), $fp_single_id, $fp_id );
    return html_entity_decode($featured_text);
    }

    Is this easily fixed by changing the prefix of the function(s) and classes to their new prefixes as described in the first section of the 3.4.31 release notes? Any other advice for a fix? Thanks guys!

    – RJD

Viewing 12 replies - 1 through 12 (of 12 total)
  • Me too. Error is on same undeclared function but my snippet is different. I’ve commented out my snippet. Not pretty but I’m hoping to see a new version or a workaround soon.

    Hi,
    As there has been changes in prefixes (from tc_ to czr_) of classes and their methods, some minor changes in the snippets would be required. But a blind search+replace may not work as there still are filters with the prefix tc_.
    You can could go about this methodically, one snippet at a time. I can help you with this.

    Thanks @menakas for the heads up on the changing prefix on selected classes and methods.

    I tried replacing the tc__f with czr__f in my child function.php but that failed too:

    Fatal error: Call to undefined function czr__f() in /home/content/[snip]/wp-content/themes/customizr-htbr/functions.php on line 52

    Any suggestion on this specific function?

    Hi,
    Method prefixes have been changed from tc_ to czr_fn_

    Theme Author presscustomizr

    (@nikeo)

    The function tc__f() has been changed to czr_fn__f()
    Hope it helps.
    Note : the hooks name have not been modified and still have the ‘tc_’ prefix.

    All good now. Many thanks to all of you for your help.

    Sorry for asking here. I got update 3.4.31 (3.4.23 installed)

    If I install 3.4.31 update, do I have to replace those (above commented by OP and Author) prefix’s in my child themes or does this update auto changes them?

    I have many filters in child theme functions.php and custom CSS.

    If one have to change manually, this going to be headache for users with no knowledge in php or “How to” (like me).

    Again, sorry for asking here.

    Thanks.

    • This reply was modified 8 years, 1 month ago by decblues.
    Theme Author presscustomizr

    (@nikeo)

    Hi @decblues,

    only the functions and classes names have been updated. Except if you’re overriding many classes in your child theme, there should be few changes to make in your child theme.

    The filters and actions are not modified, you don’t need to update their names.
    Hope it helps

    Hi @nikeo,

    thank for the fast fix 3.4.31.
    I dont know if it fits here, but after the update I have the following error when I try to “customize”:

    Error thrown
    
    Call to a member function czr_fn_write_fonts_inline_css() on null

    Thanks a lot for your info.

    Thread Starter Richard D'Angelo

    (@craftpronj)

    Update 3.4.33 completely resolved the issue for my site and all modifications in my child functions.php work just fine. Thanks for the helpful input everyone, and big thanks to @nikeo and the Customizr team for so diligently fixing all bug reports. Much appreciated.

    I’m marking this as resolved.

    – RJD

    Hi @nikeo,

    thank for the fast fixes to 3.4.33 now.
    My issues are all resolved.

    Thanks a lot.

    Theme Author presscustomizr

    (@nikeo)

    @craftpronj @isch you’re welcome, happy to help !

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘After 3.4.31 PHP from Customizr’s Code Snippets cause errors’ is closed to new replies.