Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your data is not correctly formatted for passing it to <code>Model::save()</code>. Please refer to the documentation:</p> <p><a href="http://book.cakephp.org/2.0/en/models/saving-your-data.html" rel="nofollow noreferrer">http://book.cakephp.org/2.0/en/models/saving-your-data.html</a></p> <p>It should be in the following format:</p> <pre><code>Array ( [ModelName] =&gt; Array ( [fieldname1] =&gt; 'value' [fieldname2] =&gt; 'value' ) ) </code></pre> <p>So the object passed to the AJAX calls <code>data</code> property should look like this:</p> <pre><code>{ModelName: {fieldname1: 1, fieldname2: 2}} </code></pre> <p>In your case that would be:</p> <pre><code>{Reservation: {reservation_time_from: calEvent.start, reservation_time_to: calEvent.end, user_id: 1, laboratory_id: 1}} </code></pre> <p>Checking for a POST request instead of <code>data</code> being <code>null</code> <em>might</em> also be a good idea, ie:</p> <pre><code>if($this-&gt;request-&gt;is('post')) { $this-&gt;Reservation-&gt;save($this-&gt;request-&gt;data); } </code></pre> <p>Also check if you are using the <a href="http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html" rel="nofollow noreferrer">Security Component</a> which may <a href="http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#handling-blackhole-callbacks" rel="nofollow noreferrer">blackhole</a> the request.</p> <p>And last but not least, check for the date format you've already mentioned, in case validation is involved this might be a problem too, at least it's a problem in case the table column expects a different format. So, format the date properly if necessary, see <a href="https://stackoverflow.com/questions/5129624/convert-js-date-time-to-mysql-datetime">Convert JS date time to MySQL datetime</a> or <a href="http://arshaw.com/fullcalendar/docs/utilities/formatDate/" rel="nofollow noreferrer">http://arshaw.com/fullcalendar/docs/utilities/formatDate/</a> in case you are using <a href="http://arshaw.com/fullcalendar/" rel="nofollow noreferrer">FullCalender</a> (just guessing by your event/property names).</p>
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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