Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #223910

    Christian
    Moderator

    Hey AW,

    Please try removing the spaces before and after php tags so it would be like

    <?php
    //
    // Template Name: Artiklar
    //
    ?>

    See also the links below for other factors

    http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F
    http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php

    Thanks.

    #224104

    AW C
    Participant

    Tried them all on one of the child themes with no luck.

    Why does it say that the x-head.min calls an undefined function? If i change the x-head.min.js to x-site-head.js (with the same name as the minified) I don’t get an error. However the content is still blank and drop down menus in the top bar does not work.

    There must be something else wrong since the child theme file can be completely empty but still generate an error…?

    #224142

    Paul R
    Moderator

    Hi,

    Upon checking your site, I can see it is temporarily disabled

    http://screencast.com/t/QuFdIsGFkZKF

    Please check and let us know.

    Thanks

    #224675

    AW C
    Participant

    Now I have cleaned everything to start fresh, with hopes of finding the source of the problem. The site has been down a month and I’ve spent weeks. This has to be the last try unfortunantely.

    With a clean install of WP, new upload of the latest X and upload of the latest x-child I still get the same error of an uncaught type error in x-head.min.js.

    template-nyheter.php placed directly under x-child/ contains the following (I have made no other changes to anything else):

    <?php
    
    //
    // Template Name: Nyheter
    //
    
    get_header();
    ?>

    With this I get the same bloody error in development console in Chrome. My hopes just went down in the basement…

    Maybe this is not any problem or what is the solution if it is? If not how should I go on isolating why the whole page crashes?

    #224843

    Paul R
    Moderator

    Hi,

    I would like to check again but the ftp login you have provided no longer works.

    Can you please check and let us know.

    At the mean time you can try removing the closing php tag ?>

    
    <?php
    
    //
    // Template Name: Nyheter
    //
    
    get_header();
    

    Hope that helps.

    #225008

    AW C
    Participant
    This reply has been marked as private.
    #225074

    Thai
    Moderator

    Hi There,
    Upon checking your FTP Source, I can see that you’re using x_integrity_main_content_class() which does not exist in X theme.
    It should be: x_main_content_class();
    I’d already changed this for you, please take a look at template-news.php file locates in the child theme.
    Thanks.

    #229035

    AW C
    Participant
    This reply has been marked as private.
    #229121

    Thai
    Moderator

    Hi There,
    I solved these issues for you, everything is working fine right now.
    Please take a look at your website.
    Regards!

    #229507

    AW C
    Participant

    Great, what a happy news! Now it is almost back as it used to. The child theme home was divided into columns, but now every post takes up the whole page like 1/1 column. I added the @import for integrity-light.css. but the site remained unaffected.?

    #229738

    Rad
    Moderator

    Hi there,

    You’re using custom templates, and here the code for your home page.

    <?php
    
    //
    // Template Name: Standard hem
    //
    
    ?>
    
    <?php get_header(); ?>
    
    	<div class="x-container-fluid max width offset cf">
    		<div class="<?php x_main_content_class(); ?>" role="main">
    
    			
        
                <div class="x-column two-thirds">
                    <h2 class="h3 mts">Nyheter</h3>
                    <div class="x-recent-posts vertical home-custom cf" data-fade="false">
        
                        <?php
        
                        $output = '';
                        $q_1 = new WP_Query( array(
                            'orderby'        => 'date',
                            'post_type'      => 'post',
                            'posts_per_page' => 3,
                            'category_name'  => 'nyheter'
                        ) );
        
                        if ( $q_1->have_posts() ) : while ( $q_1->have_posts() ) : $q_1->the_post();
        
                        if ( ! has_post_thumbnail() ) {
                            $image_output       = '';
                            $image_output_class = 'no-image';
                        } else {
                            $image_output       = '<div class="x-recent-posts-img">' . get_the_post_thumbnail( get_the_ID(), 'entry-' . get_theme_mod( 'x_stack' ) . '-cropped', NULL ) . '</div>';
                            $image_output_class = 'with-image';
                        }
        
                        $output .= '<a class="x-recent-post3 ' . $image_output_class . '" href="' . get_permalink( get_the_ID() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ) . '">'
                               . '<article id="post-' . get_the_ID() . '" class="' . implode( ' ', get_post_class() ) . '">'
                                 . $image_output
                                 . '<div class="x-recent-posts-content">'
                                   . '<h3 class="h-recent-posts">' . get_the_title() . '</h3>'
                                   . '<span class="x-recent-posts-date">' . get_the_date() . '</span>'
    							   . '<span class="x-recent-posts-excerpt">' . get_the_excerpt() . '</span>'
                                 . '</div>'
                               . '</article>'
                             . '</a>'
    						 ;
        
                        endwhile; endif; wp_reset_postdata();
        
                        echo $output;
        
                        ?>
        
                    </div>
                </div>
        
                <div class="x-column one-third last">
                    <h2 class="h3 mts">Artiklar</h3>
                    <div class="x-recent-posts vertical home-custom cf" data-fade="false">
        
                        <?php
                        // Artiklar
                        $output = '';
            
                        $q_2 = new WP_Query( array(
                            'orderby'        => 'date',
                            'post_type'      => 'post',
                            'posts_per_page' => 4,
                            'category_name'  => 'artiklar'
                        ) );
            
                        if ( $q_2->have_posts() ) : while ( $q_2->have_posts() ) : $q_2->the_post();
            
                            if ( ! has_post_thumbnail() ) {
                                $image_output       = '';
                                $image_output_class = 'no-image';
                            } else {
                                $image_output       = '<div class="x-recent-posts-img">' . get_the_post_thumbnail( get_the_ID(), 'entry-' . get_theme_mod( 'x_stack' ) . '-cropped', NULL ) . '</div>';
                                $image_output_class = 'with-image';
                            }
            
                            $output .= '<a class="x-recent-post3 ' . $image_output_class . '" href="' . get_permalink( get_the_ID() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ) . '">'
                                   . '<article id="post-' . get_the_ID() . '" class="' . implode( ' ', get_post_class() ) . '">'
                                     . $image_output
                                     . '<div class="x-recent-posts-content">'
                                       . '<h3 class="h-recent-posts">' . get_the_title() . '</h3>'
                                       . '<span class="x-recent-posts-date">' . get_the_date() . '</span>'
                                     . '</div>'
                                   . '</article>'
                                 . '</a>';
            
                        endwhile; endif; wp_reset_postdata();
            
                        echo $output;
            
                        ?>
            
                    </div>
                </div>
            
            </div> <!-- end .x-main -->
        
            <?php get_sidebar(); ?>
        
        </div> <!-- end .x-container-fluid.max.width.offset.cf -->
    
    <?php get_footer(); ?>
    

    1. You’re still using x-container-fluid which should be x-container only.

    Change this <div class="x-container-fluid max width offset cf">

    to this <div class="x-container max width offset cf">

    Apply this to all possible occurences.

    2. There are no columns, you’re using a source code from recent posts shortcode and it’s set as vertical.

    <div class="x-recent-posts vertical home-custom cf" data-fade="false">

    So, I’m not really sure about the columns, since recent posts shortcode uses horizontal for 4 columned items.

    3. You can include another <a> inside another <a>. That will cause issue, and that is when adding read more link using get_the_excerpt()

    Change this,

    . '<span class="x-recent-posts-excerpt">' . get_the_excerpt() . '</span>'

    into this

    . '<span class="x-recent-posts-excerpt">' . strip_tags(get_the_excerpt()) . '</span>'

    Your issues are coming from your customization. You may want to consult to a developer for better assistance.

    Thanks!

    #232447

    AW C
    Participant

    This was great, thanks!

    Today I logged in and got a notice to update X once again, so I did. The result was frightening. Once again the header is full of warnings about width.php. What did you do last time to clear this and why is it happening every time I update?

    Regarding the layout of the page (your point 2):
    1) The content previously had a white background surrounding it. This disappeared.
    2) Yes, the layout of within each column is vertical, but before the updates the <div class=”x-column two-thirds”><div class=”x-recent-posts vertical home-custom cf” data-fade=”false”></div></div> and <div class=”x-column one-third last”></div> was placed next to each other horizontally. Now they share the same width and are placed vertically after each other.
    3) The sidebar is gone, even from within the wp-admin page.

    #232948

    Rad
    Moderator

    Hi there,

    We did set define('WP_DEBUG', false); at your site’s wp-config.php. This is only possible by editing the file, so update should have no control. It’s set back to true (define('WP_DEBUG', true); )

    I did set it to false again and those warning and notices are now gone.

    1. You’re using custom templates which lacks of class name and elements to achieve the look of a default template. You may add this css at your customizer’s custom css.

    .page-template-template-home page-template-template-home-php .site > .x-container.max {
    background-color: #fff;
    }

    2. Okay, then replace one-third with x-1-3

    3. You probably switched theme (eg. to child themes). Menus and widgets will be reset when doing that, but will not be deleted. They will be just inactive. Go to Admin > Appearance > Widgets and scroll down, find inactive widgets and place them again where they are supposed to be.

    Thanks.