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.
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.
Update on this: Just needed to be an administrator to view the page. My bad didn't read the full extension page.
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.
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.
Under the other info section, the line that needs to be patched into removeUnusedAccounts.php cannot be found in that .php file.
LastUserLogin includes extension.json since REL1_31
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 }
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}
Sadly this extension stopped working with MediaWiki 1.24.0. Does someone maintain this extension?
I am afraid that this extension is indeed unmaintained. I have marked it accordingly. Let's hope for someone to pick up maintaining it.
That's the reason:
PHP Fatal error: Call to undefined method Title::escapeLocalURL() in /.../extensions/LastUserLogin/LastUserLogin_body.php on line 72
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.
Fixed in the repo.
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.
Not working for me too, tried both latest developmental version and stable version...
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
I have
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.
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 ] );
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>';
@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.
I have created the following patch set for this: https://gerrit.wikimedia.org/r/349431
This needs to be backported to REL1_27 and REL1_28 but it is a start.
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.
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.
DatabaseBase::query
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
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!