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

Application name in every title #92

Closed
kskrlin opened this issue Jul 18, 2017 · 5 comments
Closed

Application name in every title #92

kskrlin opened this issue Jul 18, 2017 · 5 comments

Comments

@kskrlin
Copy link

kskrlin commented Jul 18, 2017

On local server if there is no title set through this package, title is created with the default name from config file, however on live server the default title is ignored.

Also on localhost every title set through the package has the default name included after the main title separated with the separator, but on live server this is also ignored.

@isneezy
Copy link

isneezy commented Aug 22, 2017

Please Share your package and controller configuration

@kskrlin
Copy link
Author

kskrlin commented Sep 26, 2017

Version: "artesaos/seotools": "^0.10.0",

$this->seo()->setTitle($page->title)->setDescription($page->meta_description); SEOMeta::setKeywords($page->meta_keywords);

'defaults' => [ 'title' => config('app.name'), 'description' => '', 'separator' => ' | ', 'keywords' => [], 'canonical' => null, ],

Local server outputs News | AppName, live server outputs just News

@isneezy
Copy link

isneezy commented Sep 26, 2017

It seems like there is no problem with your configuration! Could you please check if your .env of your live environment has a key APP_NAME ?

@kskrlin
Copy link
Author

kskrlin commented Sep 26, 2017

No, there is no APP_NAME in my env file, but I don't use it anywhere also, I use name from config/app.php file

@kskrlin
Copy link
Author

kskrlin commented Oct 1, 2017

So, locally this works:
'defaults' => [ 'title' => config('app.name'), // set false to total remove 'description' => '', // set false to total remove 'separator' => ' | ', 'keywords' => [], 'canonical' => null, // Set null for using Url::current(), set false to total remove ],
and on the server it breaks, title from defaults is null

but when I use this configuration on server
'defaults' => [ 'title' => env('APP_NAME'), // set false to total remove 'description' => '', // set false to total remove 'separator' => ' | ', 'keywords' => [], 'canonical' => null, // Set null for using Url::current(), set false to total remove ],
it works...

I don't want to put my app name inside env, I want to keep it inside my config.app file.

What can be causing this issue, when local server doesn't produce it?
And I tried it on 2 local servers, 1 custom installed on Ubuntu and 1 on Windows using wamp.
Also the package is used on 2 different projects which are hosted by 2 different servers, so I don't think the bug is caused by the server configuration.

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

3 participants