MultiSites and Problem with Path/Key & RealUrl / URI Preview


#1

Hello,
at the moment, i try to make a basic setup of Pimcore with MultiSites(Shops). But i struggle a little bit.

What i´ve done is

  • i created a folder “Shop2” (just for example) for a standalone shop (to keep it separate from more other Shops)
  • below i created a Document “de” (for the german language version, to be prepared for the upcoming other language versions next year)
  • make this document with “Use as Site” and inserted the domains to be used (for ex. www.shop2.de)
  • created a snippet within share an some more pages

shop2-1

If I edit the “de” Page (the startpage - but it´s similar to all other pages below) and go on the “Settings” tab, i will see a strange Preview of the Google Appereance (It creates a https://www.shop2.de/shop2/de uri).

shop2-2

What i am doing wrong? I would expect a uri preview of “https://www.shop2.de/

I´ve tryed to enter within “Pretty URL” only a Backslash - but this doesn´t work and shows me an error icon in te Pretty URL line (so i´ve removed them).

Is it just a “display error” or have i done someting wrong?

The “Path” and “key” of the Document is fixed, regarding the structure, so i can´t change it within Pimcore.

Would be great if someone can explain what i´ve done wrong.

Kind regards,
Michael


#2

As the “de” part is only a variant of your “Shop2” page it makes more sense to convert the Shop2 folder into a document and take it as your standalone site (Is required that the domain looks like: http://shop2.de/de).
Also have a look at the I18nBundle it’s very useful when working with multiple languages. It takes care of all the routing and language resolving.

And in general:
Make sure the languages you want to use are correctly configured in your system settings and the language is assigned to your document (in the properties tab). If those things are given you should be good to go.

Should look similar to this:


#3

As @scrummer wrote - this URI Preview for now is working only on 1st level sites.

@ITspirit IMHO you found a bug :slight_smile: In this particular case (site is on 2nd level) truly URI Preview is not working correctly. I already put a PR for this: https://github.com/pimcore/pimcore/pull/3459

However this bug was quite small because this preview wasn’t working just for this one particular site (for all subpages you can see that it is working even with this bug)