There's two issues I'm having after upgrading from 1.16.5 to 1.18.0:
1. Some people (including me) had included "DatabaseFunctions.php" in their extensions, for example by doing: include_once './extensions/DatabaseFunctions.php';
1.17 took that file out (file: History): === Configuration changes in 1.17 === * DatabaseFunctions.php that was needed for compatibility with pre-1.3 extensions has been removed.
I was using the database functions for example: $my_query = wfQuery($this_query, DB_WRITE);
I can fix that temporarily by copying that file and using it but I want to work with whatever is "new" now so I dont use any old methods.
2. I'm also getting this in a few extensions: Fatal error: Call to a member function addMessage() on a non-object in [...]/extensions/MetaDescriptionTag.php on line 72
That function is being used like this: $wgMessageCache->addMessage
Anyone know any workarounds? I'm going to work on it in any case in the next few days and will report back if I'm successful.
On Sun, 04 Dec 2011 20:03:38 -0800, Eric K ek79501@yahoo.com wrote:
There's two issues I'm having after upgrading from 1.16.5 to 1.18.0:
- Some people (including me) had included "DatabaseFunctions.php" in
their extensions, for example by doing: include_once './extensions/DatabaseFunctions.php';
1.17 took that file out (file: History): === Configuration changes in 1.17 ===
- DatabaseFunctions.php that was needed for compatibility with pre-1.3
extensions has been removed.
I was using the database functions for example: $my_query = wfQuery($this_query, DB_WRITE);
Grab the master database for writes with $dbw = wfGetDB( DB_MASTER ); You 'can' do a query on that using $dbw->query( $this_query ); However I DO NOT recommend you just start throwing raw sql. Continuing that pattern is a bad one that won't match the standards that other extensions live up to. Introducing sql injection vulnerabilities will be easier, and I recommend you change your code to make use of the abstract ->select, ->update, ->insert, etc... methods.
I can fix that temporarily by copying that file and using it but I want to work with whatever is "new" now so I dont use any old methods.
- I'm also getting this in a few extensions:
Fatal error: Call to a member function addMessage() on a non-object in [...]/extensions/MetaDescriptionTag.php on line 72
That function is being used like this: $wgMessageCache->addMessage
Anyone know any workarounds? I'm going to work on it in any case in the next few days and will report back if I'm successful.
Move your i18n messages to an .i18n.php file and add it to $wgExtensionMessagesFiles.
Thanks for the suggestion! I am now looking into the bundled extension Renameuser and following its methods, like: $res = $dbw->select( $table ...
________________________________ From: Daniel Friesen lists@nadir-seen-fire.com To: "mediawiki-l@lists.wikimedia.org" mediawiki-l@lists.wikimedia.org Sent: Monday, December 5, 2011 10:01 AM Subject: Re: [Mediawiki-l] Some problems after 1.17 / 1.18: DatabaseFunctions.php and addMessage()
On Sun, 04 Dec 2011 20:03:38 -0800, Eric K ek79501@yahoo.com wrote:
There's two issues I'm having after upgrading from 1.16.5 to 1.18.0:
- Some people (including me) had included "DatabaseFunctions.php" in
their extensions, for example by doing: include_once './extensions/DatabaseFunctions.php';
1.17 took that file out (file: History): === Configuration changes in 1.17 ===
- DatabaseFunctions.php that was needed for compatibility with pre-1.3
extensions has been removed.
I was using the database functions for example: $my_query = wfQuery($this_query, DB_WRITE);
Grab the master database for writes with $dbw = wfGetDB( DB_MASTER ); You 'can' do a query on that using $dbw->query( $this_query ); However I DO NOT recommend you just start throwing raw sql. Continuing that pattern is a bad one that won't match the standards that other extensions live up to. Introducing sql injection vulnerabilities will be easier, and I recommend you change your code to make use of the abstract ->select, ->update, ->insert, etc... methods.
I can fix that temporarily by copying that file and using it but I want to work with whatever is "new" now so I dont use any old methods.
- I'm also getting this in a few extensions:
Fatal error: Call to a member function addMessage() on a non-object in [...]/extensions/MetaDescriptionTag.php on line 72
That function is being used like this: $wgMessageCache->addMessage
Anyone know any workarounds? I'm going to work on it in any case in the next few days and will report back if I'm successful.
Move your i18n messages to an .i18n.php file and add it to $wgExtensionMessagesFiles.
mediawiki-l@lists.wikimedia.org