After LDAP user Authenticate, the following message appears:
"The website encountered an unexpected error. Please try again later".

If the webpage is refreshed, the message disappears and the user shows up logged into Drupal website.

Comments

rivedav created an issue. See original summary.

queenvictoria’s picture

You'll need to provide us with more information on the issue like your specific LDAP configuration as D8 integration is working well. You are welcome to provide your configuration *.yml files though please sanitise usernames and passwords.

grahl’s picture

"Unexpected errors" should always produce something in the php error log and often also in Drupal's log preceding it. Ideally, you have your Drupal site set to report full stack traces. If you could share those, narrowing the problem is easy, with only the message, the cause could be anywhere.

rivedav’s picture

Also I noticed that after installing "LDAP Authentication", "LDAP Users"and "LDAP Server" modules, the following message appears after "update.php": "Some of the pending updates cannot be applied because their dependencies were not met."

Then I uninstalled "LDAP Authentication", "LDAP Users"and "LDAP Server" modules, then performed "update.php", the message disappears.

I uninstalled one by one and performed "update.php" and the message keep showing up until I uninstalled all of them.

Any thoughts?

rivedav’s picture

Regarding the Refresh issue, I did the following:

I cleared the log messages, then logout.

I tried logon and the message ""The website encountered an unexpected error. Please try again later" appears.

I refresh the web page and the user logon successfully.

I verified the message log but no problems found.

Any Ideas?.

Please let me know What else can I do in order to provide more information.

Thanks in advance.

rivedav’s picture

queenvictoria/grahl

Please see the error logs here:

Notice: Trying to get property of non-object in Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem->preSave() (line 49 of core\lib\Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem.php).
Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem->preSave() (Line: 244)
Drupal\Core\Field\FieldItemList->delegateMethod('preSave') (Line: 202)
Drupal\Core\Field\FieldItemList->preSave() (Line: 449)
Drupal\Core\Entity\ContentEntityStorageBase->invokeFieldMethod('preSave', Object) (Line: 406)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object) (Line: 435)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 291)
Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object) (Line: 389)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 761)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 364)
Drupal\Core\Entity\Entity->save() (Line: 1016)
ldap_user_user_login(Object)
call_user_func_array('ldap_user_user_login', Array) (Line: 402)
Drupal\Core\Extension\ModuleHandler->invokeAll('user_login', Array) (Line: 544)
user_login_finalize(Object) (Line: 143)
Drupal\user\Form\UserLoginForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 583)
Drupal\Core\Form\FormBuilder->processForm('user_login_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('user_login_form', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 139)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 98)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 77)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 43)
Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 628)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Trying to get property of non-object in Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem->preSave() (line 49 of core\lib\Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem.php).
Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem->preSave() (Line: 244)
Drupal\Core\Field\FieldItemList->delegateMethod('preSave') (Line: 202)
Drupal\Core\Field\FieldItemList->preSave() (Line: 449)
Drupal\Core\Entity\ContentEntityStorageBase->invokeFieldMethod('preSave', Object) (Line: 406)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object) (Line: 435)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 291)
Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object) (Line: 389)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 761)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 364)
Drupal\Core\Entity\Entity->save() (Line: 1016)
ldap_user_user_login(Object)
call_user_func_array('ldap_user_user_login', Array) (Line: 402)
Drupal\Core\Extension\ModuleHandler->invokeAll('user_login', Array) (Line: 544)
user_login_finalize(Object) (Line: 143)
Drupal\user\Form\UserLoginForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 583)
Drupal\Core\Form\FormBuilder->processForm('user_login_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('user_login_form', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 139)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 98)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 77)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 43)
Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 628)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

grahl’s picture

Status: Active » Postponed (maintainer needs more info)

Hi rivedav

Sorry for not replying earlier, the backtrace does not point to one of the usual culprits but rather something odd with the password field. Could you attempt this again with the dev version and and Drupal 8.2?

grahl’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)