Jump to content

Topic on Extension talk:BlogPage/Flow

Error creating Blog posts (not sure if this should go in social) [1.34]

4
Vapblack (talkcontribs)

Greetings.


So I've recently upgraded my mediawiki and have been overhauling a lof of the backend.

When trying to get the social extentions up again everything looks good until I do one of two things

1: if I load the extensions that I use-

wfLoadExtension( 'BlogPage' );

wfLoadExtension( 'Comments' );

wfLoadExtension( 'VoteNY' );


and I try to look at any of the blogs I previously made I get the following error:

Database error (page title)


A database query error has occurred. This may indicate a bug in the software.

[f655cda325d32fdaad3b57a0] /afropedia/Blog:Life_on_The_Open-Air_Plantation_Aint_Equal Wikimedia\Rdbms\DBQueryError from line 1603 of /var/www/worldafropedia/wiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT Comment_Username,Comment_IP,Comment_Text,Comment_Date,Comment_Date AS timestamp,Comment_user_id,CommentID,Comment_Parent_ID,vote1.Comment_Vote_Score AS current_vote,SUM(vote2.Comment_Vote_Score) AS comment_score,stats_total_points FROM `user_stats` LEFT JOIN `Comments` ON ((Comment_user_id = stats_user_id)) LEFT JOIN `Comments_Vote` `vote1` ON ((vote1.Comment_Vote_ID = CommentID) AND vote1.Comment_Vote_Username = 'Kofi') LEFT JOIN `Comments_Vote` `vote2` ON ((vote2.Comment_Vote_ID = CommentID)) WHERE Comment_Page_ID = '19004' GROUP BY CommentID

Function: CommentsPage::getComments

Error: 1054 Unknown column 'stats_user_id' in 'on clause' (localhost)


If I try to make a new blog post I get:

[013afee92b964d8e9669368f] /afropedia/Special:CreateBlogPost TypeError from line 142 of /var/www/worldafropedia/wiki/includes/page/WikiPage.php: Argument 1 passed to WikiPage::factory() must be an instance of Title, null given, called in /var/www/worldafropedia/wiki/extensions/BlogPage/includes/specials/SpecialCreateBlogPost.php on line 105

Backtrace:


2: if I disable everything except BlogPage:



and I try to look at any of the blogs I previously made, I the load.


If I try to make a new blog post I get:

[ba6d8b074deed09cf90d9a9a] /afropedia/Special:CreateBlogPost TypeError from line 142 of /var/www/worldafropedia/wiki/includes/page/WikiPage.php: Argument 1 passed to WikiPage::factory() must be an instance of Title, null given, called in /var/www/worldafropedia/wiki/extensions/BlogPage/includes/specials/SpecialCreateBlogPost.php on line 105




Jack Phoenix (talkcontribs)

This is related to the recent changes related to actor support in all social tools. The correct solution here is to upgrade your copy of SocialProfile (and/or any and all other social tools you have, e.g. BlogPage, Comments, VoteNY), to the latest (master) version and rerun maintenance/update.php, the MediaWiki core updater script, after doing that. Note that:

  1. you may want to make a backup of your database prior to doing this, just in case, for there are some scary internal changes
  2. currently social tools support only MediaWiki 1.34; older versions of MW are considered unsupported and newer ones may or may not work (but it doesn't matter because MW 1.35 hasn't been released yet)
Vapblack (talkcontribs)

Thanks for your reply. I uploaded the new extensions and ran the maintenance/update.php and the same errors are there.

I can only *see* old blog posts if I disable every social extension but BlogPage, and I can't post a new blog entry under any circumstances.



___________________________________


EDIT: Actually, I realized I didn't download the master files, so I just did that, reuploaded, ran php update.php and got the following:

...user_system_messages table already exists.

...user_points_weekly table already exists.

...user_points_monthly table already exists.

...user_points_archive table already exists.

...user_stats table does not contain stats_year_id field.

...user_profile table does not contain up_last_seen field.

...Comments table already exists.

...Comments_Vote table already exists.

...Comments_block table already exists.

Adding Comment_actor field to table Comments ...done.

Adding index wiki_actor to table Comments ...done.

Running /var/www/worldafropedia/wiki/extensions/Comments/includes/../sql/../maintenance/migrateOldCommentsUserColumnsToActor.php...

done.

Table Comments contains Comment_user_id field. Dropping ...done.

Table Comments contains Comment_Username field. Dropping ...done.

...wiki_user_id key doesn't exist.

...wiki_user_name key doesn't exist.

Adding cb_actor field to table Comments_block ...done.

Adding cb_actor_blocked field to table Comments_block ...done.

Adding index cb_actor to table Comments_block ...done.

Running /var/www/worldafropedia/wiki/extensions/Comments/includes/../sql/../maintenance/migrateOldCommentsBlockUserColumnsToActor.php...

done.

Table Comments_block contains cb_user_id field. Dropping ...done.

Table Comments_block contains cb_user_name field. Dropping ...done.

Table Comments_block contains cb_user_id_blocked field. Dropping ...done.

Table Comments_block contains cb_user_name_blocked field. Dropping ...done.

...cb_user_id key doesn't exist.

Adding Comment_Vote_actor field to table Comments_Vote ...done.

Adding index Comments_Vote_actor_index to table Comments_Vote ...Wikimedia\Rdbms\DBQueryError from line 1603 of /var/www/worldafropedia/wiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: CREATE UNIQUE INDEX Comments_Vote_actor_index ON `Comments_Vote` (Comment_Vote_ID,Comment_Vote_actor)

Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/worldafropedia/wiki/extensions/Comments/includes/../sql/patches/actor/add-Comment_Vote_unique_actor_index.sql )

Error: 1062 Duplicate entry '1-0' for key 'Comments_Vote_actor_index' (localhost)


after disabling comments, I ran the updater again and there were no errors.


Still same same inability to create new blog posts though


EDIT2: After deleting the extensions and downloading the master versions and installing them again, everything worked save for creating a new blog entry. The error involved VOTENY, so I downloaded the 1.34 stable version (1a78517 of the VoteNY extension for MediaWiki REL1_34 ) After that, almost everything is good.

One small problem though, my old blog entries dont say who created them.

at the top, they simply say by created 14:50, March 2, 2019 , last edited 21:54, March 2, 2019

whereas the new blog post I just made say:

by Vapblack created 16:05, February 1, 2020

thanks for the help

Jack Phoenix (talkcontribs)

Well, using the release branches (instead of master) of the social tools extensions is simply not supported, so you're on your own in that regard, I'm afraid. The existence of those branches is problematic because they are created automatically by the people handling MediaWiki releases, but I don't maintain them, so they are guaranteed to be outdated literally 100% of the time, so it's pure luck if they work or not.

Anyway, back to the original issue...

Seems like you've managed to find a tricky and annoying bug with the actor migration scripts: the Comments' migration scripts (and same for other social tools extensions, I'm afraid) don't handle a particular edge case at all. In this case, the edge case is "(anonymous) user has posted a comment (or comments) but has not performed any other actions on the wiki". The migration scripts incorrectly assume that there is a corresponding entry for every user in the actor table; but in this edge case, this isn't necessarily the case. The scripts should be able to identify these cases and create actor entries when those entries don't yet exist, but currently that is unfortunately not the case. I can't promise you a definitive ETA, but I'm hoping to get this fixed during March 2020 if not sooner.

Reply to "Error creating Blog posts (not sure if this should go in social) [1.34]"