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

Meta titles missing in 'page' pages #11357

Closed
gargol opened this issue Nov 8, 2019 · 1 comment · Fixed by #11358
Labels

Comments

@gargol
Copy link
Contributor

@gargol gargol commented Nov 8, 2019

Issue Summary

Page First reported in https://forum.ghost.org/t/why-do-pages-not-have-their-meta-titles-in-ghost-casper-3-0/10100;

To Reproduce

  1. Create a 'page' and publish it
  2. Visit the page frontend and the meta title is set to whatever is configured as a 'site title'

The expected title is page's title, not a generic site-wide title.

The bug is originating from this change: cbca480. The if condition was confused with general v0.1 format but was there because of legacy data shape described in detail here: #10042

Technical details:

  • Ghost Version: 3.02
  • Node Version: v10
  • Browser/OS: Chrome
  • Database: MySQL
@gargol gargol added bug themes labels Nov 8, 2019
@kevinansfield

This comment has been minimized.

Copy link
Contributor

@kevinansfield kevinansfield commented Nov 8, 2019

This should be fixed in #11068 too, there are cleaned up tests for title behaviour there

it('has correct fallbacks for context: page', function () {
localSettingsCache.title = 'My site title';
const page = {
title: 'Page title',
meta_title: 'Page meta title'
};
getTitle({page}, {context: 'page'})
.should.equal('Page meta title');
page.meta_title = '';
getTitle({page}, {context: 'page'})
.should.equal('Page title');
page.title = '';
getTitle({page}, {context: 'page'})
.should.equal('');
});
it('has correct fallbacks for context: page (v0.1)', function () {
localSettingsCache.title = 'My site title';
const post = {
title: 'Page title',
meta_title: 'Page meta title'
};
getTitle({post}, {context: 'page'})
.should.equal('Page meta title');
post.meta_title = '';
getTitle({post}, {context: 'page'})
.should.equal('Page title');
post.title = '';
getTitle({post}, {context: 'page'})
.should.equal('');
});

gargol added a commit to gargol/Ghost that referenced this issue Nov 8, 2019
closes TryGhost#11357

- Change that introduced a bug was made in cbca480
- The condition could be removed once TryGhost#10042 is resolved and is not dependent on the API version rather the object form used in the frontend.
gargol added a commit to gargol/Ghost that referenced this issue Nov 8, 2019
closes TryGhost#11357

- Change that introduced a bug was made in cbca480
- The condition could be removed once TryGhost#10042 is resolved and is not dependent on the API version rather the object form used in the frontend.
@gargol gargol closed this in #11358 Nov 8, 2019
gargol added a commit that referenced this issue Nov 8, 2019
closes #11357

- Change that introduced a bug was made in cbca480
- The condition could be removed once #10042 is resolved. It is currently not dependent on the API version rather the object form used in the frontend.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.