I've come across an issue in RC4 when saving a form that has a HABTM
relationship within it.  The HABTM relationship in this case is
"Websites" and "Niches".  The forms are using the form helper.  When
adding or editing either a website or a niche, and debug > 0, the
following notices and warning occur:

-----
Notice (8): Undefined index:  id [CORE/cake/libs/model/model.php, line
1281]

Notice (8): Undefined index:  id [CORE/cake/libs/model/model.php, line
1282]

Warning (2): Cannot modify header information - headers already sent
by (output started at /www/example.com/cake/basics.php:111) [CORE/cake/
libs/controller/controller.php, line 615]
-----

I'm using Mysql and keys are UUID's.  The save actually works,
however.  Is this an issue for anyone else?  Any ideas for a fix?  I
had a look in model.php, but not sure how to fix it.  Here is the
complete debug output including "Code" and "Context" when adding a new
website with a number of niches selected:

Notice (8): Undefined index:  id [CORE/cake/libs/model/model.php, line
1281]

Code | Context

$joined =       array(
        "Niche" => array(
        "48a614e4-3b10-4438-99b8-46b1d81165c4",
        "48a614e8-476c-46cd-8ad8-097fd81165c4",
        "48a614f8-2320-4caf-a208-039fd81165c4",
        "48a614ff-2c98-4671-93a7-098ed81165c4",
        "48a61510-6c30-423f-b83a-4d6cd81165c4",
        "48a61514-4088-43f3-91af-4457d81165c4",
        "48a6151a-6f6c-43f2-b415-4595d81165c4",
        "48a61527-b89c-4aa0-9a00-4095d81165c4",
        "48a6152c-13c4-4fe6-b8d1-096bd81165c4"
)
)
$id     =       "494b6bf0-b17c-4883-8ebf-21edd81165c4"
$db     =       DboMysqli
DboMysqli::$description = "Mysqli DBO Driver"
DboMysqli::$_baseConfig = array
DboMysqli::$startQuote = "`"
DboMysqli::$endQuote = "`"
DboMysqli::$_useAlias = true
DboMysqli::$_commands = array
DboMysqli::$columns = array
DboMysqli::$index = array
DboMysqli::$alias = "AS "
DboMysqli::$fieldCache = array
DboMysqli::$__bypass = true
DboMysqli::$__sqlOps = array
DboMysqli::$connected = true
DboMysqli::$fullDebug = true
DboMysqli::$error = NULL
DboMysqli::$affected = 0
DboMysqli::$numRows = 0
DboMysqli::$took = 0
DboMysqli::$_result = mysqli_result object
DboMysqli::$_queriesCnt = 3
DboMysqli::$_queriesTime = 2
DboMysqli::$_queriesLog = array
DboMysqli::$_queriesLogMax = 200
DboMysqli::$_queryCache = array
DboMysqli::$__descriptions = array
DboMysqli::$_sources = array
DboMysqli::$connection = mysqli object
DboMysqli::$config = array
DboMysqli::$configKeyName = "default"
DboMysqli::$_transactionStarted = false
DboMysqli::$cacheSources = true
DboMysqli::$_log = NULL
DboMysqli::$__booleans = array
DboMysqli::$results = mysqli_result object
DboMysqli::$map = array
$data   =       array(
        "48a614e4-3b10-4438-99b8-46b1d81165c4",
        "48a614e8-476c-46cd-8ad8-097fd81165c4",
        "48a614f8-2320-4caf-a208-039fd81165c4",
        "48a614ff-2c98-4671-93a7-098ed81165c4",
        "48a61510-6c30-423f-b83a-4d6cd81165c4",
        "48a61514-4088-43f3-91af-4457d81165c4",
        "48a6151a-6f6c-43f2-b415-4595d81165c4",
        "48a61527-b89c-4aa0-9a00-4095d81165c4",
        "48a6152c-13c4-4fe6-b8d1-096bd81165c4"
)
$assoc  =       "Niche"
$join   =       "NichesWebsite"
$conditions     =       array(
        "NichesWebsite.niche_id" => "494b6bf0-b17c-4883-8ebf-21edd81165c4"
)
$links  =       array()

                ));

                $isUUID = !empty($this->{$join}->primaryKey) &&
(($this->{$join}->_schema[$this->{$join}->primaryKey]['type'] ===
'string' && $this->{$join}->_schema[$this->{$join}->primaryKey]
['length'] === 36)

Model::__saveMulti() - CORE/cake/libs/model/model.php, line 1281
Model::save() - CORE/cake/libs/model/model.php, line 1236
PaysitesController::add() - APP/controllers/websites_controller.php,
line 27
Object::dispatchMethod() - CORE/cake/libs/object.php, line 115
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 245
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 211
[main] - APP/webroot/index.php, line 88

Notice (8): Undefined index:  id [CORE/cake/libs/model/model.php, line
1282]

Code | Context

$joined =       array(
        "Niche" => array(
        "48a614e4-3b10-4438-99b8-46b1d81165c4",
        "48a614e8-476c-46cd-8ad8-097fd81165c4",
        "48a614f8-2320-4caf-a208-039fd81165c4",
        "48a614ff-2c98-4671-93a7-098ed81165c4",
        "48a61510-6c30-423f-b83a-4d6cd81165c4",
        "48a61514-4088-43f3-91af-4457d81165c4",
        "48a6151a-6f6c-43f2-b415-4595d81165c4",
        "48a61527-b89c-4aa0-9a00-4095d81165c4",
        "48a6152c-13c4-4fe6-b8d1-096bd81165c4"
)
)
$id     =       "494b6bf0-b17c-4883-8ebf-21edd81165c4"
$db     =       DboMysqli
DboMysqli::$description = "Mysqli DBO Driver"
DboMysqli::$_baseConfig = array
DboMysqli::$startQuote = "`"
DboMysqli::$endQuote = "`"
DboMysqli::$_useAlias = true
DboMysqli::$_commands = array
DboMysqli::$columns = array
DboMysqli::$index = array
DboMysqli::$alias = "AS "
DboMysqli::$fieldCache = array
DboMysqli::$__bypass = true
DboMysqli::$__sqlOps = array
DboMysqli::$connected = true
DboMysqli::$fullDebug = true
DboMysqli::$error = NULL
DboMysqli::$affected = 0
DboMysqli::$numRows = 0
DboMysqli::$took = 0
DboMysqli::$_result = mysqli_result object
DboMysqli::$_queriesCnt = 3
DboMysqli::$_queriesTime = 2
DboMysqli::$_queriesLog = array
DboMysqli::$_queriesLogMax = 200
DboMysqli::$_queryCache = array
DboMysqli::$__descriptions = array
DboMysqli::$_sources = array
DboMysqli::$connection = mysqli object
DboMysqli::$config = array
DboMysqli::$configKeyName = "default"
DboMysqli::$_transactionStarted = false
DboMysqli::$cacheSources = true
DboMysqli::$_log = NULL
DboMysqli::$__booleans = array
DboMysqli::$results = mysqli_result object
DboMysqli::$map = array
$data   =       array(
        "48a614e4-3b10-4438-99b8-46b1d81165c4",
        "48a614e8-476c-46cd-8ad8-097fd81165c4",
        "48a614f8-2320-4caf-a208-039fd81165c4",
        "48a614ff-2c98-4671-93a7-098ed81165c4",
        "48a61510-6c30-423f-b83a-4d6cd81165c4",
        "48a61514-4088-43f3-91af-4457d81165c4",
        "48a6151a-6f6c-43f2-b415-4595d81165c4",
        "48a61527-b89c-4aa0-9a00-4095d81165c4",
        "48a6152c-13c4-4fe6-b8d1-096bd81165c4"
)
$assoc  =       "Niche"
$join   =       "NichesWebsite"
$conditions     =       array(
        "NichesWebsite.niche_id" => "494b6bf0-b17c-4883-8ebf-21edd81165c4"
)
$links  =       array()


                $isUUID = !empty($this->{$join}->primaryKey) &&
(($this->{$join}->_schema[$this->{$join}->primaryKey]['type'] ===
'string' && $this->{$join}->_schema[$this->{$join}->primaryKey]
['length'] === 36)
                        || ($this->{$join}->_schema[$this->{$join}-
>primaryKey]['type'] === 'binary' && $this->{$join}->_schema[$this->
{$join}->primaryKey]['length'] === 16));

Model::__saveMulti() - CORE/cake/libs/model/model.php, line 1282
Model::save() - CORE/cake/libs/model/model.php, line 1236
PaysitesController::add() - APP/controllers/websites_controller.php,
line 27
Object::dispatchMethod() - CORE/cake/libs/object.php, line 115
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 245
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 211
[main] - APP/webroot/index.php, line 88

Warning (2): Cannot modify header information - headers already sent
by (output started at /www/example.com/cake/basics.php:111) [CORE/cake/
libs/controller/controller.php, line 615]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to