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

Logo in Schema is not generated as URL or ImageObject #11304

Closed
aslamabbas opened this issue Oct 30, 2019 · 4 comments · Fixed by #11826
Closed

Logo in Schema is not generated as URL or ImageObject #11304

aslamabbas opened this issue Oct 30, 2019 · 4 comments · Fixed by #11826
Labels
bug [triage] something behaving unexpectedly help wanted [triage] Ideal issues for contributors to help with pinned [triage] Ignored by stalebot

Comments

@aslamabbas
Copy link

Hi Ghost team,

Having issues with schema generation.

Steps to reproduce:

  1. Visit this link to see the error - https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fcollect.chat%2Fblog%2Fsee-how-this-web-scraping-platform-datahut-is-collecting-their-leads%2F

You can see the schema error for the Publication Logo as "A value for the url field is required".

  1. Resolution of image used for Publication Logo is 600x135 - https://collect.chat/blog/content/images/2019/10/600x135.png

Ghost version is 3.0.1

@naz naz added bug [triage] something behaving unexpectedly themes labels Oct 30, 2019
@naz
Copy link
Member

naz commented Oct 30, 2019

@stale
Copy link

stale bot commented Jan 28, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale [triage] Issues that were closed to to lack of traction label Jan 28, 2020
@naz naz added pinned [triage] Ignored by stalebot and removed stale [triage] Issues that were closed to to lack of traction labels Jan 28, 2020
@naz naz added the help wanted [triage] Ideal issues for contributors to help with label Feb 20, 2020
@uksitebuilder
Copy link

Still a problem with this

daniellockyer pushed a commit that referenced this issue Mar 3, 2020
refs #11304

- Previously the schema publisher logo attribute was incorrectly given the logo url
- schema.org and Google's docs show the logo needing it's own type and url attributes
- I added the correct @type and moved the metaData.site.logo to the new url attribute
- This change now clears the error in Google's Structured Data tester
- A future improvement would be to size the site logo to 60px in height per Google's recommendation
@aileen
Copy link
Member

aileen commented May 20, 2020

This was fixed, and therefore closed, but the fix had an issue with duplicating the url property.
The fix got reverted with 7ac6140 which legitimates this issue to be re-opened.

The correct fix would be a mix of both. Will open a PR in a min.

@aileen aileen reopened this May 20, 2020
aileen added a commit that referenced this issue May 20, 2020
closes #11304

- Google requires an `ImageObject` to be always returned for `publisher.logo` (https://developers.google.com/search/docs/data-types/article)
- The previous fix 3f5daa6 added a second nested `url` error and got therefore reverted with 7ac6140
- This commit updates the image object generation fn to **always** return an `ImageObject` with minimum of `url` and `@type` properties. If dimensions are available, we'll pass those in there as well
aileen added a commit that referenced this issue May 20, 2020
closes #11304

- Google requires an `ImageObject` to be always returned for `publisher.logo` (https://developers.google.com/search/docs/data-types/article)
- The previous fix 3f5daa6 added a second nested `url` error and got therefore reverted with 7ac6140
- This commit updates the image object generation fn to **always** return an `ImageObject` with minimum of `url` and `@type` properties. If dimensions are available, we'll pass those in there as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [triage] something behaving unexpectedly help wanted [triage] Ideal issues for contributors to help with pinned [triage] Ignored by stalebot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants