Jump to content

Extension talk:WikiSEO/Flow

About this board

Will it work with Mediawiki 1.35.7?

2
2001:FB1:18A:4989:64BD:EA:83DF:827A (talkcontribs)

We currently use 1.2.1 WikiSEO, but it doesn't seem to work well in templates and lack some functionality in comparison with the newer version.

Is there any way to update the extension without updating MediaWiki itself?

CayceP (talkcontribs)

I used https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/WikiSEO/+/refs/heads/REL1_35 with my 1.35.7. before without any issues. With Mediawiki 1.35+ you should be able to use WikiSEO Version 2.6.6. Since the extension does not change data tables, you can simple roll-back to a previous version of the extension by renaming the folder or deleting it. Then upload a previous version of WikiSEO, if your wiki or PHP version isn't supporteded anymore (that would be Release v2.7.0 since this one requires MW1.39+ AND PHP >= 7.4). and your wiki throwns exceptions after updating wikiSEO.

Reply to "Will it work with Mediawiki 1.35.7?"

Overwriting PageImages image ('page_image_free') seems broken

2
TaylanKammer (talkcontribs)

I was wondering why PageImages is not correctly setting the image for some pages, and after some debugging I realized that WikiSEO was simply clearing out the image set by PageImages!

I had $wgWikiSeoOverwritePageImage set to true in my LocalSettings.php, since we set an image explicitly with WikiSEO in many cases, but it seems that this is broken and just causes the 'page_image_free' property of a page to be set to the empty string.

Too tired to debug the reason right now. The regular 'image' property is being set correctly by WikiSEO, so I've no clue why it's putting an empty string into 'page_image_free' after that.

Octfx (talkcontribs)

Thanks for the report, and sorry for the delay. I've updated the code to not update page_image_free if it is empty.

The changes are present in the master branch.

Transcluding #seo via a template

2
Summary by Kghbln

Working as expected.

Kghbln (talkcontribs)

I am trying to use this extension. Adding #seo directly to a page works; when I add #seo via a template, it does not work. I do not think that this is to be expected. Probably, I am doing something wrong here. Any hint is appreciated.

Kghbln (talkcontribs)

Please disregard this post. This was some nasty caching issue. ;)

duplicated lines for 'Citation' generator ?

1
Wladek92 (talkcontribs)
Reply to "duplicated lines for 'Citation' generator ?"

Extension is causing issues with Special:RecentChanges

7
Lost Student (talkcontribs)

I've discovered that when I have $wgWikiSeoEnableAutoDescription set to true, many (but not all) page edits aren't being added to Recent Changes. For some users, most (if not all) of their edits seem to get added to Recent Changes. However, for other users, none of their edits get added to Recent Changes.

When I remove $wgWikiSeoEnableAutoDescription from LocalSettings, the problem goes away. Here is my setup information:

Installed software

Product Version
MediaWiki 1.39.5
PHP 8.1.23 (fpm-fcgi)
MariaDB 10.4.20-MariaDB-1:10.4.20+maria~buster-log
ICU 65.1

WikiSEO version: 2.6.6 (337cf52) 23:48, August 14, 2023

As far as I can tell, this problem only started after I upgraded from MW 1.39.4 to 1.39.5--however, I also updated from PHP 7.4 to 8.1 around the same time so it could've been either one of those changes that triggered the issue.

Is this a known bug? It took several days to identify because I couldn't find anything in my server logs that pointed to the problem. I had to disable each extension one-by-one until I identified $wgWikiSeoEnableAutoDescription as the cause (when I disabled WikiSEO completely, that also fixed the Recent Changes problem. But then I discovered that with WikiSEO enabled but the auto description variable not used, it also solved it).

Edit: I also want to add that if TextExtracts extension is disabled, the problem goes away. But TextExtracts appears to function properly otherwise.

Octfx (talkcontribs)

Could you change WikiSEO to use the master branch?

Wikimedia automatically creates branches for the respective MW versions, but those branches don't receive any real updates.

I have the master branch active on a 1.39.4 installation (https://star-citizen.wiki/Spezial:Version) where all edits show up on RC with the flag active.

Lost Student (talkcontribs)

I appreciate your help. I updated to 2.7.0 (337cf52) 23:48, August 14, 2023 and the problem persists. Similarly to the previous version, if I comment out $wgWikiSeoEnableAutoDescription = true; then the problem goes away.

Just for fun I also downloaded the master branch of TextExtracts (although I had to alter its extension.json for 1.39) and the problem was still there. I'm happy to try out anything else if you have any ideas. Thanks again.

Octfx (talkcontribs)

Weird, I’ll look into it!

Lost Student (talkcontribs)

Thanks. Let me know if there's anything I can do to help.

Octfx (talkcontribs)
Lost Student (talkcontribs)

Strange--the version 2.7.0 was downloaded from the Extension Distributor by selecting the master. Just now, I downloaded & installed the latest master (acf14df directly from your github link), made a test edit, and saw that it does not show up in RecentChanges. So whatever is causing the issue is still there.

Reply to "Extension is causing issues with Special:RecentChanges"

extension seems not to work inside template

1
Aloist (talkcontribs)

I have a template which is used on numerous pages (about 80'000).

The code

{{#seo:|title_mode=append|title=appended}}

inside my template seems not to work.

It works if directly in the page text.

How do I get it to work inside the template?

Reply to "extension seems not to work inside template"

author does not appear on information page

3
Tlgonline (talkcontribs)

I operate a public information website using MediaWiki 1.39.3. I recently installed the latest version of this extension. I placed wfLoadExtension('WikiSEO'); in my Local Settings file. I did not configure any of the variables in use by this extension.

Everything works great except that "author" does not appear in the "SEO properties box" contained on the information page. All the other parameters that I set appear as they should.

The relevant part of the "view page source" reads (emphasis added):

<h2 id="mw-pageinfo-header-seo"><span class="mw-headline" id="SEO_properties">SEO properties</span></h2>

<table class="wikitable mw-page-info">

<tr><td style="vertical-align: top;"><h3>Description</h3></td><td><h3>Content</h3></td></tr>

<tr><td style="vertical-align: top;"><b>Page title:</b> (<code>title</code>)<br>This attribute controls the content of the <code>&lt;title&gt;</code> element.</td><td>Texas Legal Guide</td></tr>

<tr><td style="vertical-align: top;"><b>Article author:</b> (<code>author</code>)</td><td><a href="https://texaslegalguide.com/User:Admin"></a></td></tr>

<tr><td style="vertical-align: top;"><b>Article description:</b> (<code>description</code>)<br>This attribute controls the content of the <code>description</code> and <code>og:description</code> elements.</td><td>All TLG legal content is written and/or edited by licensed Texas attorneys. Unless otherwise noted, it is available under the CC BY-NC-ND 4.0 license.</td></tr>

<tr><td style="vertical-align: top;"><b>Keywords:</b> (<code>keywords</code>)<br>This attribute controls the content of the <code>keywords</code> and <code>article:tag</code> elements.</td><td><ul><li>legal information</li><li>questions answers</li><li>attorney directory</li></ul></td></tr>

<tr><td style="vertical-align: top;"><b>Article published date:</b> (<code>published_time</code>)</td><td>02-01-2015</td></tr>

<tr><td style="vertical-align: top;"><b>Article section:</b> (<code>section</code>)</td><td>Law</td></tr>

</table>

Information from <a target="_blank" rel="noreferrer noopener" class="external text" href="https://www.mediawiki.org/wiki/Extension:WikiSEO">Extension:WikiSEO</a>

Tlgonline (talkcontribs)

Without success, I tried to review the extension code and "fix" my problem.

The problem is simply that the output<a href="https://texaslegalguide.com/User:Admin"></a> lacks any link text and therefore does not appear in the browser.

Octfx (talkcontribs)

Sorry, did not get a notification for this. Fixed in master branch!

Adding canonical URLs?

2
Summary by Octfx

Patch merged to master.

Yaron Koren (talkcontribs)

If a patch were to be created for this extension that added a parameter to #seo, enabling users to override the default "canonical URL" (the one enabled by Manual:$wgEnableCanonicalServerLink), would you be willing to add it in?

Octfx (talkcontribs)

Sure! :)

seo image is added to page, but it does not appear in application/ld+json

11
86.97.130.4 (talkcontribs)

{{#seo:

|title_mode=append
|title=sometitle
|keywords=keyword1, keyword2
|image=someimage.jpg
|site_name=sitename
|type=website
|modified_time=2022-10-30

}}

Hello, the seo image (someimage.jpg) is not appearing in the generated application/ld+json, fall back logo image appears instead.

Mediawiki 1.38

86.97.130.4 (talkcontribs)

Here my my observation on this situation after doing some tests.

It happens on images loaded from Instant Commons. I've tried it on a locally uploaded image and it works. What do you think?

BenMo31 (talkcontribs)

Hello,

I believe it might be related to another issue :


Here : https://github.com/octfx/wiki-seo/blob/master/includes/WikiSEO.php#L267

The return value of the function is always null, even though $param seems to be fine.

This causes the return value of the entire loadPagePropsFromOutputPage() function to be null, because $result ends up empty.


The call to this function is triggered because $properties is also empty here :

https://github.com/octfx/wiki-seo/blob/master/includes/WikiSEO.php#L229


Both of these calls returning empty causes $result to be empty here :

https://github.com/octfx/wiki-seo/blob/master/includes/WikiSEO.php#L107


After, that, the process continues with an empty $this->metadata, and at the next line, here :

https://github.com/octfx/wiki-seo/blob/master/includes/Hooks/PageHooks.php

empty metadata array causes the extension to revert to the default value for the image, defined in LocalSettings.php with $wgWikiSeoDefaultImage in my case.


All my other tags are also ignored, and filled with the default value.

It looks like the metadata aren't saved to (or at least retrieved anymore from) the database, without the extension being able to be backed up by the page content.

Sorry, I can't help you more than that.

If required, I'm on MW v1.38.4

Good luck Octfx :)

BenMo31 (talkcontribs)

I can confirm there is an issue when the metadata are supposed to be inserted in the database.


On an older page, the data were perfectly retrieved from the DB, but as soon as I tried to update the content of the SEO tag, I started to see empty arrays, and the default values for this page too.

86.97.0.62 (talkcontribs)

I've tried it on: MW 1.38.4, 1.38.4.0, 1.35.8, all of them are having the same behavior.

Thank you BenMo31 for clarifying the source cause of that.

92.99.201.84 (talkcontribs)

is it solved?

Octfx (talkcontribs)

Sorry, I did not get any notifications for this.

This issue seems to be fixed on the current master branch. Setting an image through |image sets a correct ImageObject in the json+ld output.

5.192.130.122 (talkcontribs)

Well, I'll try and let you know.

2001:8F8:1D53:85E6:EC60:3349:6430:D680 (talkcontribs)

The problem arises when the image is not locally hosted but instead located on commons.

Octfx (talkcontribs)

This should now be fixed in the master branch

2001:8F8:1D5B:C61C:1D17:7FFB:D008:4DFB (talkcontribs)

This is fixed, done.

Summary by Octfx

Fixed

Thomas-topway-it (talkcontribs)

I think there is an error in the file Validator.php and MetaTag.php, change "google_bot" to "googlebot"

Octfx (talkcontribs)

Fixed in master!