Extension talk:PageInfo/Flow

About this board

Does anyone still use this?

3
103.39.136.65 (talkcontribs)

Does anyone still use this extension or is there something else or some wiki core I can enable?

Trying to install this on a MediaWiki 1.25.1 and it's not working.

Firstly had to comment out all the "wfLoadExtensionMessages ('PageInfo');" lines as that is deprecated and it was breaking my wiki. Is there something else I should do?

Secondly tried all the edits listed on the install page (why aren't they in the GIT considering 1.18 was a looooong time ago?) but they also contain some functions etc that were breaking my wiki.

Is this extension still supported (I see similar Info boxes everywhere)?

Can anyone help me get it working?

103.39.136.65 (talkcontribs)

Went through and pasted in the edits in one by one testing my wiki in between each edit.

Found the last edit...

Replace the if-statement:

if( $wgArticle === null || 
    $this->pi_MagicWordMatchedInArticle || 
    !$wgArticle->exists() || 
    !in_array( $ns, $wgPI_Namespaces ) || 
    $action == 'edit' ) 

With

if( !$context->canUseWikiPage() ||
    $this->pi_MagicWordMatchedInArticle ||
    !in_array( $ns, $wgPI_Namespaces ) ||
    $action == 'edit' )

..is what breaks it. I get this error.

Fatal error: Class 'Database' not found in ...\mediawiki\extensions\PageInfo\PageInfo.php on line 146

PageInfo.php line 146 is: $db = new Database;

123.3.9.239 (talkcontribs)

bump

Reply to "Does anyone still use this?"

Page Info position on page selectable?

1
192.166.53.200 (talkcontribs)

Is it possible to move PageInfo to bottom?

Reply to "Page Info position on page selectable?"

PageInfo invisible by default ?

1
192.166.53.200 (talkcontribs)

is it possible to get "PageInfo" invisible by default and to display the box only by some pages using a special wiki syntax? Gerd

Reply to "PageInfo invisible by default ?"

An apostrophe in the name causes an SQL error

2
Skew (talkcontribs)

Using PageInfo, if I navigate to page "User's Guide", I'll get this error message in the browser window:

Database error
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
(SQL query hidden)
from within function "". Database returned error "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's_Guide' AND wl_namespace = 0' at line 3 (localhost)".


The Fix - Find these lines:

// Total watchers
$pi_sql = "
SELECT COUNT( * )
FROM " . $db->tableName( 'watchlist' ) . "
WHERE wl_title = '" . $wgTitle->getDBkey() . "'
AND wl_namespace = " . $wgTitle->getNamespace();
$pi_Watcher_SQL = $dbr->fetchRow( $dbr->query( $pi_sql ) );
$pi_Watcher = $this->pi_CreateEntry( wfMsgHTML( 'paramWatcher' ), $pi_Watcher_SQL[0] );
$pi_Container .= $pi_Watcher;

and modify to this:

// Total watchers
$convertedKey =
  mysql_real_escape_string( $wgTitle->getDBkey() );
$pi_sql = "
SELECT COUNT( * )
FROM " . $db->tableName( 'watchlist' ) . "
WHERE wl_title = '" . $convertedKey . "'
AND wl_namespace = " . $wgTitle->getNamespace();
$pi_Watcher_SQL = $dbr->fetchRow( $dbr->query( $pi_sql ) );              
$pi_Watcher = $this->pi_CreateEntry( wfMsgHTML( 'paramWatcher' ), $pi_Watcher_SQL[0] );
$pi_Container .= $pi_Watcher;
Jeroen De Dauw (talkcontribs)

Looks like $db->select() should be used here.

Reply to "An apostrophe in the name causes an SQL error"

Moving the code to the WMF repository

1
Jeroen De Dauw (talkcontribs)

If you move the code to the WMF repository, it can be:

  • properly internationalized via translatewiki.net
  • reviewed by other contributors
  • easily be patched by other people with access

See here for requesting commit access.

Reply to "Moving the code to the WMF repository"
There are no older topics
Return to "PageInfo/Flow" page.