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

Activation URL difficulties on multisite #241

Open
hughbris opened this issue Feb 11, 2020 · 2 comments
Open

Activation URL difficulties on multisite #241

hughbris opened this issue Feb 11, 2020 · 2 comments
Labels

Comments

@hughbris
Copy link
Contributor

I have a multisite setup using the subdirectory option. The activation URLs generated in the activation emails do not include the site path after the hostname.

I notice in Login::sendNotificationEmail() that it uses $this->grav['base_url_absolute'], which will use a system.custom_base_url if set. So I set that, but that screwed up my stream URLs like url('theme://images/logo.svg') in Twig, so my images and probably other stuff broke.

I don't know where in the stack this problem is best solved. If it's in this plugin, perhaps either of these options is worth implementing:

  • a new plugin setting for email URL bases
  • allow Twig processing of the translation strings.

Or can you think of another solution or workaround?

@mahagr mahagr added the bug label Feb 12, 2020
@mahagr
Copy link
Member

mahagr commented Feb 12, 2020

Sounds like a bug to me.

@hughbris
Copy link
Contributor Author

I have thought of another solution. The email bodies are pretty clunky as translation strings (with the newlines, tabs etc) and could be split into more atomic translatable strings. These could be used in Twig templates. This would make the email messages both translatable and more flexible. Strings like the site URL would not need to be coded into PHP any more.

Another benefit is that emails could be sent both as HTML and plain text (using template variants), which will help with spam scores.

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

No branches or pull requests

2 participants