octfx / wiki-seo

Main development on Gerrit: https://gerrit.wikimedia.org/g/mediawiki/extensions/WikiSEO.
https://www.mediawiki.org/wiki/Extension:WikiSEO
GNU General Public License v2.0
5 stars 2 forks source link

cannot set og:title #28

Closed adrelanos closed 3 years ago

adrelanos commented 3 years ago

I cannot set og:title. It is always set to the name of the wiki page.

For example wiki page wiki/NameOfWikiPage will result in:

{{#seo:
|title=Test-Title2
|description=Description is functional.
}}

It properly sets the HTML title though:

<title>Test-Title2</title>

The following does not help either:

{{#seo:
|title=Test-Title2
|og:title=Test-Title2
|description=Description is functional.
}}

Using {{DISPLAYTITLE:Test-Title2}} above or below the {{#seo: code block ​results in the bold title on top of the wiki page to show Test-Title2 as expected but og:title is ​still wrong, i.e. still <meta property=og:title content=NameOfWikiPage />.


Using:

$wgAllowDisplayTitle = true;
$wgRestrictDisplayTitle = false;
octfx commented 3 years ago

I think this is due to the following PR #19 I've pushed a fix to gerrit, I'll back merge this when all tests are run

octfx commented 3 years ago

Should be fixed in latest commit

adrelanos commented 3 years ago

Thank you!

Works for me!

Could you please merge into / backport to the 1_36 versioned branch?

octfx commented 3 years ago

Sure! Just merged to 1.36