Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.39.1 to 1.39.8 Errors #456

Open
fishpeopleapps opened this issue Nov 8, 2024 · 5 comments
Open

1.39.1 to 1.39.8 Errors #456

fishpeopleapps opened this issue Nov 8, 2024 · 5 comments
Labels
question Further information is requested

Comments

@fishpeopleapps
Copy link

We're attempting to upgrade to 1.39.8 using a hardened Canasta Image via Docker in a Kubernetes Container. We got it to finally go through in our staging environment, with the below new presenting errors:

CommentStreams Internal Error
When attempting to delete or edit the action cannot be completed and this internal error pops up:

TypeError at /var/www/mediawiki/w/includes/dao/DBAccessObjectUtils.php
from /var/www/mediawiki/w/includes/dao/DBAccessObjectUtils.php(36)
0 /var/www/mediawiki/w/includes/dao/DBAccessObjectUtils.php(53): DBAccessObjectUtils::hasFlags()
1 /var/www/mediawiki/w/includes/page/WikiPageFactory.php(133): DBAccessObjectUtils::getDBOptions()
2 /var/www/mediawiki/w/includes/api/ApiBase.php(1057): MediaWiki\Page\WikiPageFactory->newFromID()
3 /var/www/mediawiki/w/canasta-extensions/CommentStreams/includes/ApiCSCommentBase.php(57): ApiBase->getTitleOrPageId()
4 /var/www/mediawiki/w/includes/api/ApiMain.php(1904): MediaWiki\Extension\CommentStreams\ApiCSCommentBase->execute()
5 /var/www/mediawiki/w/includes/api/ApiMain.php(879): ApiMain->executeAction()
6 /var/www/mediawiki/w/includes/api/ApiMain.php(850): ApiMain->executeActionWithErrorHandling()
7 /var/www/mediawiki/w/api.php(90): ApiMain->execute()
8 /var/www/mediawiki/w/api.php(45): wfApiMain()
9 {main}

Semantic MediaWiki
When enabled has an "upgrade key error." I used the online updater which seems to have worked (not for SMW but our database updated). I would like to run the setupStore maintenance script but unsure of how to do this via a Dockerfile.

Moving a Page Internal Error
When attempting to move a page this internal error pops up:
/w/index.php?title=Special:MovePage&action=submit LogicException: This ParserOutput contains no text!
But it does work if you deselect the box 'Leave a redirect behind'

MW Version Question
Also, I watched the State of Canasta video at the recent conference, and MW 1.39.1 was referenced, and I see a recent commit from 1.39.8 to 1.39.1. What does this mean?

@fishpeopleapps fishpeopleapps added the question Further information is requested label Nov 8, 2024
@yaronkoren
Copy link
Member

Here are my thoughts on each of these:

  • CommentStreams problem - I've never actually used CommentStreams, so I can't say for sure; but I looked briefly through the code, and this change, from February 2023, seems very much like a fix for the problem you described. So maybe the CommentStreams version in Canasta just needs to be upgraded.
  • Semantic MediaWiki problem - ah, the dreaded "upgrade key error". I've gotten that when I hadn't fully set up SMW - although the name of the error message made it quite a bit more confusing than it needed to be. I thought Canasta already fully set up SMW, but maybe not. Do you know how to get into the Docker container?
  • Page moving error - I don't know. Does this happen for only certain namespaces, or for any page?
  • Version question - the version being talked about was 1.39.10, which is very different from 1.39.1. Version numbers are not like regular numbers. :)

@fishpeopleapps
Copy link
Author

CommentStreams - ahh thank you for pointing that out! I will make sure I look at the extensions repo's first next time. How do I facilitate that change with Canasta, how/where do I find the commit reference that's used in the extensions.yaml file?

I can't get into our docker container. We are unable to use kubectl and while I can pull down the image and run the commands locally I can't push those to the staging environment from docker. Did running the setupStore and/or update maintenance script work for you to resolve the SMW issue?

Page Moving Error - it happens for all namespaces, even files.

Version - That makes sense, thank you for the clarification!

@yaronkoren
Copy link
Member

Hi -

  • CommentStreams: see here for the log for CommentStreams branch REL1_39, which is what Canasta is using. The current revision being used, 274bb10, is visible there; and thankfully the getTitleOrPageId() fix is in REL1_39, though under a different revision ID than in master: 8347a7e. If you can confirm that the code works better under 8347a7e (or a later revision), I think we'll be happy to make the upgrade.
  • I've only seen that SMW "upgrade key error" on non-Canasta wikis, I think. To get into the Docker container, you first need to list the containers currently running, to find the right ID - call sudo docker ps -a for that. The correct ID has "web" in its name, I believe. Then, call sudo docker exec -it ContainerIDHere sh. After that, hopefully you'll be in the container, where you can call any script...
  • Just to clarify: does attempting to move any page - while leaving the old name as a redirect - always lead to that error message?

@fishpeopleapps
Copy link
Author

Hello!
CommentStreams - I made the changes in that commit (changing the frommasterdb to fromdbmaster in the 2 files) by using sed -I -e in my Dockerfile. It worked successfully!

SMW - I am unable to run commands like that in our container/our environment. But! I did figure out that I have to run update.php every time our container starts, this solves the error.

Yes, moving any page in any namespace and leaving a redirect always leads to that error. This actually occurred prior to the update to 1.39.8, it was present in 1.39.1 as well.

Thank you for your help! We're pushing to production soon with the new image!

yaronkoren added a commit that referenced this issue Nov 20, 2024
The previous version caused an error when editing or deleting comments; see #456.
yaronkoren added a commit that referenced this issue Nov 20, 2024
The previous version caused an error when editing or deleting comments; see #456.
@yaronkoren
Copy link
Member

That's great that the CommentStreams update worked! The revision is now updated in the main Canasta code as well.

It's very strange that SMW requires update.php to be run every time... but good to know. And I'm glad you found a fix.

For the move-with-redirect bug: I did a web search on that error message, and found this. Are you using the Lingo extenson? If so, it sounds like another upgrade is in order: please try upgrading Lingo to this revision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants