I wasn't sure whether this was my omission or a bug. Thought I'd report it to be sure.
I created a custom content type in my own module (not CCK). Whenever viewing a node of my type a warning was thrown from contemplate_get_template() (as fired from contemplate_nodeapi). This occurs in the case where there is neither an entry in the contemplate table nor a contemplate template file corresponding to the type:
WARNING: 'Undefined index: flags' (8) in C:\websites\quakerquip.org\httpdocs\sites\all\modules\contemplate\contemplate.module (497)
This warning occurs when, due to there being no record, an invalid result is returned from the database into $types[$type] and later the routine attempts to reference $types[$type]['flags']. My fix was to insert the following below '$types[$type] = db_fetch_array(...':
if (empty($types[$type]))
$types[$type] = array('flags' => 0);
That does the trick, but I wondered if this segement should be executing at all, and if that were due to an error on my part.
Comments
Comment #1
jrglasgow CreditAttribution: jrglasgow commentedthis code will be invoked for all node types, I inserted the lines as you suggested, I don't see anything in it that would cause problems.