Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

compatibility with Extension:PageImages #32

Closed
adrelanos opened this issue Jan 31, 2022 · 7 comments
Closed

compatibility with Extension:PageImages #32

adrelanos opened this issue Jan 31, 2022 · 7 comments

Comments

@adrelanos
Copy link

Please kindly consider participating here if that seems useful:
PageImages: configuration option omit og:image / compatibility with WikiSEO

@adrelanos
Copy link
Author

Could you please add these links

https://phabricator.wikimedia.org/T300587

https://github.com/octfx/wiki-seo/issues/32

to https://www.mediawiki.org/wiki/Extension:WikiSEO#Known_issues?

(I cannot edit due to IP restrictions, not even with an account with a multi years long standing non-spam history.)

@adrelanos
Copy link
Author

Alternatively in case if upstream MediaWiki isn't interested in a patch, do you think you could patch this please in WikiSEO?

  1. Is there some way to order the run of extensions so PageImages runs first and WikiSEO later.
  2. For WikiSEO to delete any previous og:image tags and to add its own?

@octfx
Copy link
Owner

octfx commented Jul 16, 2022

Could you please add these links

https://phabricator.wikimedia.org/T300587

https://github.com/octfx/wiki-seo/issues/32

to https://www.mediawiki.org/wiki/Extension:WikiSEO#Known_issues?

(I cannot edit due to IP restrictions, not even with an account with a multi years long standing non-spam history.)

I've added the links to the page

Alternatively in case if upstream MediaWiki isn't interested in a patch, do you think you could patch this please in WikiSEO?

1. Is there some way to order the run of extensions so PageImages runs first and WikiSEO later.

2. For WikiSEO to delete any previous og:image tags and to add its own?
  1. This is sadly not possible
  2. Theoretically this is doable, but will break page images on each page where WikiSEO is active

@adrelanos
Copy link
Author

Would wgPageImagesOpenGraph = false; fix this?

@octfx
Copy link
Owner

octfx commented Dec 20, 2022

This seems to be the case, yes.

With PageImagesOpenGraph set to false. PageImages will not set og:image tags.

@adrelanos
Copy link
Author

Is this a complete solution? Or does wgPageImagesOpenGraph = false; disable more than one would want?

@octfx
Copy link
Owner

octfx commented Dec 21, 2022

Looking through the source code, I'd call this a complete solution.
By setting the flag to false, this hook exits early: https://github.com/wikimedia/mediawiki-extensions-PageImages/blob/fca29f3ebeefed274695fa157e5f5fa48a2414b9/includes/PageImages.php#L292

It is the only occurrence where the flag is queried and will only disable setting any og:image tags

@octfx octfx closed this as completed Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants