Page MenuHomePhabricator

PostgreSQL: undefined method Status::clearFlag()
Open, NormalPublic

Description

When installing mw on postgre I get a blank page, in error log I see:

PHP Fatal error: Call to undefined method Status::clearFlag() in /home/petanb/Documents/mediawiki/core/includes/installer/PostgresInstaller.php on line 191, referer: http://localhost/test/w/mw-config/index.php?page=DBConnect


Version: 1.24rc
Severity: normal

Details

Reference
bz70030

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusAssignedTask
InvalidNone
OpenNone

Event Timeline

bzimport raised the priority of this task from to High.
bzimport set Reference to bz70030.
bzimport added a subscriber: Unknown Object (MLST).
Petrb created this task.Aug 26 2014, 11:19 AM

Do you really use old outdated 1.22.2 as written in the "Version" field?

Petrb added a comment.Aug 26 2014, 1:27 PM

no, it's latest master actually (from gerrit) idk why this version was chosen

Petrb added a comment.Aug 26 2014, 1:27 PM

and now it even changed the priority for no reason o.O bugzilla has bugs!

saper added a comment.Aug 26 2014, 3:43 PM

Full backtrace:

[26-Aug-2014 17:41:00 Europe/Warsaw] PHP Fatal error: Call to undefined method Status::clearFlag() in /usr/home/saper/public_html/pg/w/includes/installer/PostgresInstaller.php on line 191
[26-Aug-2014 17:41:00 Europe/Warsaw] PHP Stack trace:
[26-Aug-2014 17:41:00 Europe/Warsaw] PHP 1. {main}() /usr/home/saper/public_html/pg/w/mw-config/index.php:0
[26-Aug-2014 17:41:00 Europe/Warsaw] PHP 2. wfInstallerMain() /usr/home/saper/public_html/pg/w/mw-config/index.php:38
[26-Aug-2014 17:41:00 Europe/Warsaw] PHP 3. WebInstaller->execute() /usr/home/saper/public_html/pg/w/mw-config/index.php:79
[26-Aug-2014 17:41:00 Europe/Warsaw] PHP 4. WebInstallerDBConnect->execute() /usr/home/saper/public_html/pg/w/includes/installer/WebInstaller.php:280
[26-Aug-2014 17:41:00 Europe/Warsaw] PHP 5. WebInstallerDBConnect->submit() /usr/home/saper/public_html/pg/w/includes/installer/WebInstallerPage.php:515
[26-Aug-2014 17:41:00 Europe/Warsaw] PHP 6. PostgresInstaller->submitConnectForm() /usr/home/saper/public_html/pg/w/includes/installer/WebInstallerPage.php:599
[26-Aug-2014 17:41:00 Europe/Warsaw] PHP 7. PostgresInstaller->getPgConnection() /usr/home/saper/public_html/pg/w/includes/installer/PostgresInstaller.php:116

(In reply to Peter Bena from comment #3)

and now it even changed the priority for no reason o.O bugzilla has bugs!

No, it's likely your browser caching things.

gerritadmin wrote:

Change 156349 had a related patch set uploaded by saper:
Schema is not PostgreSQL connection parameter

https://gerrit.wikimedia.org/r/156349

gerritadmin wrote:

Change 156350 had a related patch set uploaded by Jjanes:
PostgreSQL: Fix Installer

https://gerrit.wikimedia.org/r/156350

gerritadmin wrote:

Change 156350 abandoned by Jjanes:
PostgreSQL: Fix Installer

Reason:
abandon in favor of alternative fix I61d5f262e60722bc08201b40b61a298d8af42223

https://gerrit.wikimedia.org/r/156350

saper added a comment.Sep 1 2014, 8:11 AM

Thanks Jjanes... now I wonder who can commit the fix...

Is there anyone who can merge https://gerrit.wikimedia.org/r/156349 ?

PostgreSQL support is slowly rotting away, as the persistence of this problem makes it hard to test for others ones.

saper added a comment.Nov 7 2014, 6:17 PM

Unfortunately we are getting more and more changes that break PostgreSQL and then nobody feels responsible for fixing them. In the past we used to revert broken changes, now getting things via the review is so hard so we no longer do it.

gerritadmin wrote:

Change 171873 had a related patch set uploaded by MarkAHershberger:
Schema is not PostgreSQL connection parameter

https://gerrit.wikimedia.org/r/171873

gerritadmin wrote:

Change 156349 merged by jenkins-bot:
Schema is not PostgreSQL connection parameter

https://gerrit.wikimedia.org/r/156349

gerritadmin wrote:

Change 171873 merged by jenkins-bot:
Schema is not PostgreSQL connection parameter

https://gerrit.wikimedia.org/r/171873

All patches mentioned in this report were merged or abandoned - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?

Jjanes closed this task as Resolved.Feb 23 2015, 5:27 PM
Jjanes set Security to None.
Paladox reopened this task as Open.Nov 25 2015, 6:33 PM
Paladox added a subscriber: Paladox.

I doint think this has been fixed do to the way the code looks. and hasen't changed ether.

/**

  • Get a special type of connection
  • @param string $type See openPgConnection() for details.
  • @return Status
	 */

protected function getPgConnection( $type ) {

		if ( isset( $this->pgConns[$type] ) ) {
			return Status::newGood( $this->pgConns[$type] );
		}
		$status = $this->openPgConnection( $type );

		if ( $status->isOK() ) {
			/**
			 * @var $conn DatabaseBase
			 */
			$conn = $status->value;
			$conn->clearFlag( DBO_TRX );
			$conn->commit( __METHOD__ );
			$this->pgConns[$type] = $conn;
		}

		return $status;

}

Paladox added a comment.EditedNov 25 2015, 6:34 PM

It should be $this->db->clearFlag not $conn->clearFlag( DBO_TRX );

https://github.com/wikimedia/mediawiki/search?p=2&q=clearFlag&utf8=%E2%9C%93

Aklapper lowered the priority of this task from High to Normal.Nov 25 2015, 7:36 PM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.