Why does xwiki inserts /Main into urls?

I am new to xwiki (version 9.4, OS Centos 7) and just learning to configure it.

I have configured ShortURL but I find that /Main is always added to my urls. For example even though the logo is configured to point to http://XX.XX.XX.XX/Stuff but when I click on it I get directed the address http://XX.XX.XX.XX/Main/Stuff which does not exist, same thing happens when I set the homepage to Stuff and hover over the icon the browser shows http://XX.XX.XX.XX/Main/Stuff as the target.

What does /Main mean? is it the name of the “main” wiki?

PS: thanks for the amazing work. I chose xwiki over mediawiki because of the draw.io integration

It took a bit of time for me to figure this out, but I guess I got it now.

When you create a new page which is not “terminal”, this page is created in a space of its own.
That is likely to be the case for you here. You created a new top-level page and named it “Stuff”, and then reasonable well assumed that its name will be “Stuff”.
However what happens behind the scenes is that the so called “full page name” is actually “Stuff.WebHome”, where the “WebHome” part is the automatic default name for a page.

If you enter “Stuff” in the location for the “Home Page” of the wiki, then the wiki tries to find “Stuff”, and as this does not exist, instead it adds the default “Main” in front of the name, so it becomes “Main.Stuff”. I guess it would have been smarter to first append the default page name “WebHome” so it becomes “Stuff.WebHome”, which would have produced the result that you expect.

Long story short: if you type in “Stuff.WebHome” instead of just “Stuff” as home page, you should get the result that you want; at least when people click on the logo they will land on the “Stuff” page.
However directly after login they will still see the “Main” page as first page. I am not sure if this is a bug or the intended behavior.

For more information about nested pages, see https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/ContentOrganization/ too.

This is what happens when you enter a URL. This behavior is not centralized though and it’s limited to URL resolution. In this use case, there’s no URL resolution. There’s an entity reference resolution being done and by default since the space is missing, Main is added. See https://extensions.xwiki.org/xwiki/bin/view/Extension/Model%20Module#HResolvingaReference and the default resolver.

So indeed the solution here is to enter the proper reference for the Stuff page, which is Stuff.WebHome. BTW we’re supposed to use page pickers everywhere in the wiki so you shouldn’t even know about this normally :slight_smile: Could you tell us how you changed the logo (which UI you used to do that)? It seems we’re missing a picker there.

Thanks!

BTW if you need to know the reference of a wiki page, see https://www.xwiki.org/xwiki/bin/view/FAQ/How%20can%20I%20get%20the%20reference%20of%20a%20page which leads to https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/DocumentLifecycle/#HInformation

(Apologies for the late reply. I was on holiday,)

To change the logo go to

Look and Feel :: Color Theme :: Customize :: Logos (chose an attachment)

The home page (that is where the link for the logo is defined) happens in the wiki descriptor of the wiki (i.e. via the Wiki Manager).

@vmassol I guess the reason why there is no page picker in this place is that the page picker does not allow to set the wiki from which pages are suggested to be different from the current wiki - and except for the main wiki this is what one wants here.
Or maybe I just have not found the proper option; I looked at the Suggest Pages widget documentation, but all I found there is the option to restrict the search to a space.

Yes, ATM the page suggestions are taken from the current wiki. Adding a wiki parameter won’t be enough because you probably want to get suggestions both from the current wiki and from the main wiki. But for this we would probably need to move from database search to Solr.

I first thought that the wiki for the wiki descriptor would be enough, but I see the use case where one wants to make the start page of the main wiki the “home page” for the subwiki, too.
Maybe a switch between “current” and “main” wiki (like for local and global users in the user picker) would be enough to do the job?