Jump to content
MediaWiki

Extension talk:GetUserName/Archive 2/Flow export

Add topic
From mediawiki.org
Latest comment: 1 year ago by Loizbec in topic if connected...
This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made.

--> Archived talk

Error: Call to undefined method Parser::disableCache()

[edit ]
Latest comment: 4 years ago 2 comments2 people in discussion

In MediaWiki 1.36.1 and GetUserName 2.0 I'm getting following error:

3b897e77d47c7339897b8fa] /wiki/index.php?title=PageTitle&action=submit Error: Call to undefined method Parser::disableCache()
Backtrace:
from /var/www/html/extensions/GetUserName/GetUserName.class.php(32)
#0 /var/www/html/includes/parser/Parser.php(3356): MediaWiki\Extension\GetUserName\GetUserName::magic(Parser, string)
#1 /var/www/html/includes/parser/Parser.php(3041): Parser->callParserFunction(PPFrame_Hash, string, array)
#2 /var/www/html/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPFrame_Hash)
#3 /var/www/html/includes/parser/Parser.php(2879): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#4 /var/www/html/includes/parser/Parser.php(1549): Parser->replaceVariables(string)
#5 /var/www/html/includes/parser/Parser.php(639): Parser->internalParse(string)
#6 /var/www/html/includes/content/WikitextContent.php(375): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)
#7 /var/www/html/includes/content/AbstractContent.php(591): WikitextContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)
#8 /var/www/html/includes/EditPage.php(4238): AbstractContent->getParserOutput(Title, NULL, ParserOptions)
#9 /var/www/html/includes/EditPage.php(4143): EditPage->doPreviewParse(WikitextContent)
#10 /var/www/html/includes/EditPage.php(2920): EditPage->getPreviewText()
#11 /var/www/html/includes/EditPage.php(726): EditPage->showEditForm()
#12 /var/www/html/includes/actions/EditAction.php(71): EditPage->edit()
#13 /var/www/html/includes/actions/SubmitAction.php(38): EditAction->show()
#14 /var/www/html/includes/MediaWiki.php(531): SubmitAction->show()
#15 /var/www/html/includes/MediaWiki.php(315): MediaWiki->performAction(Article, Title)
#16 /var/www/html/includes/MediaWiki.php(913): MediaWiki->performRequest()
#17 /var/www/html/includes/MediaWiki.php(546): MediaWiki->main()
#18 /var/www/html/index.php(53): MediaWiki->run()
#19 /var/www/html/index.php(46): wfIndexMain()
#20 {main}

Is there a way to work around this? Onandonandonandon (talk) 07:49, 14 September 2021 (UTC) Reply

Hello, this should have been fixed in the latest version. Tinss (talk) 06:01, 3 January 2022 (UTC) Reply

Warnings appear when using

[edit ]
Latest comment: 4 years ago 2 comments2 people in discussion

<br/>

<b>Deprecated</b>

: Use of $wgUser was deprecated in MediaWiki 1.35. [Called from Parser::callParserFunction in /var/www/html/includes/parser/Parser.php at line 3407] in

<b>/var/www/html/includes/debug/MWDebug.php</b>

on line

<b>375</b>

<br/>

<br/>

<b>Deprecated</b>

: $wgUser reassignment detected [Called from Parser::callParserFunction in /var/www/html/includes/parser/Parser.php at line 3407] in

<b>/var/www/html/includes/debug/MWDebug.php</b>

on line

<b>375</b>

<br/> Khavwiki (talk) 02:24, 25 December 2021 (UTC) Reply

Hello, this should have been fixed in the latest version. Tinss (talk) 06:00, 3 January 2022 (UTC) Reply

if connected...

[edit ]
Latest comment: 1 year ago 3 comments2 people in discussion

Hi, I have developed for my personal needs an extension that gets the user name, but that also allows to display different content for logged in users vs anonymous users.

When I updated from MW 1.35 to MW 1.42 (!!!), I relied pretty heavily on your work to correct my extension (which is not mature enough for sharing: as far as mw is concerned I don't code, I tweak ;) ). > https://gitlab.liris.cnrs.fr/mloiseau/mw_connected

I'm not sure it is of any interest to you, but if you want to merge our work, we can. Loizbec (talk) 10:18, 2 October 2024 (UTC) Reply

Salut ! Merci pour le partage !
Adding a parser function to indicate if a user is connected (anonymous or not in fact) could be useful. I suppose having a different stylesheet could be handy as well.
I could add those features ? Or maybe you can do a pull request on github ?
It however does not make sense to have this extension tweak the sidebar.
Let me know. Tinss (talk) 04:11, 9 October 2024 (UTC) Reply
The sidebar tweak was for my needs as I added links to many namespaces for logged-in users, and I don't want external users to see them as they won't have access to the rest.
But I agree, that this should not be default behavior. It could be a parameter in the LocalSettings.php.
I've got a lot of work these days, and I still need to work out a few things. When they work, I'll do a pull request :-) Loizbec (talk) 09:23, 9 October 2024 (UTC) Reply

AltStyle によって変換されたページ (->オリジナル) /