Page MenuHomePhabricator

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

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.
StatusSubtypeAssignedTask
InvalidNone
OpenNone

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:43 AM
bzimport set Reference to bz70030.
bzimport added a subscriber: Unknown Object (MLST).

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

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

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

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

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.

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 set Security to None.
Paladox subscribed.

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;

}

Aklapper lowered the priority of this task from High to Medium.Nov 25 2015, 7:36 PM
Jdforrester-WMF subscribed.

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