Extension talk:WikiSEO
Latest comment: 2 days ago by Abhidevananda in topic Extension not working in PHP8.2.26 on MW1.42.3
Archives
|
---|
Extension not working in PHP8.2.26 on MW1.42.3
editAfter upgrade I find that image files are no longer retrieved by social media apps. Is this due to PHP8 having deprecated short_open_tag? Or is there some other issue? Abhidevananda (talk) 04:50, 18 December 2024 (UTC)
- @Abhidevananda: What metadata is found, e.g. with a tool like https://www.opengraph.xyz/ ? Can you share a URL of your site? Sam Wilson 10:40, 18 December 2024 (UTC)
- Thanks, Sam. What it picks up does not match what the WikiSEO is giving. For example, at https://sarkarverse.org/wiki/Tomay_ami_nahi_jani the WikiSEO info is:
- {{#seo:|image=https://sarkarverse.org/200fb/200px_Bulbul.png%7Cimage_width=200%7Cimage_height=200}}
- But what opengraph reads is:
- <meta property="og:image" content="https://sarkarverse.org/SVLogo.png">
- <meta name="twitter:image" content="https://sarkarverse.org/SVLogo.png"> Abhidevananda (talk) 10:54, 18 December 2024 (UTC)
- @Abhidevananda: Is the SVLogo.png the one you've got set as the default in LocalSettings.php? Because it looks like maybe it's not reading the one you're setting on that page at all. I've been trying to test locally and have hit a deprecation issue, not sure if that's related: phab:T382406. Do you have anything related in your web server error logs? Sam Wilson 11:16, 18 December 2024 (UTC)
- (e.g. does it work if you remove the 'description' field?) Sam Wilson 11:17, 18 December 2024 (UTC)
- Sam, thanks for your effort to resolve the problem. That image (SVLogo.png) is the site logo, and - yes - it is mentioned in localsettings. But WikiSEO worked fine in my previous version of MW. Now it is not working. And, to answer your last question, removing the 'description' field has no impact. Abhidevananda (talk) 11:36, 18 December 2024 (UTC)
- My uninformed - layman's - guess would be that the extension is either not compatible with the latest MW version or PHP 8.2.26. I could speculate further... things about open_tag and short_open_tag and possibly resolving the issue by editing php.ini to enable short_open_tag... but I would be venturing way outside my depth. I simply want to solve the problem. Abhidevananda (talk) 11:47, 18 December 2024 (UTC)
- @Abhidevananda: I have it running on the latest versions of MediaWiki and WikiSEO. What makes you think it's related to short_open_tag? Sam Wilson 11:50, 18 December 2024 (UTC)
- @Samwilson: Like I said, out of my depth. Might have heard about short_open_tag after installing the extension. But it is very encouraging that WikiSEO works for you with the same MW version. And are you also using PHP 8.2.26? Abhidevananda (talk) 11:53, 18 December 2024 (UTC)
- No, 8.3.6. Sam Wilson 12:00, 18 December 2024 (UTC)
- @Samwilson In that case, it is rather odd that this is not working on my site. What could be causing the problem? Abhidevananda (talk) 13:10, 18 December 2024 (UTC)
- No, 8.3.6. Sam Wilson 12:00, 18 December 2024 (UTC)
- @Samwilson: Like I said, out of my depth. Might have heard about short_open_tag after installing the extension. But it is very encouraging that WikiSEO works for you with the same MW version. And are you also using PHP 8.2.26? Abhidevananda (talk) 11:53, 18 December 2024 (UTC)
- @Abhidevananda: I have it running on the latest versions of MediaWiki and WikiSEO. What makes you think it's related to short_open_tag? Sam Wilson 11:50, 18 December 2024 (UTC)
- My uninformed - layman's - guess would be that the extension is either not compatible with the latest MW version or PHP 8.2.26. I could speculate further... things about open_tag and short_open_tag and possibly resolving the issue by editing php.ini to enable short_open_tag... but I would be venturing way outside my depth. I simply want to solve the problem. Abhidevananda (talk) 11:47, 18 December 2024 (UTC)
- Sam, thanks for your effort to resolve the problem. That image (SVLogo.png) is the site logo, and - yes - it is mentioned in localsettings. But WikiSEO worked fine in my previous version of MW. Now it is not working. And, to answer your last question, removing the 'description' field has no impact. Abhidevananda (talk) 11:36, 18 December 2024 (UTC)
- (e.g. does it work if you remove the 'description' field?) Sam Wilson 11:17, 18 December 2024 (UTC)
- @Abhidevananda: Is the SVLogo.png the one you've got set as the default in LocalSettings.php? Because it looks like maybe it's not reading the one you're setting on that page at all. I've been trying to test locally and have hit a deprecation issue, not sure if that's related: phab:T382406. Do you have anything related in your web server error logs? Sam Wilson 11:16, 18 December 2024 (UTC)
┌─────────────────────────────────┘
@Abhidevananda: I'm not sure. The only thing I could think of was that the manualDescriptin issue was stopping it from saving the page props. When you removed the description did you purge the cache to make sure you were seeing the latest HTML? But other than that it should all be fine as far as I can see.
With your wikitext I get the following HTML:
<meta property="og:title" content="Testing">
<meta property="og:site_name" content="Dev wiki1">
<meta property="og:url" content="http://localhost/wikimedia/wiki1/Testing">
<meta property="og:description" content="Song by Prabhat Ranjan Sarkar">
<meta property="og:image" content="https://sarkarverse.org/200fb/200px_Bulbul.png">
<meta property="og:image:width" content="200">
<meta property="og:image:height" content="200">
<meta property="article:tag" content="Prabhat Samgiita,Prabhata Samgiita,Prabhat Ranjan Sarkar,Anandamurti,Ananda Marga,Contemplation">
<meta property="article:modified_time" content="2024-12-19T04:34:45Z">
<meta property="article:published_time" content="2024-12-19T04:34:45Z">
Sam Wilson 04:38, 19 December 2024 (UTC)
- @Samwilson Sorry, even after removing both Keywords and Description, I don't see any change at opengraph.xyz or Facebook or Twitter. They all pick up SVlogo.png and not 200px_Bulbul.png. As opengraph correctly picks up the og:description meta property from WikiSEO, this suggests to me that it is only the og:image meta property that is broken for me... but I don't know why or, more important, how to fix it. Abhidevananda (talk) 13:10, 19 December 2024 (UTC)