Thank you esmi for your help, I have no idea what’s going on, I stripped the theme to its bare minimum and still, when the ID argument is there widgets won’t work!!!
I tried it on both locally and on my server but this thing is driving me nuts.
header.php
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php bloginfo('name'); ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/style.css">
<?php wp_head(); ?>
</head>
<body>
<div>
<header>
<div class="wrapper">
<h1><a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a></h1>
</div>
</header>
index.php
<?php get_header(); ?>
<div id="content" class="wrapper">
<?php get_sidebar(); ?>
<div id="maincontent">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" class="post" role="article">
<header>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
</header>
<section>
<?php the_content(); ?>
</section>
</article>
<?php endwhile; ?>
<?php else : ?>
<article" class="post">
<header>
<h2>We can't find this post.</h2>
</header>
<section>
<p>This post is missing.</p>
</section>
</article>
<?php endif; ?>
</div>
</div>
<?php get_footer(); ?>
footer.php
<footer>
<?php wp_footer(); ?>
</footer>
</div>
</body>
</html>
sidebar.php
<aside id="sidebar">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<div class="widget">
<h3>Categories</h3>
<ul>
<?php wp_list_categories('title_li='); ?>
</ul>
</div>
<div class="widget">
<h3 class="title">Archives</h3>
<ul>
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
</ul>
</div>
<div class="widget">
<h3 class="title">Meta</h3>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</div>
<?php endif; ?>
</aside>
functions.php
<?php
if(function_exists('register_sidebar'))
register_sidebar(array(
'id' => 'default-upper',
'name'=> 'Default Sidebar',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
));
?>