cancel
Showing results for 
Search instead for 
Did you mean: 

Can't Create or Save Product After Patch

Can't Create or Save Product After Patch

I get a 500 error when trying to create new or save current product. Nothing in system.log. Enabled ini_set('display_errors', 1); and have the following error:

 

Fatal error: Call to undefined method Mage_Catalog_Model_Resource_Product::getCategoryIdsWithAnchors() in /var/www/html/app/code/core/Mage/Catalog/Model/Product.php on line 1895

 

Here is the source from line 1887 -1900

 /**
     * Get cahce tags associated with object id
     *
     * @return array
     */
    public function getCacheIdTagsWithCategories()
    {
        $tags = $this->getCacheTags();
        $affectedCategoryIds = $this->_getResource()->getCategoryIdsWithAnchors($this);
        foreach ($affectedCategoryIds as $categoryId) {
            $tags[] = Mage_Catalog_Model_Category::CACHE_TAG.'_'.$categoryId;
        }
        return $tags;
    }

 

 

 

New to Magento

1 REPLY

Re: Can't Create or Save Product After Patch

If i comment out the function i am able to save but this is obviously not the solution

 

    /**
     * Get cahce tags associated with object id
     *
     * @return array
     *
 *   public function getCacheIdTagsWithCategories()
 *   {
 *       $tags = $this->getCacheTags();
 *       $affectedCategoryIds = $this->_getResource()->getCategoryIdsWithAnchors($this);
 *       foreach ($affectedCategoryIds as $categoryId) {
 *           $tags[] = Mage_Catalog_Model_Category::CACHE_TAG.'_'.$categoryId;
 *       }
 *       return $tags;
 *   }
	*/