View Issue Details

IDProjectCategoryView StatusLast Update
0006294OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2024-02-28 14:34
Reporterheinrich.franz Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.9.6 / 5.2.6 
Fixed in Version6.0.0-rc.2 
Summary0006294: Facebook like button is not shown for cannonical page
DescriptionSee steps for reprod.

getCanonicalUrl() is used in like.tpl

[{if $oView->isActive('FbLike') && $oViewConf->getFbAppId()}]
    <fb:like href="[{if $parent != 'footer'}][{$oView->getCanonicalUrl()}][{else}][{$oViewConf->getCurrentHomeDir()}][{/if}]" layout="button_count" action="like" colorscheme="light"></fb:like>
[{/if}]

but if you debug with dev tools, you see that like button doesn't get cannonical url (that is in available in source code of page, see below)
action=like&app_id=115665678479440&color_scheme=light&container_width=0&href=http%3A%2F%2Fdemoshop.oxid-esales.com%2Fprofessional-edition%2FKiteboarding%2FTrapez-ION-SOL-KITE-2011.html&layout=button_count&locale=en_US&sdk=joey"

cannonical url in page:
<link rel="canonical" href="http://demoshop.oxid-esales.com/professional-edition/Kiteboarding/Trapeze/Trapez-ION-SOL-KITE-2011.html">

Steps To Reproduce1) Open http://demoshop.oxid-esales.com/professional-edition/Kiteboarding/Trapeze/Trapez-ION-SOL-KITE-2011.html (Like button is there with some likes)
2) login https://demoshop.oxid-esales.com/professional-edition/admin/
3) open product 1401
4) add additionally parent category "Kiteboarding" as category
5) goto http://demoshop.oxid-esales.com/professional-edition/Kiteboarding/Trapez-ION-SOL-KITE-2011.html
6) like button is there, but there are 0 likes
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

leofonic

2015-12-29 13:57

reporter   ~0011396

You can extend oxwarticledetails with the following method:

    public function getCanonicalUrl(){
        $oActTopView = $this->getConfig()->getTopActiveView();
        if ($oActTopView){
            return $oActTopView->getCanonicalUrl();
        }
    }

Sven Brunk

2024-02-28 14:34

administrator   ~0016320

This functionality has been removed from the shop due to privacy reasons, and because it is not a core functionality of the framework