Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is this html error being rendered in my POST?
    primarykey
    data
    text
    <p>I have an availability calendar that I'm trying to POST to my database using Laravel. When i dump out my POST I get this..</p> <pre><code>string(1440) "s:1430:"2012-11-06;;1;;888,2012-11-07;;1;;888,2012-11-08;; 1;;888,2012-11-09;;1;;888,2012-11-10;;1;;888,2012-11-11;;1;;888,2012-11-12;; 1;;888,2012-11 13;;1;;888,2012-11-14;;1;;888,2012-11-15;;1;;888,2012-11-16;;1;; 888,2012-11-17;;1;;888,2012-11-18;;1;;888,2012-11-19;;1;;888,2012-11-20;;1;;888, 2012-11-21;;1;;888,2012-11-22;;1;;888,2012-11-23;;1;;888,2012-11-24;;1;;888, 2012-11-25;;1;;888,2012-11-26;;1;;888,2012-11-27;;1;;888,2012-11-28;;2;;0,array(1) {["availability"]=&gt;string(973) "s:964:"2012-11-05;;1;;888,2012-11-29;;1;; 888,2012-11-30;;1;;888,array(1) {["availability"]=&gt;string(12) "availability"} &lt;html&gt;&lt;h2&gt;Unhandled Exception&lt;/h2&gt;&lt;h3&gt;Message:&lt;/h3&gt;&lt;pre&gt;Error rendering view: [layouts.admin] Undefined variable: title&lt;/pre&gt;&lt;h3&gt;Location:&lt;/h3&gt; &lt;pre&gt;/Users/corymjacik/Sites/shipwatch_v2.1/storage/views/33f72cb6519c7f146dc8d6af4b948300 on line 5&lt;/pre&gt;&lt;h3&gt;Stack Trace:&lt;/h3&gt; &lt;pre&gt;#0 /Users/corymjacik/Sites/shipwatch_v2.1/laravel/laravel.php(40): Laravel\Error::native(8";"} &lt;html&gt;&lt;h2&gt;Unhandled Exception&lt;/h2&gt;&lt;h3&gt;Message:&lt;/h3&gt; &lt;pre&gt;Error rendering view: [layouts.admin]Undefined variable: title&lt;/pre&gt; &lt;h3&gt;Location:&lt;/h3&gt; &lt;pre&gt;/Users/corymjacik/Sites/shipwatch_v2.1/storage/views/33f72cb6519c7f146dc8d6af4b948300 on line 5&lt;/pre&gt;&lt;h3&gt;Stack Trace:&lt;/h3&gt; &lt;pre&gt;#0 /Users/corymjacik/Sites/shipwatch_v2.1/laravel/laravel.php(40): Laravel\Error::native(8";" </code></pre> <p>What might be causing this error, and why is it being included in my POST to the database? Below is my controller code. Everything works just fine, like this. I'm able to post that string to the database (which I turned into a string from an array using serialize()) and I'm also able to get it from the database and it displays on the frontend just fine. The errors don't seem to make a difference, but I just feel like I'm doing something slightly wrong.</p> <pre><code>public function post_availability_save() { $availability = serialize(Input::get('dop_booking_calendar')); //var_dump($availability);die; $id = Auth::user()-&gt;id; Availability::update($id, array( 'user_id' =&gt; Auth::user()-&gt;id, 'availability' =&gt; $availability )); return Redirect::to('admin'); } public function get_availability_load() { $id = Auth::user()-&gt;id; $availability = array( 'availability' =&gt; Availability::find($id)-&gt;availability ); var_dump($availability); } </code></pre> <p><strong>EDIT</strong> Messing around with it a bit more, it is also dumping out the beginning of my html layout... Anyone know what causes this? I'll dig a bit deeper. <strong><em>EDIT</em></strong> 11/13/12</p> <pre><code>//*This is what ends up in my database (Type:TEXT) // ,2012-11-13;;1;;1,2012-11-14;;1;;1,2012-11-15;;1;;1,2012-11-16;;1;;1,2012-11- 17;;1;;1,2012-11-18;;1;;1,2012-11-19;;1;;1,2012-11-20;;1;;1,2012-11-21;;1;;1,2012 -11-22;;1;;1,2012-11-23;;1;;1,2012-11-24;;1;;1,2012-11-25;;1;;1,2012-11-26;;1;;1, 2012-11-27;;1;;1,2012-11-28;;1;;1,Array ( [availability] =&gt; 1 ) &lt;html&gt;&lt;h2&gt;Unhandled Exception&lt;/h2&gt; &lt;h3&gt;Message:&lt;/h3&gt; &lt;pre&gt;Error rendering view: [layouts.admin] Undefined variable: title&lt;/pre&gt; &lt;h3&gt;Location:&lt;/h3&gt; &lt;pre&gt;/Users/cory/Sites/shipwatchpoint_v2.1/storage/views/e2b30637bfaa9d210e31baf35870d230 on line 5&lt;/pre&gt; &lt;h3&gt;Stack Trace:&lt;/h3&gt; &lt;pre&gt;#0 /Users/corymjacik/Sites/shipwatchpoint_v2.1/laravel/laravel.php(40): Laravel\Error::native(8 // *layouts.admin.blade.php // &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;{{ $title }}&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; &lt;meta name="description" content=""&gt; &lt;meta name="author" content=""&gt; &lt;!-- CSS --&gt; {{ HTML::style('css/bootstrap.css') }} {{ HTML::style('css/jquery.dop.BookingCalendar.css') }} {{ HTML::style('css/app.css') }} &lt;!-- HTML5 shim, for IE6-8 support of HTML5 elements --&gt; &lt;!--[if lt IE 9]&gt; &lt;script src="http://html5shim.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt; &lt;![endif]--&gt; &lt;!-- Fav and touch icons --&gt; &lt;link rel="shortcut icon" href="/img/ico/favicon.ico"&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="container-fluid"&gt; {{ $content }} &lt;/div&gt; &lt;!-- JS --&gt; &lt;!-- Placed at the end of the document so the pages load faster --&gt; {{ HTML::script('http://code.jquery.com/jquery-1.8.2.min.js') }} {{ HTML::script('js/bootstrap.js') }} {{ HTML::script('js/app.js') }} {{ HTML::script('js/jquery.dop.BookingCalendar.js') }} &lt;/body&gt; &lt;/html&gt; //*admin controller (public restful is set to true)// public function get_index() { $id = Auth::user()-&gt;id; $unit = array( 'unit' =&gt; Unit::find($id), 'unit_admin' =&gt; Unit::find($id)-&gt;user, //'availability' =&gt; Availability::all() added this and it still showed errors ); //var_dump($unit);die; $this-&gt;layout-&gt;title = 'Admin Profile'; $this-&gt;layout-&gt;nest('content', 'admin.index', $unit); } public function post_availability_save() { //$availability = serialize(Input::get('dop_booking_calendar')); $availability = Input::get('dop_booking_calendar'); //var_dump($availability);die; $id = Auth::user()-&gt;id; Availability::update($id, array( 'user_id' =&gt; Auth::user()-&gt;id, 'availability' =&gt; $availability )); return Redirect::to('admin'); } public function get_availability_load() { $id = Auth::user()-&gt;id; $availability = array( 'availability' =&gt; Availability::find($id)-&gt;availability ); var_dump($availability); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload