In custom module Observer.php
i am trying to get Product url
On view.phtml it gives correct working path like http://websitename.com/brave-gentleman-new-york-belt.html
But same code in Observer.php
gives http://websitename.com/brave-gentleman-new-york-belt-120.html
$_product = Mage::getModel('catalog/product')->load($productId);
Mage::log( $_product->getProductUrl());
This code gives brave-gentleman-new-york-belt
which is correct but it is not complete url
$productURL = Mage::getResourceSingleton('catalog/product')
->getAttributeRawValue($productId, 'url_key', Mage::app()->getStore());
This gives the result
$productUrl = Mage::getBaseUrl().Mage::getResourceSingleton('catalog/product')->getAttributeRawValue($productId, 'url_key', Mage::app()->getStore()).Mage::helper('catalog/product')->getProductUrlSuffix();