Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main site should have a domain #472

Open
GuySartorelli opened this issue Dec 6, 2021 · 4 comments
Open

Main site should have a domain #472

GuySartorelli opened this issue Dec 6, 2021 · 4 comments

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented Dec 6, 2021

The main site should have a domain associated with it.

The specific use case I have right now is for absolute URLs in emails - subsites have domains associated with them so calls to AbsoluteLink result in the appropriate URL for any pages belonging to a subsite - but for main site absolute URLs (especially when using a queued job via the cli where there is no host to draw from) I have to work around it by storing the domain somewhere effectively arbitrary.

If the main site had a domain the same way that subsites do, getting an absolute URL for the main site would be straight forward.

(for the absolute URL to automatically apply correctly in an email, we'd need to make a change to Director::absoluteURL (see silverstripe/silverstripe-framework#10168) - that is obviously out of scope for this issue, which is dealing with getting a correct absolute URL when using AbsoluteLink on a page which I am currently doing to set absolute URLs prior to setting the email body)

@mikey-harveycameron
Copy link

Also noticed possibly the same issue when on a subsite, editing pages inside the CMS. Select the "Main site" and the page UrlSegment fields still point to the subsite domain, presumably because it doesn't know the main site URL.

@GuySartorelli
Copy link
Member Author

@mikey-harveycameron I think that's probably more likely related to #489

@mikey-harveycameron
Copy link

mikey-harveycameron commented Sep 28, 2023

@GuySartorelli thanks for looking at it, the issue is not the opened page appearing on the wrong site. It's the correct subsite (main site), correct page, wrong domain in the UrlSegment field.

@GuySartorelli
Copy link
Member Author

Oh, weird. Okay. That should probably be raised as a separate issue then, if you don't mind. That shouldn't be happening at all, regardless of whether the main site has an explicit domain.

Can you please create a new issue detailing the bug with step-by-step instructions for reproducing it from a fresh installation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants