I have a couple of issues with an updated version of x

Hi,

I’ve recently been updating a website which was using an older version of x. On the previous version of x, we noticed that a plugin (WP Events Manager) had an issue where when you pressed the “ass/edit link” toolbar icon, the browser jumps to the bottom of the page and any attempt to scroll up results in the browser jumping back to the bottom of the page. Chnaing the theme back to the default 2017 theme, fixes the issue. Is there an issue with tinymce and x?

Also, since updating I have lost the custom widget area on the homepage. Previously I was overwriting x/framework/views/global/_header-widget-areas.php in my child theme. I notice that this file does not exist in the latest version of x. What is the corresponding file in this version?

Hello There,

Thanks for writing in!

Are you using CloudFlare or may have installed a caching plugin like WordFence, W3 Total Cache or WP Super Cache? Please keep in mind that after doing every updates, always remember to clear all caches when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

In the latest version, we have removed the widget area file. If you have made some customizations in your child theme, I would suggest that you insert this code in your child theme’s functions.php file instead:

// Legacy Header Widget Areas
// =============================================================================

if ( ! function_exists( 'x_legacy_header_widget_areas' ) ) :
  function x_legacy_header_widget_areas() {

    $n = x_get_option( 'x_header_widget_areas' );

    if ( ! apply_filters( 'x_legacy_cranium_headers', true ) || $n == 0 || x_is_blank( 3 ) || x_is_blank( 6 ) || x_is_blank( 7 ) || x_is_blank( 8 ) ) {
      return;
    }

    ?>

    <div class="x-widgetbar collapse">
      <div class="x-widgetbar-inner">
        <div class="x-container max width">

          <?php

          $i = 0; while ( $i < $n ) : $i++;

            $last = ( $i == $n ) ? ' last' : '';

            echo '<div class="x-column x-md x-1-' . $n . $last . '">';
              dynamic_sidebar( 'header-' . $i );
            echo '</div>';

          endwhile;

          ?>

        </div>
      </div>
    </div>

    <a href="#" class="x-btn-widgetbar collapsed" data-toggle="collapse" data-target=".x-widgetbar">
      <i class="x-icon-plus-circle" data-x-icon="&#xf055;"><span class="visually-hidden"><?php _e( 'Toggle the Widgetbar', '__x__' ); ?></span></i>
    </a>

    <?php

  }
  add_action( 'x_after_site_end', 'x_legacy_header_widget_areas' );
endif;

Please do not forget to add any of your modifications and also, you can now remove the _header-widget-areas.php because there is no need to have this anymore.

Hope this helps.