Even after running cron/update.php, these notice messages appear in PHP5:
notice: Undefined property: stdClass::$submenutree_enable in /home/httpd/drupal/drupal/sites/all/modules/submenutree/submenutree.module on line 215.
notice: Undefined property: stdClass::$siblingmenutree_enable in /home/httpd/drupal/drupal/sites/all/modules/submenutree/submenutree.module on line 215.

Had to fix it by adding check for the existance of submenutree_enable and siblingmenutree_enable to the beginning of the submenutree_nodeapi_view - function.

Comments

bengtan’s picture

Hi,

Can you please supply a patch, or else copy-paste a copy of your modified submenutree_nodeapi_view()?

I don't want to be making changes to code based on an english sentence description (not because I don't believe you, but because english is not precise for describing code).

5ven’s picture

submenutree_form_alter:
(notice appears when adding a new node)
Line 42: if(isset($node->submenutree_title)){
Line 159: }

submenutree_nodeapi_view:
Line 217: if(isset($node->submenutree_enable)){
Line 259: }

5ven’s picture

More context:
39 function submenutree_form_alter(&$form, $form_state, $form_id) {
40 if (strpos($form_id, 'node_form') > 0) {
41 $node = $form['#node'];
42 if(isset($node->submenutree_title)){

216 function submenutree_nodeapi_view(&$node, $op, $teaser, $page) {
217 if(isset($node->submenutree_enable)){

bengtan’s picture

Status: Fixed » Active

Hi,

I'm not entirely convinced (yet) that this change is necessary.

Can you please tell me what your php error_reporting value is?

If you look at http://drupal.org/requirements, error_reporting should be set to E_ALL & ~E_NOTICE, which I suspect may get rid of your verbose notice messages.

5ven’s picture

Yes, that was the reason - I had too verbose messages.

bengtan’s picture

Status: Active » Closed (works as designed)

Hi,

Presumed resolved, then?