Jump to content

Extension talk:LastUserLogin

About this board

Archive


LastLoginuser page not showing up on Mediawiki 1.38.2

2
174.95.149.12 (talkcontribs)

Tried all three current versions of extensions 1.40,1.39 and 1.35

The version page shows the extension, but the no special page for Last user login visible under special pages section.

174.95.149.12 (talkcontribs)

Update on this: Just needed to be an administrator to view the page. My bad didn't read the full extension page.

Reply to "LastLoginuser page not showing up on Mediawiki 1.38.2"

Fatal error: Maximum execution time of 30 seconds exceeded

1
Wmat (talkcontribs)

When trying to access the LastUserLogin special page it's triggering a Fatal error: Maximum execution time of 30 seconds exceeded. Is this expected? I'd really prefer not to up the max execution time in php.ini beyond 30 seconds.

Reply to "Fatal error: Maximum execution time of 30 seconds exceeded"
Summary by Sophivorus

The removeUnusedAccounts.php script seems to have been radically changed so the patch described in the documentation doesn't seem to apply anymore. I'm removing it now.

79.119.108.241 (talkcontribs)

Under the other info section, the line that needs to be patched into removeUnusedAccounts.php cannot be found in that .php file.

Summary by Sophivorus

LastUserLogin includes extension.json since REL1_31

155.56.68.217 (talkcontribs)

For me say that is missing extension.json on wikimedia 1.28.

Resolved as follow:

My file extension.json content (most of them fields could be removed.... I just copy and adapt it from another extension):

{

"name": "LastUserLogin",

"version": "1.3",

"author": [

"Justin G. Cramer", "Danila Ulyanov", "Thomas Klein", "Felipe Schenone"

],

"url": "https://www.mediawiki.org/wiki/Extension:LastUserLogin",

"descriptionmsg": "lastuserlogin-desc",

"license-name": "GPL-2.0+",

"type": "specialpage",

"AvailableRights": [

"lastuserlogin"

],

"LogTypes": [

"lastuserlogin"

],

"LogNames": {

"lastuserlogin": "lastuserlogin-logpage"

},

"LogHeaders": {

"lastuserlogin": "lastuserlogin-logpagetext"

},

"LogActions": {

"lastuserlogin/lastuserlogin": "lastuserlogin-success-log"

},

"MessagesDirs": {

"LastUserLogin": [

"i18n"

]

},

"ExtensionMessagesFiles": {

"LastUserLoginAlias": "LastUserLogin.alias.php"

},

"AutoloadClasses": {

"LastUserLogin": "LastUserLogin.php"

},

"config": {

},

"manifest_version": 1

}

Not working with MediaWiki 1.30.0

3
SmartK (talkcontribs)

It was working with 1.29.x, maybe someone can fix this?

Error message:

Error from line 113 of /var/www/wiki/extensions/LastUserLogin/LastUserLogin.body.php: Call to undefined method User::getSkin()

Backtrace:

#0 /var/www/wiki/includes/specialpage/SpecialPage.php(522): LastUserLogin->execute(NULL)

#1 /var/www/wiki/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)

#2 /var/www/wiki/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)

#3 /var/www/wiki/includes/MediaWiki.php(851): MediaWiki->performRequest()

#4 /var/www/wiki/includes/MediaWiki.php(523): MediaWiki->main()

#5 /var/www/wiki/index.php(43): MediaWiki->run()

#6 {main}

SmartK (talkcontribs)

Seems to work with the "master" version now.

SmartK (talkcontribs)

Also working with MW 1.31.1. Thank you!

Not working with MediaWiki 1.24.0

6
Kghbln (talkcontribs)

Sadly this extension stopped working with MediaWiki 1.24.0. Does someone maintain this extension?

This post was posted by Kghbln, but signed as SmartK.

Kghbln (talkcontribs)

I am afraid that this extension is indeed unmaintained. I have marked it accordingly. Let's hope for someone to pick up maintaining it.

Kghbln (talkcontribs)

That's the reason:

PHP Fatal error: Call to undefined method Title::escapeLocalURL() in /.../extensions/LastUserLogin/LastUserLogin_body.php on line 72

Kghbln (talkcontribs)

Changing line 72 in the "LastUserLogin_body.php" file will solve the issue:

Before:

$out .= '<th><a href="' . $title->escapeLocalURL( array("order_by"=>$key, "order_type"=>$ordertype) ) . '">' . wfMsg( $value ) . '</a></th>';

After:

$out .= '<th><a href="' . htmlspecialchars( $title->getLocalURL( array( "order_by"=>$key, "order_type"=>$ordertype ) ) ) . '">' . wfMsg( $value ) . '</a></th>';

No warranty but it seems to work. This extension really needs a new maintainer and a general overhaul.

Sophivorus (talkcontribs)

I updated the extension to the latest standards and uploaded it to Gerrit. It now works on MW 1.24+

Kghbln (talkcontribs)

Oops, I did not see your post before. That's utterly cool. Thanks a ton for this!

LastUserLogin not working correctly in MediaWiki 1.27

14
Summary by Kghbln

Fixed in the repo.

DikkieDick (talkcontribs)

When using this extension in MediaWiki 1.27 a blank screen shows up and error_log says:

[Fri Sep 09 13:40:27 2016] [error] [client 10.10.10.50] PHP Fatal error:  Call to undefined method User::getSkin() in /u01/mediawiki/extensions/LastUserLogin/LastUserLogin.body.php on line 113, referer:http://10.10.10.100/index.php/Special:SpecialPages

Seems that getSkin() is deprecated. I solved this by commenting line 113 and adding a new line 113:

$userName = $row[ $key] ;

That seems to do the trick and shows the username, realname and lastlogin.

128.252.214.219 (talkcontribs)

I cannot make it working, it says extension.json is not found.

DikkieDick (talkcontribs)

You still need to use require_once and not use wfLoadExtension.

Wustldli23 (talkcontribs)

Not working for me too, tried both latest developmental version and stable version...

Harry0725 (talkcontribs)

not working in MediaWiki 1.27 for me.......

Exception encountered, of type "Error" [8e72268e138ee5de460958af] /wiki/%E7%89%B9%E6%AE%8A:%E6%9C%80%E5%BE%8C%E7%94%A8%E6%88%B6%E7%99%BB%E5%85%A5 Error from line 111 of /var/lib/mediawiki/extensions/LastUserLogin/LastUserLogin.body.php: Cannot use object of type stdClass as array

DikkieDick (talkcontribs)

Hmmm... so it's getting wrong prior to line 113. Might be a php-issue. Which PHP-version are you using?

I have

Installed software

Product Version
MediaWiki 1.27.1
PHP 5.6.17 (apache2handler)
MySQL 5.1.73

MediaWiki 1.27 requires PHP 5.5.9 or above.

This post was hidden by DikkieDick (history)
Harry0725 (talkcontribs)

I have

Installed software

Product Version
MediaWiki 1.27.0
PHP 7.0.8-0ubuntu0.16.04.2 (apache2handler)
MySQL 5.7.13-0ubuntu0.16.04.2

line111:$userPage = Title::makeTitle( NS_USER, $row[ $key ] );

I tried to comment line 111 and add $userName = $row[ $key] ;, but seems not working. It even make my wiki down.

Rrosenfeld (talkcontribs)

Same problem here with MediaWiki 1.27.1, LastUserLogin-REL1_27-403e107, Debian jessie, which means PHP 5.6.24+dfsg-0+deb8u1.

I also run into PHP Fatal error:  Cannot use object of type stdClass as array in .../ver127/extensions/LastUserLogin/LastUserLogin.body.php on line 111.

Where line 111 is

$userPage = Title::makeTitle( NS_USER, $row[ $key ] );
Rrosenfeld (talkcontribs)

I noticed that replacing all

$row[ $key ]

by

$row->$key

in LastUserLogin.body.php seems to fix the issue for me.

This results in the following patch:

--- LastUserLogin.body.php.org  2016-06-14 00:07:47.000000000 +0200
+++ LastUserLogin.body.php      2016-12-06 15:43:10.672687802 +0100
@@ -103,16 +103,16 @@
                        $out .= '<tr>';
                        foreach ( $fields as $key => $value ) {
                                if ( $key === 'user_touched' ) {
-                                       $lastLogin = $wgLang->timeanddate( wfTimestamp( TS_MW, $row[ $key ] ), true );
-                                       $daysAgo = $wgLang->formatNum( round( ( time() - wfTimestamp( TS_UNIX, $row[ $key ] ) ) / 3600 / 24, 2 ), 2 );
+                                       $lastLogin = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->$key ), true );
+                                       $daysAgo = $wgLang->formatNum( round( ( time() - wfTimestamp( TS_UNIX, $row->$key ) ) / 3600 / 24, 2 ), 2 );
                                        $out .= '<td>' . $lastLogin . '</td>';
                                        $out .= '<td style="text-align:right;">' . $daysAgo . '</td>';
                                } elseif ( $key === 'user_name' ) {
-                                       $userPage = Title::makeTitle( NS_USER, $row[ $key ] );
+                                       $userPage = Title::makeTitle( NS_USER, $row->$key );
                                        $userName = Linker::link( $userPage, htmlspecialchars( $userPage->getText() ) );
                                        $out .= '<td>' . $userName . '</td>';
                                } else {
-                                       $out .= '<td>' . htmlspecialchars( $row[ $key ] ) . '</td>';
+                                       $out .= '<td>' . htmlspecialchars( $row->$key ) . '</td>';
                                }
                        }
                        $out .= '</tr>';
Harry0725 (talkcontribs)

@Rrosenfeld, change all to $row->$key seems like working. However, I still have to disable this extension since it still makes my Parsoid down. But thanks for you.

80.138.153.40 (talkcontribs)

@Rrosenfeld Thanks, that worked for me!

Kghbln (talkcontribs)
Kghbln (talkcontribs)

Now merged on also backported to REL1_27. Manual patches are no longer necessary.

Breaks loading of skin

1
Kghbln (talkcontribs)

If this extension is installed and you set your wiki to $wgReadOnly = "This site cannot be edited."; when this extension prevents the loading of the skins incuding contents. You only see "This site cannot be edited."

This happens on MW 1.27 with REL1.27 and needs to be fixed, too.

Reply to "Breaks loading of skin"

Extension causing deadlock with Visual Editor / Parsoid

2
Divinorum ari (talkcontribs)

Not sure, if this is more problem of the Visual Editor, Parsoid or this extension, so I'm trying here. When trying to start Visual Editor, I'm ending up with following error (when LastUserLogin enabled):

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

  • Query: UPDATE `user` SET user_touched = "20160501161258" WHERE user_id = 1
  • Function: DatabaseBase::query
  • Error: 1205 Lock wait timeout exceeded; try restarting transaction (localhost)

Backtrace:

#0 /home/tomisko/Wiki/includes/db/Database.php(1076): DatabaseBase->reportQueryError('Lock wait timeo...', 1205, 'UPDATE `user` S...', 'DatabaseBase::q...', false) #1 /home/tomisko/Wiki/extensions/LastUserLogin/LastUserLogin.body.php(38): DatabaseBase->query('UPDATE `user` S...') #2 /home/tomisko/Wiki/includes/Setup.php(730): LastUserLogin::updateUserTouched() #3 /home/tomisko/Wiki/includes/WebStart.php(137): require_once('/home/tomisko/W...') #4 /home/tomisko/Wiki/load.php(32): require('/home/tomisko/W...') #5 {main}

Disabling extension is solving the problem. Could you please chek it ?

THank you.

Ivan

Harry0725 (talkcontribs)

I have VisualEditor in MW 1.27.0 with Parsoid installed.

It was working well until LastUserLogin installed..

Parsoid seems like working, but VisualEditor cannot run and showed up http 0 error.

It also make another extension "Flow" not working since it also uses Parsoid.

And YES, everything goes back to work after LastUserLogin is disabled.

Pls try to solve this if possible. Thanks!

Reply to "Extension causing deadlock with Visual Editor / Parsoid"
There are no older topics