3
votes

I have Sitecore 8.1 as a multi site instance. The Experience Editor doesn't work, because the rendered URL seems to be rendered wrong. This is how Sitecore calls the Experience Editor:

https://hostname.com/de-DE/Site Name/Homepage/Startpage?sc_mode=edit&sc_resolvelanguage=1

If I remove the "de-DE/Site Name/Homepage/Startpage" part from the URL, it works.

EDIT: If I leave that part and add "sitecore/content/" at its beginning, it works too.

EDIT 2: Preview now works once I set preview.ResolveSite to true. Page Editor is still not working.

EDIT 3: Here's my SiteDefinition:

<site name="sitename" patch:after="site[@name='website']"
    virtualFolder="/"
    physicalFolder="/"
    rootPath="/sitecore/content/Site Name/Homepage"
    startItem="/Startpage"
    hostName="*domain.com"
    database="web"
    language="de-DE"
    domain="extranet"
    allowDebug="true"
    cacheHtml="true"
    htmlCacheSize="10MB"
    enablePreview="true"
    enableWebEdit="true"
    enableDebugger="true"
    disableClientData="false"/>

Any idea what I can do to fix this?

1
I have updated the answer.Hishaam Namooya
Where are all the comments? Were they deleted?SpaceJump
I have removed the answer since I have tested the solution I have provided but it works from my end when using your configuration.Hishaam Namooya
So you say the problem are my SiteDefinitions? They always worked from Sitecore 7.0 till 8.0.SpaceJump
I thought your SiteDefinition was not correct but after testing it, it is ok. Normally, when the Sitecore Dashboard will open, Sitecore will render the path on the Experience Editor Button. When you hover on the button you will see if the link is correct or not.Hishaam Namooya

1 Answers

1
votes

In your site definition, check if the root path is the Site Name/Homepage/Startpage.

The "domain.com" represent the rootpath "/sitecore/content/site name/homepage". This means that the url should be something like this domain.com/de-DE/startpage?sc_mode=edit

Try change your Site Definition for this site as below:

<site name="sitename" patch:before="*[@name='website']"
            virtualFolder="/"
            physicalFolder="/"
            rootPath="/sitecore/content/Site Name/Homepage/Startpage"
            startItem="/"
            hostName="*domain.com"
            database="web"
            language="de-DE"
            domain="extranet"
            allowDebug="true"
            cacheHtml="true"
            htmlCacheSize="10MB"
            enablePreview="true"
            enableWebEdit="true"
            enableDebugger="true"
            disableClientData="false"
            useDisplayName="true"
            embedLanguage="true"
            embedLanguageInMedia="false"
            routeSiteName="sitename" />

The reason why you can access the page when using the sitecore/content is because you are using the sitecore item path.