Urgent problem, site malfunctioning

Hello,

First of all, I am aware it is my fault, I was not careful and did an X theme update without trying it in a staging site first. I thought I was working in staging and I was working live.
That said, my site is a total mess now.
Menu not working, carousel not working, background disappeared, the list is endless.
Can you please help me out as soon as possible?

Edit: Upon further investigation, it is mostly the homepage that is messed up, from the registration tab I have a background and the menu is fully clickable, only the carousel is still missing. When I disable my child theme and install the regular X theme, the carousel is there and the menu is working as well, however also not properly and all of my customization is gone. I am sure something just needs to be clicked somewhere but I don’t know what…

Edit2: Just added a secure note with login details, tried disabling plugins without success, I am at a loss for new ideas and not technically knowledgable enough to figure out how to roll back to a previous version of x. I downloaded the stable version, but how do I overwrite the X theme that is already installed?

Edit3: So there is clearly a problem with my child theme. I reactivated my regular X theme and copied all the styling I did in my stylesheet, and voila, pretty much everything works! I do need a child theme though, because I also changed things to my functions file. My current plan is to copy all the relevant files from my child theme, delete my child theme and reinstall it and start with a fresh slate. What do you think? Thanks for considering and for a swift reply, our website is live and we are running a promotion at the moment, so it has to work flawlessly…

Final edit: OK, so I pinned it down to a problem with my post carousel customizations in my child theme. I activated my child theme again without the _post-carousel.php file, and everything works - EXCEPT the post carousel. If I put the file there again, nothing works again. So I have the problem, just no solution yet because the carousel looks bad now. There is an empty spot and the wrong posts are showing and it used to turn around automatically, with many posts and pages. I tried several things, adding the file to a different folder, adapting it, but I am not managing. Could you please help me out to get the carousel rolling again as well? Thank you and my apologies for all the edits, I just wanted a fast solution and wanted to update you when I discovered something. I am already calm because the site is working OK now, just the carousel needs a fix as soon as possible. Thank you.

Hi Mitica,

Thank you for writing in, try moving your custom file _post-carousel.php under x-child\framework\legacy\cranium\headers\views\ethos directory.

If that directory does not exist yet, please create the folders.

Remember to clear all your caching features and plugins.

Cheers!

Hello Friech,

Thanks but that does not work. When I put the file there, the same problems happen: background gone, menu not working, … It seems as if suddenly the code does not work anymore after the last update. Thank you so much for your assistance.

This is the code I used to have and is now no longer working:

GLOBAL $post_carousel_entry_id;

$post_carousel_entry_id = get_the_ID();

$is_enabled = x_get_option( ‘x_ethos_post_carousel_enable’, ‘’ ) == ‘1’;
$count = x_get_option( ‘x_ethos_post_carousel_count’ );
$display = x_get_option( ‘x_ethos_post_carousel_display’ );

switch ( $display ) {
case ‘most-commented’ :
$args = array(
‘post_type’ => array(‘page’, ‘post’),
‘posts_per_page’ => $count,
‘orderby’ => ‘comment_count’,
‘order’ => ‘DESC’
);
break;
case ‘random’ :
$args = array(
‘post_type’ => array(‘page’, ‘post’),
‘posts_per_page’ => $count,
‘orderby’ => ‘rand’
);
break;
case ‘featured’ :
$args = array(
‘post_type’ => array(‘page’, ‘post’),
‘posts_per_page’ => $count,
‘orderby’ => ‘date’,
‘meta_key’ => ‘x_ethos_post_carousel_display’,
‘meta_value’ => ‘on’
);
break;
}

?>

<?php if ( $is_enabled ) : ?>
<?php $wp_query = new WP_Query( $args ); ?>

<?php if ( $wp_query->have_posts() ) : ?>
  <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>

    <li class="x-post-carousel-item">
      <?php x_ethos_entry_cover( 'post-carousel' ); ?>
    </li>

  <?php endwhile; ?>
<?php endif; ?>

<?php wp_reset_query(); ?>

<script>

jQuery(document).ready(function() {
jQuery(’.x-post-carousel’).slick({
infinite : true,
speed : 6000,
slide : ‘li’,
slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_extra_large' ); ?>,
slidesToScroll : 1,
autoplay : true,
autoplaySpeed : 2000,
responsive : [
{ breakpoint : 1500, settings : { speed : 6000, slide : ‘li’, autoplay : true, autoplaySpeed : 2000, slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_large' ); ?> } },
{ breakpoint : 1200, settings : { speed : 6000, slide : ‘li’, autoplay : true, autoplaySpeed : 2000, slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_medium' ); ?> } },
{ breakpoint : 979, settings : { speed : 6000, slide : ‘li’, autoplay : true, autoplaySpeed : 2000, slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_small' ); ?> } },
{ breakpoint : 550, settings : { speed : 6000, slide : ‘li’, autoplay : true, autoplaySpeed : 2000, slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_extra_small' ); ?> } }
]
});
});

</script>
<?php endif; ?>

(I am unsure why it is posting in such a weird way, but unable to fix it, sorry for the mess)

EDIT: Since it is weekend and I am sure you guys are very busy and this is taking long to solve, I now deleted the carousel php file and I am manually adding several posts now to go into the carousel.
However, I can only have this happen temporarily… It is very important that I get the carousel back on autoplay and that I can also add pages into it. Please help me out as soon as you can, much appreciated. Thank you.

Hello @Tierramitica,

Please make sure that the contents of your _post-carousel.php file is this:

<?php

// =============================================================================
// VIEWS/ETHOS/_POST-CAROUSEL.PHP
// -----------------------------------------------------------------------------
// Outputs the post carousel that appears at the top of the masthead.
// =============================================================================

GLOBAL $post_carousel_entry_id;

$post_carousel_entry_id = get_the_ID();

$is_enabled = x_get_option( 'x_ethos_post_carousel_enable' ) == '1';
$count      = x_get_option( 'x_ethos_post_carousel_count' );
$display    = x_get_option( 'x_ethos_post_carousel_display' );

switch ( $display ) {
  case 'most-commented' :
    $args = array(
      'post_type'      => 'post',
      'posts_per_page' => $count,
      'orderby'        => 'comment_count',
      'order'          => 'DESC'
    );
    break;
  case 'random' :
    $args = array(
      'post_type'      => 'post',
      'posts_per_page' => $count,
      'orderby'        => 'rand'
    );
    break;
  case 'featured' :
    $args = array(
      'post_type'      => 'post',
      'posts_per_page' => $count,
      'orderby'        => 'date',
      'meta_key'       => '_x_ethos_post_carousel_display',
      'meta_value'     => 'on'
    );
    break;
}

?>

<?php if ( $is_enabled ) : ?>

  <?php $wp_query = new WP_Query( $args ); ?>

  <?php if ( $wp_query->post_count > 0 ) : ?>

    <ul class="x-post-carousel unstyled">

      <?php if ( $wp_query->have_posts() ) : ?>
        <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>

          <li class="x-post-carousel-item">
            <?php x_ethos_entry_cover( 'post-carousel' ); ?>
          </li>

        <?php endwhile; ?>
      <?php endif; ?>

      <script>

      jQuery(document).ready(function() {
        jQuery('.x-post-carousel').xSlick({
          speed          : 500,
          slide          : 'li',
          slidesToShow   : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_extra_large' ); ?>,
          slidesToScroll : 1,
          rtl            : <?php echo json_encode( is_rtl() ); ?>,
          responsive     : [
            { breakpoint : 1500, settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_large' ); ?> } },
            { breakpoint : 1200, settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_medium' ); ?> } },
            { breakpoint : 979,  settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_small' ); ?> } },
            { breakpoint : 550,  settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_extra_small' ); ?> } }
          ]
        });
      });

      </script>

    </ul>

  <?php endif; ?>

  <?php wp_reset_query(); ?>

<?php endif; ?>

Now if you have modified it before, please add your customizations in the above code. What you may have in your file is an outdated one which is why it is generating some issues. The code above is from the latest release.

Hope this helps. Please let us know how it goes.

Hello RueNel and thanks! However, I tried it on my staging site (1540589623382) and the carousel is not turning and not showing the posts it should show… This is the same result as if I do not put the file there.
Can you please take a look?

Hey @Tierramitica,

May I know the access to your staging site (1540589623382) so that I can investigate?

Thanks.

Yes of course, thank you, I added it in a secure note

Hey Mitica,

I would love to go above and beyond for this issue but I’m sorry I don’t have an idea how to solve this. I personally focus on official product features and the Ethos Carousel does not autoplay. Your customization of it, making it autoplay might be the one causing this issue as the parent theme works and the child theme in your site works without the customization. The carousel is currently working.

I’ll forward this to @RueNel maybe he can fix the custom code but please just note that fixing issues coming from custom code and further enhancements of it are outside the scope of our support even if a support staff has given it. They were only meant to be a guide or starting point for users to extend the theme. Please see our Terms.

Please stay tuned and thank you for understanding.

Hello Christian,
Thanks for your clear explanation, I understand everything you are saying. Thanks however also for forwarding it and trying to find a solution anyway, I know I am on your goodwill here. I will stay tuned.

You’re most welcome Mitica! And yes, please stay tuned :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.