0

We are receiving system errors as follows and these have only just began appearing, I am not sure if coincidence but it seems to have started since we introduced iphone theme design exception in the backend;

ERR (3): Warning: Missing argument 9 for Mage_Catalog_Block_Navigation::_renderCategoryMenuItemHtml(), called in /app/code/local/Mage/Catalog/Block/Navigation.php on line 455 and defined in /app/code/local/Mage/Catalog/Block/Navigation.php on line 228 ERR (3): Notice: Undefined variable: rendermode in app/code/local/Mage/Catalog/Block/Navigation.php on line 294 ERR (3): Notice: Undefined variable: rendermode in app/code/local/Mage/Catalog/Block/Navigation.php on line 296

We do have a custom theme local Navigation.php file present and code has been added around the error lines 294 & 296 to display category images as follows (I have bold text lines 294 & 296);

// assemble list item with attributes
    $htmlLi = '<li';
    foreach ($attributes as $attrName => $attrValue) {
        $htmlLi .= ' ' . $attrName . '="' . str_replace('"', '\"', $attrValue) . '"';
    }
    $htmlLi .= '>';
    $html[] = $htmlLi;
    **if($rendermode == 'image' && $this->getImageUrl($category)){**
       $html[] = '<img src="'.$this->getImageUrl($category).'" />';
      **}else if($rendermode == 'thumbnail' && $this->getThumbnailUrl($category)){**
       $html[] = '<a href="'.$this->getCategoryUrl($category).'"><img src="'.$this-      >getThumbnailUrl($category).'" /></a>';
      }

Is this code causing the errors and how to go about fixing? Thanks so much for any help!

1

It seams that someone (maybe you) modified the method Mage_Catalog_Block_Navigation::_renderCategoryMenuItemHtml(). I see that the file referenced is in the local folder.
By default the method _renderCategoryMenuItemHtml has only 8 parameters and only the first one is required.
Remove the file from the local code pool and see if the error reproduces.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.