Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #23200

    Last week we saw a few time a “503” error dialog (on both PC and Mac, a few browsers).. But would go away when we refreshed the page.

    Today, in IE10, it did not finish rendering the home page, and displayed a dialog box that said something like “long-running script.” Afer a refresh it displayed properly. (Note This was after clearing the cache, to test a css change)

    After contacting our hoster (WPEngine), they sent the following back to us:

    [Mon May 13 14:14:26 2013] [error] [client] PHP Fatal error: Call to undefined function avia_get_frontpage_template() in /nas/wp/www/cluster-1519/visualimpact/wp-content/themes/angular/index.php on line 10

    Any ideas?

    Mark Besh

    Visual Impact Systems


    The function is located in wp-contentthemesangularincludeshelper-templates.php – search for:

    function avia_get_frontpage_template()

    if you can find this line the function should be defined. You can try to re-install all theme files – maybe a file is damaged/corrupt and if this doesn’t help deactivate all plugins – maybe a plugin is the culprit.



    This is what is in the helper-template.php file:



    * This function retrieves the template for the frontpage.

    * If any of the conditions are met the template is loaded followed by a php exit so code located afterwards wont be executed.



    function avia_get_frontpage_template()


    global $avia_config, $post;

    //if the user has set a different frontpage in the theme option settings show that page, otherwise show the default blog

    if(is_front_page() && avia_get_option(‘frontpage’) != “” && !isset($avia_config))


    if(get_query_var(‘paged’)) {

    $paged = get_query_var(‘paged’);

    } elseif(get_query_var(‘page’)) {

    $paged = get_query_var(‘page’);

    } else {

    $paged = 1;


    $avia_config = array(“page_id”=> avia_get_option(‘frontpage’), “paged” => $paged);

    $custom_fields = get_post_meta(avia_get_option(‘frontpage’), ‘_wp_page_template’, true);

    //if the page we are about to redirect uses a template use that template instead of the default page

    if($custom_fields != “” && strpos($custom_fields,’template’) !== false && $custom_fields = explode(‘-‘,str_replace(‘.php’,”,$custom_fields)))


    get_template_part( $custom_fields[0], $custom_fields[1]);




    get_template_part( ‘page’ );





    Look good to you?

    FYI: Thinking of what we’ve changed (that might affect server access), Nick suggested we add this entire file to the .htaccess file a while back (to try to solve the drop-down menu ‘flashing’ issue):



    The code seems to be correct – I didn’t find any syntax errors, etc. in the avia_get_frontpage_template() function.

    Please try to revert Nicks code – maybe it causes the problem. You can also try to re-install all theme files and to increase the allocated memory: – I’d set it to 128M.



    FYI: After a couple of cache clearings, IE10 didn’t give us any errors. Hmmm…maybe.






    Good. Glad it is fixed. :)



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

The topic ‘ANGULAR – "503" error / "Long-running script"’ is closed to new replies.