Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Thanks for trying out our Mailchimp Datasource. One of the problems might be that is was written for CakePHP 1.2+ and that a lot of stuff has changed in CakePHP since the 2.0 release. </p> <p>Note that we're still using Cake 1.3 with the datasource and experience no errors whatsoever. </p> <p>Did you check out the <a href="http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html" rel="nofollow">migration guide from CakePHP 1.3 to 2.0</a>? Right at the bottom there's some mentioning of changes done to DataSources, so the error might be related to that.</p> <p>We'll try to take it for a spin in Cake 2.0 and see what goes wrong, but in the mean time, this might be helpful.</p> <p><strong>==UPDATE==</strong></p> <p>Yup, it was CakePHP 2.0 that was not compatible. I've ported the datasource to support CakePHP 2.0, please check <a href="https://github.com/Springest/CakePHP-Mailchimp-datasource" rel="nofollow">the updated repository</a>.</p> <p><strong>== SECOND UPDATE==</strong></p> <p>You've made one error in your view: because you've created the form with <code>$this-&gt;Form-&gt;create('People', array('action' =&gt; 'subscribe'));</code> the data of the form will be in the <code>$this-&gt;data</code> array with key <code>People</code> whereas it should have the key <code>MailchimpSubscriber</code>. Because there's no key with that name in your <code>$this-&gt;data</code> the MailchimpSubscriber model will ignore the save action. You'll need to change your submission form in such a way that the submitted data has the right model name as key.</p> <p>Another note: you're now loading the <code>MailchimpSubscriber</code> model twice. The first time in the <code>$uses</code> array in the controller and the second time through the <code>$this-&gt;loadModel()</code> method in the controller action. I would only use the latter.</p>
 

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