Q: Stop 'extends WP_Widget' displaying the (backend) form, frontend? I am in the middle of transferring a website from one server to another. 
It works as it should on the old server but on the new server is broken.
The widget is pretty basic, you fill in some options (text boxes and the like) via appearance -> widget and it displays the outcome frontend. Since the switch, it is showing the form (text boxes etc) underneath the frontend outcome, and has removed the textboxes etc from the backend completely. All I'm left with is a widget block with the message:
"There are no options for this widget."
Here's my code:
if ( ! class_exists( 'widget_block' ) ) { 
class widget_block extends WP_Widget {

  public function __construct() {

    parent::__construct(
        'widget_block',
        __( 'Widget Block', 'dev.everythingdifferent.co.uk' ),
        array(
            'classname'   => 'widget_block',
            'description' => __( 'A basic widget block that allows for text only, text and image or text and video widget blocks.', 'everythingdifferent.co.uk' )
            )
    );

    load_plugin_textdomain( 'dev.everythingdifferent.co.uk', false, basename( dirname( __FILE__ ) ) . '/languages' );

}

/**  
 * Front-end display of widget.
 *
 * @see WP_Widget::widget()
 *
 * @param array $args     Widget arguments.
 * @param array $instance Saved values from database.
 */
public function widget( $args, $instance ) {    

    extract( $args );

    $title      = apply_filters( 'widget_title', $instance['title'] );
    $message    = $instance['message'];
    $thumbnail    = $instance['thumbnail'];
    $postid    = $instance['postid'];
    $videourl    = $instance['videourl'];
    $videoimage = $instance[ 'videoimage' ] ? 'true' : 'false';
    $autoplay = $instance[ 'autoplay' ] ? '1' : '0';

    echo $before_widget;


    ?>

        <header><?php if ( $title ) {echo $before_title . '<a href="'.get_permalink( $postid ).'">' . $title . $after_title . '</a>'; } ?></header>
        <?php 
        $url = $videourl;
        // parse_str( parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars );

        // $videourl = $my_array_of_vars['v']; 
        $videourl = parse_yturl($videourl);
        $videourl = 'https://www.youtube.com/embed/' . trim($videourl) . '?autoplay='.$autoplay;

        if (empty($url)) {
            $videourl = get_permalink( $postid );
            $classes ='';
        } else {
            $classes ='overlay-video homevid';
            // echo 'here'. $url;
        };
        ?>
            <a rel="homevid" class="<?php echo $classes; ?> playbutton clearfix media" title="<?php echo $title;?>" href="<?php echo $videourl; ?>" style="display:block;">
                <span class="playbutton clearfix">
                <?php
                    if( $videoimage == 'true' ) {
                        // echo 'true';
                        // If the post has a feature image, show it
                        if( has_post_thumbnail( $postid ) ) {
                            echo get_the_post_thumbnail( $postid, 'video' );
                        // Else if the post has a mime type that starts with "image/" then show the image directly.
                        } 
                    } else {
                        // echo 'false';
                    }
                ?>
                <?php if (empty($url)) {

                } else {
                    // echo 'here'. $url;
                    echo '<span class="clearfix overlay-button" ></span>';
                };
                ?>


                </span>
            </a>
            <p><?php echo nl2br($message);?></p>



    <?
     echo $after_widget;
}


/**
  * Sanitize widget form values as they are saved.
  *
  * @see WP_Widget::update()
  *
  * @param array $new_instance Values just sent to be saved.
  * @param array $old_instance Previously saved values from database.
  *
  * @return array Updated safe values to be saved.
  */
public function update( $new_instance, $old_instance ) {        

    $instance = $old_instance;

    $instance['title'] = strip_tags( $new_instance['title'] );
    $instance['message'] = strip_tags( $new_instance['message'] );
    $instance['thumbnail'] = strip_tags( $new_instance['thumbnail'] );
    $instance['postid'] = strip_tags( $new_instance['postid'] );
    $instance['videourl'] = strip_tags( $new_instance['videourl'] );
    $instance[ 'videoimage' ] = $new_instance[ 'videoimage' ];
    $instance[ 'autoplay' ] = $new_instance[ 'autoplay' ];

    return $instance;

}

/**
  * Back-end widget form.
  *
  * @see WP_Widget::form()
  *
  * @param array $instance Previously saved values from database.
  */
public function form( $instance ) {

    $title      = esc_attr( $instance['title'] );
    $message    = esc_attr( $instance['message'] );
    $thumbnail    = esc_attr( $instance['thumbnail'] );
    $postid    = esc_attr( $instance['postid'] );
    $videourl    = esc_attr( $instance['videourl'] );
    $videoimage    = esc_attr( $instance['videoimage'] );
    $autoplay    = esc_attr( $instance['autoplay'] );

    ?>


    <p>
        <input class="checkbox" type="checkbox" <?php checked( $instance[ 'videoimage' ], 'on' ); ?> id="<?php echo $this->get_field_id( 'videoimage' ); ?>" name="<?php echo $this->get_field_name( 'videoimage' ); ?>" /> 
        <label for="<?php echo $this->get_field_id( 'videoimage' ); ?>">Video and/or Image</label>
    </p>
    <p>
        <label for="<?php echo $this->get_field_id('postid'); ?>"><?php _e('Post ID (<a href="https://pagely.com/blog/2015/04/find-post-id-wordpress/" target="_blank">How do I find this?</a>):'); ?></label> 
        <input class="widefat" id="<?php echo $this->get_field_id('postid'); ?>" name="<?php echo $this->get_field_name('postid'); ?>" type="text" value="<?php echo $postid; ?>" />
    </p>
    <p>
        <label for="<?php echo $this->get_field_id('postid'); ?>"><?php _e('YouTube url:'); ?></label> 
        <input class="widefat" id="<?php echo $this->get_field_id('videourl'); ?>" name="<?php echo $this->get_field_name('videourl'); ?>" type="text" value="<?php echo $videourl; ?>" />
    </p>
    <p>
        <input class="checkbox" type="checkbox" <?php checked( $instance[ 'autoplay' ], 'on' ); ?> id="<?php echo $this->get_field_id( 'autoplay' ); ?>" name="<?php echo $this->get_field_name( 'autoplay' ); ?>" /> 
        <label for="<?php echo $this->get_field_id( 'autoplay' ); ?>">Autoplay video</label>
    </p>
    <p>
        <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> 
        <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" />
    </p>
    <p>
        <label for="<?php echo $this->get_field_id('message'); ?>"><?php _e('Message'); ?></label> 
        <textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id('message'); ?>" name="<?php echo $this->get_field_name('message'); ?>"><?php echo $message; ?></textarea>
    </p>





    <?php 
    }

  }
}

