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

getPermalinkBaseUrl() must not add the scheme #555

Closed
tchapi opened this issue Feb 26, 2020 · 2 comments
Closed

getPermalinkBaseUrl() must not add the scheme #555

tchapi opened this issue Feb 26, 2020 · 2 comments
Assignees

Comments

@tchapi
Copy link
Contributor

tchapi commented Feb 26, 2020

The APP_URL configuration setting in Laravel is supposed to include the scheme.

For instance in the .env.example file :

APP_URL=https://mydomain.com

See https://github.com/laravel/laravel/blob/master/.env.example for instance and https://github.com/laravel/laravel/blob/master/config/app.php#L55 too.

So in the Twill module controller, getPermalinkBaseUrl() must not add the scheme in front of the APP_URL config of Laravel :

https://github.com/area17/twill/blob/master/src/Http/Controllers/Admin/ModuleController.php#L1388

This breaks the permalink href (with a double scheme, such as http://https://mydomain.com)

The method should be something like :

        return Config::get('app.url') . '/'
            . ($this->moduleHas('translations') ? '{language}/' : '')
            . ($this->moduleHas('revisions') ? '{preview}/' : '')
            . ($this->permalinkBase ?? $this->moduleName)
            . (isset($this->permalinkBase) && empty($this->permalinkBase) ? '' : '/');
@tchapi
Copy link
Contributor Author

tchapi commented Mar 13, 2020

@ifox ifox self-assigned this Mar 13, 2020
@tchapi
Copy link
Contributor Author

tchapi commented Jul 16, 2020

I guess this is fixed by #651

@tchapi tchapi closed this as completed Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants