magento-turpentine icon indicating copy to clipboard operation
magento-turpentine copied to clipboard

Get current URL

Open hmphu opened this issue 8 years ago • 2 comments

Hi,

I had an issue with getCurrentUrl function in core/url model. It could not get the current URL in ESI request.

I found that the code in Esi.php#L294 only set $referrerParam for page scope. I tried to remove the if condition, the function bellow can get the correct current URL

Mage::helper('core/url')->getCurrentUrl()

Is it safe to remove the if condition?

Thanks, Phu

hmphu avatar Nov 17 '16 10:11 hmphu

@miguelbalparda how do you think?

hmphu avatar Nov 18 '16 03:11 hmphu

<action method="setEsiOptions">
    <params>
        <access>private</access>
        <scope>page</scope>
        <ttl>0</ttl>
        <registry_keys>
            <current_category/>
        </registry_keys>
     </params>
  </action>`

The registery_keys -> current category together with the right scope fixed it for me. Please try this.

breakerh avatar Jan 26 '17 14:01 breakerh