Has we are working on a website, we had this error in i18nblocks_locale_refresh() which is generated because whoever wrote the SQL command tries to compare the delta value (a string) with an identifier (an integer). PostgreSQL doesn't like to auto-convert data types...

The statement in question would require a CAST(), as I added here, to work with PostgreSQL:

function i18nblocks_locale_refresh() {
  $result = db_query("SELECT DISTINCT b.module, b.delta, b.title, bx.body, bx.format, i.ibid, i.language
            FROM {blocks} b
            LEFT JOIN {boxes} bx ON b.module = 'block' AND b.delta = CAST(bx.bid AS TEXT)
            LEFT JOIN {i18n_blocks} i ON b.module = i.module AND b.delta = i.delta");
  ...

However, I really think that this statement is wrong. Deltas and block identifiers have nothing to do between each others. Deltas can be strings (i.e. 'left', 'right', etc.) and not numbers and as such cannot in any way match a 'bid'.

So there is an attached temporary patch for those who have the errors and want to avoid those, but the function itself is likely to do nothing most of the time, or not exactly the right thing, at least.

CommentFileSizeAuthor
i18nblocks.module.patch996 bytesAlexisWilke
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joseph.olstad’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Closed (outdated)

This might have been a 7.x issue as I don't think 6.x could run postgres

But, this was fixed for sure because I know of sites running this module with postgresql that are working correctly.