diff --git a/Web/lib/MJB/Web/Controller/Dashboard.pm b/Web/lib/MJB/Web/Controller/Dashboard.pm index 3475e69..8b48022 100644 --- a/Web/lib/MJB/Web/Controller/Dashboard.pm +++ b/Web/lib/MJB/Web/Controller/Dashboard.pm @@ -427,6 +427,12 @@ sub do_blog_page ( $c ) { my $path = $c->param('pagePath'); my $content = $c->param('pageContent'); my $headers = $c->param('pageHeaders'); + + if ( ! $path ) { + $c->flash( error_message => "You must add a filepath for the HTML file." ); + $c->redirect_to( $c->url_for( 'show_dashboard_blog_page', { id => $blog->id } ) ); + return; + } my $jekyll = $c->jekyll($blog->domain->name);