Open CSSSchaffer opened 1 year ago
You're the second person who has reported this problem (see here). I can't reproduce on MediaWiki (1.39.2) on either Omeka/Scripto (3.2.3/1.3.0) or the most recent Omeka/Scripto (4.0.1/1.4.0), which makes it difficult for me to troubleshoot. It's even more strange that Scripto doesn't do anything particularly interesting when making an edit request against MediaWiki's API. The error seems to occur at a lower level than the API, several degrees of separation from Scripto. It's almost like this is a regression in MediaWIki.
Can you walk me through the exact steps it takes for you to get the error?
After looking at this further, the actual error is "Class MediaWiki\Content\ValidationParams
not found", not that getParentRevisionId()
is deprecated. Is it possible that you're missing the /includes/content/ValidationParams.php file?
Hey there. Actually, that was me who reported this in the Omeka forum. I took a look to make sure that we have the ValidationParams.php file and we do.
What happened before was simply that a logged in user would input some text in the transcription area of a page and upon hitting the "save" button, it would throw the error that I posted above. Here's a screen shot of what our page looks like with the URL of a logged in user.
It's good to know that it has nothing to do with the getParentRevisionID(), and that makes sense since we are able to get it working in version 1.39.1. I actually have a test / dev server of which I'm trying to recreate the error right now with Scripto 3.0 and the newest version of MediaWiki and for some reason I cannot recreate it.
I wonder, when you were on 1.39.2 could that file have been missing? Wasn't sure if that's what you checked on just now, or if you were looking at the (working) 1.39.1 install.
Also, verify that /includes/content/ValidationParams.php contains the ValidationParams
class.
Yes, both our test instance on ver 1.39.2 and the live 1.39.1 versions have the ValidationParams class and both files look the same. That's a good point, as to whether our live instance was originally missing the file. That I cannot check on now.
<?php namespace MediaWiki\Content;
use MediaWiki\Page\PageIdentity;
/**
An object to hold validation params. */ class ValidationParams { /* @var PageIdentity / private $pageIdentity;
/* @var int / private $flags;
/* @var int / private $parentRevId;
public function __construct( PageIdentity $pageIdentity, int $flags, int $parentRevId = -1 ) { $this->pageIdentity = $pageIdentity; $this->flags = $flags; $this->parentRevId = $parentRevId; }
/*
/*
/**
I am wondering if it was known that using Scripto 3.0 with the newest version of MediaWiki ver 1.39.2 throws an error when a saves a page when transcribing an object. The error pointed to not being able to retrieve getParentRevisionID() as it seems to have been depreciated. However, we noticed that Scripto is working fine with one version back, at 1.39.1.
Here's the detailed error we saw when we were using MediaWiki 1.39.2 with Scripto 3.0
[221ad65df4c74c007e0c923a] /index.php?title=15:7421:7758&action=submit Error: Class "MediaWiki\Content\ValidationParams" not found Backtrace: from /home/schaffer/wiki.schafferlibrarycollections.org/includes/Storage/PageUpdater.php(1223) #0 /home/schaffer/wiki.schafferlibrarycollections.org/includes/Storage/PageUpdater.php(1333): MediaWiki\Storage\PageUpdater->makeNewRevision(CommentStoreComment, Status) #1 /home/schaffer/wiki.schafferlibrarycollections.org/includes/Storage/PageUpdater.php(940): MediaWiki\Storage\PageUpdater->doModify(CommentStoreComment) #2 /home/schaffer/wiki.schafferlibrarycollections.org/includes/EditPage.php(2596): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer) #3 /home/schaffer/wiki.schafferlibrarycollections.org/includes/EditPage.php(1904): EditPage->internalAttemptSave(array, boolean, boolean) #4 /home/schaffer/wiki.schafferlibrarycollections.org/includes/EditPage.php(721): EditPage->attemptSave(array) #5 /home/schaffer/wiki.schafferlibrarycollections.org/includes/actions/EditAction.php(73): EditPage->edit() #6 /home/schaffer/wiki.schafferlibrarycollections.org/includes/actions/SubmitAction.php(38): EditAction->show() #7 /home/schaffer/wiki.schafferlibrarycollections.org/includes/MediaWiki.php(542): SubmitAction->show() #8 /home/schaffer/wiki.schafferlibrarycollections.org/includes/MediaWiki.php(322): MediaWiki->performAction(Article, Title) #9 /home/schaffer/wiki.schafferlibrarycollections.org/includes/MediaWiki.php(904): MediaWiki->performRequest() #10 /home/schaffer/wiki.schafferlibrarycollections.org/includes/MediaWiki.php(562): MediaWiki->main() #11 /home/schaffer/wiki.schafferlibrarycollections.org/index.php(50): MediaWiki->run() #12 /home/schaffer/wiki.schafferlibrarycollections.org/index.php(46): wfIndexMain() #13 {main}
MediaWiki\Content\ValidationParams::getParentRevisionId () depreciated since 1.38. https://doc.wikimedia.org/mediawiki-core/master/php/classMediaWiki_1_1Content_1_1ValidationParams.html#a4b5b3fc93fbb42013421d55dc245c725
We aren't able to upgrade to Scripto 4.0 yet, as we don't have Omeka 4.0 installed, but I'm wondering if this issue would be resolved in Scripto 4.0?