• Resolved visiocollect

    (@visiocollect)


    Dear Support-Team,

    our website
    visiocollect.com
    is up an running since February 2014 but is showing a blank front page since the automatic update to WP 4.3 showing following error message:

    [fcgid:warn] [pid 10652:tid 140615473817344] [client 62.74.10.122:9393] mod_fcgid: stderr: PHP Parse error: syntax error, unexpected end of file in /home/vcollect/domains/visiocollect.com/public_html/wp-content/themes/visiocollect-0214/front-page.php on line 99

    other pages like
    visiocollect.com/spektrum/lumocube
    are still working.

    the file front-page.php hasn’t been changed in any way.

    Thank you for your help.

    Sascha

Viewing 12 replies - 1 through 12 (of 12 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Try deactivating all plugins. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, try switching to the Twenty Fifteen theme to rule-out a theme-specific issue (theme functions can interfere like plugins).

    Thread Starter visiocollect

    (@visiocollect)

    Thank you for your answer. Deactivating the plugins didn’t resolve the problem. Switching to a standart theme is no solution. The theme we use was designed and built from scratch to fit the needs of our company website.

    We’ll try to use a backup with an older WP version, or do you see any other solutions?

    Best
    Sascha

    Hi,

    Its a problem with the theme.Once try this set the permalinks to default and then check the site.Other one try to switch the theme i:e activate the theme to default twentyfourteen or twentyfifteen.After that recheck the site once.Now activate your desired theme.

    Thanks,
    Anusha.

    try to activate default theme then check may be it works

    Thread Starter visiocollect

    (@visiocollect)

    Hi Anusha,

    I tried your suggestions:

    setting the permalinks to default won’t resolve the problem.
    I switched to the default themes twentyfourteen/twentyfifteen and back, the frontpage is still blank.
    I renamed the theme folder via ftp, switched to the default themes and back, the frontpage is still blank.

    I am posting the code of the file front-page.php – maybe this will help…

    <?php
    /* =============================================================================
       TEMPLATE: Frontpage
       ========================================================================== */
    
    global $body_attributes;
    $body_attributes = 'data-spy="scroll" data-target=".navbar-main" data-offset="200"';
    
    get_header();
    
    the_post();
    $post_id = get_the_id();
    
    $teasers = get_posts(array(
        'posts_per_page'   => -1,
        'offset'           => 0,
        'orderby'          => 'menu_order',
        'order'            => 'ASC',
        'post_type'        => 'teaser',
        'post_status'      => 'publish',
        'suppress_filters' => true
    ));
    
    if( $teasers && count($teasers)>0 ) {
        $indicators = array();
        $contents = array();
        foreach( $teasers as $i => $post ) {
            $parallax_img = get_mpt_src('parallax','fullscreen',$post);
            array_push($indicators, '<li data-target="#aktuelles" data-slide-to="'.$i.'"'.($i==0?' class="active"':'').'></li>');
            array_push($contents, '<div class="item'.($i==0?' active':'').'"><div class="item-inner">'.
                '<div class="carousel-background parallax" style="background-image:url(\''.$parallax_img[0].'\')" data-stellar-background-ratio="0.5"></div>'.
                '<div class="carousel-caption">'.apply_filters('the_content', $post->post_content).'</div>'.
                '</div></div>');
        }
        ?>
        <div data-ops="<?php echo esc_attr(get_permalink($post_id)); ?>" id="aktuelles" class="carousel slide" data-pause="false" data-ride="carousel" data-interval="8000">
            <?php if(count($teasers)>1) { ?>
                <ol class="carousel-indicators"><?php echo implode('',$indicators); ?></ol>
            <? } ?>
            <div class="carousel-inner"><?php echo implode('',$contents); ?></div>
            <?php if(count($teasers)>1) { ?>
                <a class="left carousel-control no-smooth-scroll" href="#aktuelles" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
                <a class="right carousel-control no-smooth-scroll" href="#aktuelles" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
            <? } ?>
        </div>
        <?php
    }
    
    get_template_part( 'snippet', 'topbar' );
    
    $childposts = new WP_Query(array(
        'post_type'      => 'page',
        'post_status'    => 'publish',
        'posts_per_page' => -1,
        'post_parent'    => $post_id,
        'order'          => 'ASC',
        'orderby'        => 'menu_order'
    ));
    if( $childposts->have_posts() ) {
        while( $childposts->have_posts() ) {
            $childposts->the_post();
            global $post;
            $parallax_img = get_mpt_src('parallax');
    
            if( $parallax_img ) {
                ?>
                <div class="bg-image parallax" style="background-image:url('<?php echo $parallax_img[0]; ?>');" data-stellar-background-ratio="0.25"></div>
                <?php
            }
            ?>
            <div class="container">
                <?php /* <article data-ops="<?php echo esc_attr( $post->post_name=='projekte' ? get_home_url(null,'/projekte/') : ( $post->post_name=='spektrum' ? '/spektrum/' : get_permalink() ) ); ?>" <?php post_class(); ?>> */ ?>
                <article data-ops="<?php echo esc_attr( $post->post_name=='projekte' ? get_home_url(null,'/projekte/') : get_permalink() ); ?>" <?php post_class(); ?>>
                    <header class="entry-header">
                        <h2 class="entry-title">
                            <?php if($post->post_name=='projekte') { ?>
                                <a href="/projekte/"><span class="glyphicon glyphicon-chevron-right"></span><?php the_title(); ?></a>
                            <?php } else { ?>
                                <?php the_title(); ?>
                            <?php } ?>
                        </h2>
                    </header>
                    <div class="entry-content">
                        <?php the_content(); ?>
                    </div>
                </article>
            </div>
            <?php
    
        }
    }
    wp_reset_query();
    
    get_template_part( 'snippet', 'footer' );
    
    get_footer();
    
    ?>

    I really thank you for your help so far.
    Sascha

    I just check your code may be try with this

    <? } ?> change to <?php } ?>

    in below lines:

    <ol class="carousel-indicators"><?php echo implode('',$indicators); ?>
            <? } ?>

    and and

    <a href="#aktuelles"><span class="glyphicon glyphicon-chevron-right"></span></a>
            <? } ?>

    in home page you need to call sub pages content or post content ? because in your code you write post_type = “page” you need post then write post

    ‘post_type’ => ‘page’,
    ‘post_status’ => ‘publish’,
    ‘posts_per_page’ => -1,
    ‘post_parent’ => $post_id,

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    I renamed the theme folder via ftp, switched to the default themes and back, the frontpage is still blank.

    Just to clarify, that’s not how you rule out the theme as a cause. 😉

    To rule-out the theme as the cause so you know that you and Ahir are on the right track:

    1. Switch To Twenty Fifteen.

    2. See if you have the same issue under Twenty Fifteen first, don’t just switch back. This takes 1 minute or less.

    3. Switch back.

    If you have the same problem under Twenty Fifteen, then the problem is definitely *not* your theme. If you don’t have the same problem under Twenty Fifteen, then you and Ahir are on the right track.

    Hi,

    try this code once.

    <?php
    /* =============================================================================
       TEMPLATE: Frontpage
       ========================================================================== */
    
    global $body_attributes;
    $body_attributes = 'data-spy="scroll" data-target=".navbar-main" data-offset="200"';
    
    get_header();
    
    the_post();
    $post_id = get_the_id();
    
    $teasers = get_posts(array(
        'posts_per_page'   => -1,
        'offset'           => 0,
        'orderby'          => 'menu_order',
        'order'            => 'ASC',
        'post_type'        => 'teaser',
        'post_status'      => 'publish',
        'suppress_filters' => true
    ));
    
    if( $teasers && count($teasers)>0 ) {
        $indicators = array();
        $contents = array();
        foreach( $teasers as $i => $post ) {
            $parallax_img = get_mpt_src('parallax','fullscreen',$post);
            array_push($indicators, '<li data-target="#aktuelles" data-slide-to="'.$i.'"'.($i==0?' class="active"':'').'>');
            array_push($contents, '<div class="item'.($i==0?' active':'').'"><div class="item-inner">'.
                '<div class="carousel-background parallax" style="background-image:url(\''.$parallax_img[0].'\')" data-stellar-background-ratio="0.5"></div>'.
                '<div class="carousel-caption">'.apply_filters('the_content', $post->post_content).'</div>'.
                '</div></div>');
        }
        ?>
        <div data-ops="<?php echo esc_attr(get_permalink($post_id)); ?>" id="aktuelles" class="carousel slide" data-pause="false" data-ride="carousel" data-interval="8000">
            <?php if(count($teasers)>1) { ?>
                <ol class="carousel-indicators"><?php echo implode('',$indicators); ?>
            <?php } ?>
            <div class="carousel-inner"><?php echo implode('',$contents); ?></div>
            <?php if(count($teasers)>1) { ?>
                <a href="#aktuelles"><span class="glyphicon glyphicon-chevron-left"></span></a>
                <a href="#aktuelles"><span class="glyphicon glyphicon-chevron-right"></span></a>
            <?php } ?>
        </div>
        <?php
    }
    
    get_template_part( 'snippet', 'topbar' );
    
    $childposts = new WP_Query(array(
        'post_type'      => 'page',
        'post_status'    => 'publish',
        'posts_per_page' => -1,
        'post_parent'    => $post_id,
        'order'          => 'ASC',
        'orderby'        => 'menu_order'
    ));
    if( $childposts->have_posts() ) {
        while( $childposts->have_posts() ) {
            $childposts->the_post();
            global $post;
            $parallax_img = get_mpt_src('parallax');
    
            if( $parallax_img ) {
                ?>
                <div class="bg-image parallax" style="background-image:url('<?php echo $parallax_img[0]; ?>');" data-stellar-background-ratio="0.25"></div>
                <?php
            }
            ?>
            <div class="container">
    
                <article data-ops="<?php echo esc_attr( $post->post_name=='projekte' ? get_home_url(null,'/projekte/') : get_permalink() ); ?>" <?php post_class(); ?>>
                    <header class="entry-header">
                        <h2 class="entry-title">
                            <?php if($post->post_name=='projekte') { ?>
                                <a href="/projekte/"><span class="glyphicon glyphicon-chevron-right"></span><?php the_title(); ?></a>
                            <?php } else { ?>
                                <?php the_title(); ?>
                            <?php } ?>
                        </h2>
                    </header>
                    <div class="entry-content">
                        <?php the_content(); ?>
                    </div>
                </article>
            </div>
            <?php
    
        }
    }
    wp_reset_query();
    
    get_template_part( 'snippet', 'footer' );
    
    get_footer();
    
    ?>

    Thanks.

    Thread Starter visiocollect

    (@visiocollect)

    Hi together,

    @james Huff: of course I checked if the front page is working with the twentyfifteen template (it did) – I am sorry about not clearly telling you.

    @ahir Hemant: the front page is a one-page design showing multiple post types with the Intuitive CPO plugin.

    @anusha Janga: I’ve tried your code but still had the same outcome.

    BUT!

    The page is working again. What I did was to install a backed up version running on WP 4.1.8 and updated then to WP 4.3.1

    I guess the problem was generated by a version in between which created an error in the database. This is all I can imagine (I am not the original coder of the site). I also disabled automatic updates for the future to avoid such errors.

    THANK YOU ALL FOR YOU HELP THOUGH!!

    Best
    Sascha

    Ohh that’s great.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    You’re welcome!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘front page is blank’ is closed to new replies.