Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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 66.249.76.200] 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

    #118923

    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.

    #118924

    Dude,

    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]);

    }

    else

    {

    get_template_part( ‘page’ );

    }

    exit();

    }

    }

    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): http://pastebin.com/ERMLzg4L

    Mark

    #118925

    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: http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP – I’d set it to 128M.

    #118926

    Dude,

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

    Thanks,

    Mark

    ISSUE CLOSED.

    #118927

    Hi,

    Good. Glad it is fixed. :)

    Regards,

    Ismael

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

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