This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Theme conflicts and fatal errors with Formidable Forms plugin preview

  • Creator
    Topic
  • #14778
    vtheme
    Participant

    Hi
    I am using ver Akita 1.1.5 with Theme Blvd Framework 2.1.0 and have recently gotten this error:

    Fatal error: Call to undefined function themeblvd_include_google_fonts() in /home1/blah/public_html/blah/wp-content/themes/akita/includes/theme-functions.php on line 84

    Any suggestions as to why this function cannot be found?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Author
    Replies
  • #14780
    Jason Bobich
    Keymaster

    Hello,

    In your version, this function is defined in /framework/frontend/functions/general.php. So, it’s not possible to receive this error unless you don’t have the theme fully intact for the specific version you’re using. Can you think of any reason why the theme would not contain the proper files? Is it possible you tried to make an update at some point and didn’t complete it? Or edited something in the theme?

    I would suggest making sure you’ve got the theme fully intact and that the files haven’t been edited.

    Also, v1.1.5 is pretty far behind now. I would suggest looking into getting yourself up to date with the theme, as well. Here’s some more info on that:

    ========

    Here’s the updated demo:

    http://demoblvd.com/themes/akita/

    Here’s the changelog of everything that changed in the update (see 2.0.0):

    http://themeblvd.com/changelog?theme=akita

    And here’s an outline you can skim that outlines everything you need to be aware of that is different in the way the theme works:

    http://support.themeblvd.com/updating-to-framework-v2-3/

    Here’s a video that will walk you through the basics of updating a WordPress theme:

    https://vimeo.com/41533135

    And then moving forward from this update, you can setup updates to stream through your WordPress admin:

    http://support.themeblvd.com/docs/theme-updates/#themeforest

    #14801
    vtheme
    Participant

    Yes thank you, I have migrated a few of your themes onto the new version and did not like how that went or did not want the changes that they invoked, so I am staying away for now.

    I definitely have not edited any of the core files, so I am not sure how this occurred either, but it is good to know that it should work. I will try and reinstall my orig zip into the theme and perhaps that will clear it up.

    Thanks for the response, appreciate it – it does help in a way.

    #14822
    vtheme
    Participant

    I reuploaded and replaced the Akita version I was using, but still getting that error, even though the function is in the proper file.

    To test, I did try adding the identical function in my child theme, then that file was found fine, but I hit another fatal error on …/themeblvd_remove_trailing_char() , and so I added that identical function in my child-theme and then hit Fatal Error on themeblvd_get_font_face()…… and on and on.

    Not sure why this started happening now. This is encountered on Preview Form for Formidable plugin, but I have been using that plugin for a looong time and have not had these issues.

    Is there anything I can look for to debug this?
    I can try to deactivate/reactivate my chld-theme, but I want to make sure that I dont lose my settings if I do.

    Any help is appreciated!!

    #14824
    vtheme
    Participant

    I am also getting these errors in my error file:

    07-Feb-2014 01:37:48 America/Los_Angeles] PHP Warning: require_once(/home1/blah/public_html/blah/wp-content/themes/akita/framework/admin/modules/options/options-sanitize.php) [function.require-once]: failed to open stream: No such file or directory in /home1/blah/public_html/blah/wp-content/themes/akita/framework/themeblvd.php on line 95

    [07-Feb-2014 01:37:48 America/Los_Angeles] PHP Fatal error: require_once() [function.require]: Failed opening required ‘/home1/blah/public_html/blah/wp-content/themes/akita/framework/admin/modules/options/options-sanitize.php’ (include_path=’.:/opt/php53/lib/php’) in /home1/blah/public_html/blah/wp-content/themes/akita/framework/themeblvd.php on line 95

    #14829
    Jason Bobich
    Keymaster

    Unfortunately, I’m just not sure what you’re doing with the files on your server to cause such errors. If theme is uploaded properly and all intact, it’s not possible to receive such errors.

    Maybe you could try deleting the theme and letting WordPress place in the proper location for you? — Just delete the theme, and then upload the theme akita.zip through Appearance > Themes in your WordPress admin.

    Or maybe you have some kind of weird caching issues with updating files on your server? Or maybe you’ve messed around with file permissions or something? You could possibly try installing it to a new directory name that your server hasn’t seen before like “akita-2” for example —

    /wp-content/themes/akita-2/
    #14832
    vtheme
    Participant

    I too, am at a loss. It is possible it is a caching issue, but not sure yet.

    I have not touched the file permissions at all.

    I have not edited any of the original theme code, only my child theme. I do want to deactivate/reactivate my chld-theme, but I want to make sure that I dont lose my settings in that theme if I do. …could you confirm?

    If I install another instance of akita in akita-2, would my child theme find this one reliably?

    Hate to have these kind of problems… sure is taking time away from other things.

    #14836
    vtheme
    Participant

    Ok, I have checked this on several of my test sites, some of which have Alyeska, some Akita. I am getting these errors on ALL of the sites when I try to preview a form (Formidable ) with this url: /wp-admin/admin-ajax.php?action=frm_forms_preview&form=contact2

    So I do not think it is a setup error, but perhaps an interaction error.

    I have contacted Formidable and they suggested wp-debug, but all that does is show the Fatal Errors.

    Is there any clue as to what I can look for here?

    Also, can I deactivate and reactivate my child-theme without losing its settings?

    #14840
    Jason Bobich
    Keymaster

    I do want to deactivate/reactivate my chld-theme, but I want to make sure that I dont lose my settings in that theme if I do. …could you confirm?

    No, you will not lose any settings by deactivating and activating again the theme. — Now, your theme options are saved to an ID based on the name of the current theme. So, initially when you switch to the parent theme (which has a different name than your child theme), it will look like all of the theme options are gone, but when you activate the child theme again, the settings will come back.

    If I install another instance of akita in akita-2, would my child theme find this one reliably?

    Make sure you understand the basics of how a child theme works and connects to the parent theme. So, if your parent theme is now in a folder called “akita-2” you need to designate this in your child theme’s style.css. Watch this video: https://vimeo.com/70832266

    Hate to have these kind of problems… sure is taking time away from other things.

    This is why it’s a good idea to really be on top of managing your site in a safe way. You shouldn’t be making these kinds of updates and edits on a live site, not knowing what’s going to happen. This should always be done on some sort of staging environment. And then when you know everything works, you push to the live server. It’s all a learning experience, though.

    Ok, I have checked this on several of my test sites, some of which have Alyeska, some Akita. I am getting these errors on ALL of the sites when I try to preview a form (Formidable ) with this url: /wp-admin/admin-ajax.php?action=frm_forms_preview&form=contact2

    We have a separation of what’s happening on the frontend of the theme and the backend of the theme. It sounds like the plugin has some sort of editor that is in the admin, but not including all frontend elements (I’m not really sure?). So unfortunately, it sounds like the plugin and this theme are just not compatible.

    #14849
    vtheme
    Participant

    Thank you for all of the answers and input. We did not notice the Preview feature not working right away as it is something not used very often, so it was overlooked in the test sites.

    As one last attempt at getting this to work (because it did work for a long while) the developer of the plugin has replied “That sounds like an issue the theme developer needs to fix. The error is about a theme file, from a theme file. They need to make sure their functions are defined.”

    I believe that the functions are being declared, could you just confirm that and let me know where I could verify that on our setups,so that I am certain to look in the correct places.

    Thank again, appreciate the help.

    #14857
    Jason Bobich
    Keymaster

    I don’t personally really like the attitude of pointing fingers or say it’s the plugin developer’s fault or the theme developers fault, etc. But I can tell you the reason the error occurs — It’s because the plugin calls wp_head in the form preview, which is an action normally reserved for the frontend of your website. I believe the reason they’re doing this is because they’re trying to pull in frontend stylesheets from your current theme so the form preview looks more accurate (I’m just guessing though).

    The issue is with wp_head being called within the admin area. This causes a conflict with our theme because not all frontend theme functionality is available in the admin area. This separation of admin vs frontend elements allows the theme to run more efficiently on your server.

    I’m not quite sure what the problem with updating the theme was, but I would try to get yourself on the latest version and stay up to date with the theme if you can.

    But if you’re looking for a quick fix for now, this will do the trick from your child theme’s functions.php for Akita 1.1:

    /** 
     * Remove theme's inline styles attached to wp_head 
     * when Formidable preview runs.
     */
    function themeblvd_formidable_fix() {
    	// Check if this is Formidable preview
    	if ( isset( $_GET['action'] ) && $_GET['action'] == 'frm_forms_preview' ) {
    		remove_action( 'wp_head', 'akita_styles' );
    	}
    }
    add_action( 'after_setup_theme', 'themeblvd_formidable_fix' );

    And for Akita 2.0, this will fix the issue:

    /** 
     * Remove theme's styles and fonts attached to wp_head 
     * when Formidable preview runs.
     */
    function themeblvd_formidable_fix() {
    
    	// Check if this is Formidable preview
    	if ( isset( $_GET['action'] ) && $_GET['action'] == 'frm_forms_preview' ) {
    
    		$stylesheets_api = Theme_Blvd_Stylesheets_API::get_instance();
    
    		// Framework styles
    		remove_action( 'wp_enqueue_scripts', array( $stylesheets_api, 'set_framework_stylesheets' ), 1 );
    		remove_action( 'wp_enqueue_scripts', array( $stylesheets_api, 'set_client_stylesheets' ), 1 );
    		remove_action( 'wp_enqueue_scripts', array( $stylesheets_api, 'enqueue_framework_stylesheets' ), 5 );
    		remove_action( 'wp_head', array( $stylesheets_api, 'closing_stylesheets' ), 11 );
    
    		// Theme styles
    		remove_action( 'wp_enqueue_scripts', 'akita_css', 20 );
    
    		// Theme Fonts
    		remove_action( 'wp_head', 'akita_include_fonts', 5 );
    
    	}
    }
    add_action( 'after_setup_theme', 'themeblvd_formidable_fix' );

    And then in Akita 2.1+ (not released yet), we have some safe guards in place for plugin authors doing similar things. Basically on some of the functionality reserved for the frontend, we have some extra checks to make sure they can’t run on the admin side. However, the font issue still exists. So, here’s your fix for after Akita 2.1 is released:

    /** 
     * Remove theme's fonts attached to wp_head 
     * when Formidable preview runs.
     */
    function themeblvd_formidable_fix() {
    	// Check if this is Formidable preview
    	if ( isset( $_GET['action'] ) && $_GET['action'] == 'frm_forms_preview' ) {
    		remove_action( 'wp_head', 'akita_include_fonts', 5 );
    	}
    }
    add_action( 'after_setup_theme', 'themeblvd_formidable_fix' );
    #14861
    vtheme
    Participant

    I am so grateful for your explanation. It helps so much to understand why things occur and really does help to resolve future issues.

    You fix did work – thank you SO much for the extra effort and all of the versions fixes too. I really am sorry that you had to be bothered for this, especially because of why the error was occurring.

    I typically do like to stay with current versions, it is just that this application had other issues and the upgrade would not have fit well with the situation. I will try to get the theme updated to avoid other upcoming issues.

    Thank you again, I plug your themes to everyone I know, both for the support and the quality of your themes.

    Have a good one!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.