- πΈπ°Slovakia poker10
Why was this marked as Outdated? I still see the 7.x-2.x branch as supported.
From Drupal 7.90 and the recent PostgreSQL changes in Drupal 7 core (see:
π
pg_attribute.attrelid error
Needs review
), there is an error thrown in ldap_authorization
submodule.
PDOException: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "ldapauth" does not exist
SELECT 1 FROM pg_attribute WHERE attrelid = :key::regclass AND attname = :column AND NOT attisdropped AND attnum > 0; Array
(
[:key] => ldapauth
[:column] => ldapgroups_in_dn
)
in db_field_exists() (line 2896 of includes/database/database.inc).
The problem started to appear because of changes in DatabaseSchema_pgsql::fieldExists()
function, but the root cause is the wrong usage of the db_field_exists()
by ldap_authorization module. Problematic function is function ldap_authorization_requirements($phase)
and specifically this part:
if ($phase != "install" && db_field_exists('ldapauth', 'ldapgroups_in_dn')) {
$requirements['ldap_authorization_ldap_integration']['title'] = t('LDAP Integration LDAP Groups Upgrade Concern');
$requirements['ldap_authorization_ldap_integration']['severity'] = REQUIREMENT_WARNING;
$requirements['ldap_authorization_ldap_integration']['value'] = NULL;
$requirements['ldap_authorization_ldap_integration']['description'] = t('Upgrade from Drupal 6 LDAP Groups to Drupal 7
LDAP Authorization is not automatic. LDAP Authorization will need to be configured by hand.
The authorization options are different and automated updgrade is not possible.
See also. See http://drupal.org/node/1023016, http://drupal.org/node/1183192.
This message will go away when the ldapauth database table is removed.');
}
According to the last line of the description, I suppose that the check here has to verify if the table ldapauth
is present. The correct function to check if a table exists is db_table_exists()
, but the module is using the db_field_exists()
function. From the recent core changes it is not possible to use db_field_exists()
on non-existing tables anymore and the correct code should verify first if the table exists and only then check the existence of the concrete column. Therefore I am creating this as a bug in LDAP, because Drupal core is handling the situation correctly.
This affects only PostgreSQL installations.
Use PostgreSQL database
Install and enable ldap_authorization submodule
Go to status report or other page, where the hook_requirements is invoked
See the error
Change the db_field_exists()
to db_table_exists()
Closed: outdated
2.0
Code
Particularly affects sites running on the PostgreSQL database.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Why was this marked as Outdated? I still see the 7.x-2.x branch as supported.