Problem/Motivation

HandlerAllTest fails currently with PostgreSQL as database backend.

The test fails because the test does not add the filter value for anything but IN operator, and because the type doesn't match for an empty string and integer an exception is thrown.

Proposed resolution

Set a value to use for all filter handlers in the test.

Remaining tasks

Write patch.

User interface changes

None.

API changes

None.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug
Issue priority Major
Unfrozen changes Unfrozen because it fixes test only.
Prioritized changes PostgreSQL
Disruption None.

Comments

bzrudi71’s picture

Just spend some minutes getting this one pass. No luck so far... It fails with:

Drupal\Core\Database\DatabaseExceptionWrapper: Exception in []: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "" LINE 4: ...(forum_index.tid = '1') )AND(( (forum_index.nid = '') AND (f... ^ in Drupal\views\Plugin\views\query\Sql->execute() (line 1452 of /opt/local/apache2/htdocs/drupal8/core/modules/views/src/Plugin/views/query/Sql.php).

Okay, the problem is obviously the missing forum_index.nid. I tried to set the nid the same way it is done for the forum_index.tid, e.g. adding $options['value] = array(1) it just doesn't work and the value is not used, strange. Just posting this to have a start here...

mradcliffe’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new913 bytes

That was pretty much what you needed to do, but that particular filter is not an IN operator in the test. When set to an integer, it works.

mradcliffe’s picture

I ran tests on my local vm and local testbot instance for Views test group. No new fails.

bzrudi71’s picture

Status: Needs review » Reviewed & tested by the community

Ah yes, that makes sense :-) Looks good to me and I did an additional views group test run wit no new fails, just to make sure.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed 0210b3c and pushed to 8.0.x. Thanks!

  • alexpott committed 0210b3c on 8.0.x
    Issue #2443697 by mradcliffe: PostgreSQL: Fix views\Tests\Handler\...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.