CakeDC/utils — Issue #25: beforeSave in Sluggable not returning true
Author: Dunhamzzz
Created: 2011-10-25 19:55:11+00:00
State: open

There are some conditionals in beforeSave() that just return; which is failing my save(); when I change them to return true it works.

However I checked $Model->data and it doesn't actually contain the current model I am saving, I was saving my product model, but it was empty User model data that was in $Model->data. I didn't want to submit a simple patch with return true for all the conditionals as it's possible there problem is a bit deeper and it would be a lame fix.

Using 2.0 branch with CakePHP 2.0. Line 83 in particular is where I was failing.
```php
if (empty($Model->data[$Model->alias])) {
return;
} else if (empty($Model->data[$Model->alias][$this->settings[$Model->alias]['label']])) {
return; // This is returning
} else if (!$this->settings[$Model->alias]['update'] && !empty($Model->id) && !is_string($this->settings[$Model->alias]['trigger'])) {
return;
}

```