Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
While testing the server ldap configuration for userand group binding, it shows "HTTP ERROR 500"
Comments
Comment #2
grahlHi there
This is likely already fixed by one of the pending patches. However, we need more information from you to isolate the issue. Please enable the PHP error log on your side and provide us with the error message causing the 500.
Comment #3
rivedav CreditAttribution: rivedav commentedHi,
I try different ways to enable error display or error logs but I coudn't.
The following link " https://www.drupal.org/node/15804 ": stablish to copy/paste the code in the index.ini file, then replicate the error, then I got the following error displayed "E_ERROR Error in file �ServerTestForm.php� at line 412: Cannot access protected property Drupal\ldap_servers\Entity\Server::$connection"
This is the same error as reported here: LDAP Server: Cannot access protected property
Comment #4
grahlComment #5
grahlThank you for your feedback, that helps.
Apparently, testing of group configurations is not really ported yet. Since I haven't touched groups I'm not able to offer a quickfix. You should be able to run tests (albeit without information on groups) by commenting out or deleting the functional block starting with " if (!$has_errors &&" (should be line 409-573).
Comment #6
rivedav CreditAttribution: rivedav commentedgrahl, as you said commented line 409 to 573 from the php file "modules\ldap\ldap_servers\src\Form\ServerTestForm.php" solved the problem. Now the test functionality can be perform.
Thank you for the information.
Comment #7
queenvictoria CreditAttribution: queenvictoria at Holly commentedTesting isn't implemented at all yet in D8 pending a complete rewrite and possible retirement of the ldap_test module in favour of integrated D8 style tests. I'm going to close this issue pending @larowlan and @grahl's efforts in this area. See work in the related ticketForget that. This ticket isn't related to testing as such just testing the server connection using the server test button.
Comment #8
queenvictoria CreditAttribution: queenvictoria at Holly commentedComment #10
grahlAs can be seen above I deactivated the function similar to my previous post since the current code cannot work.
I figured something along the lines of the following should work, but I'm not familiar enough with the relevant query structure, to find the problem.
Comment #12
grahlI'm tentatively marking this fixed because I've resolved all obvious issues with the form. However I've left a fixme comment since I don't have the setup to test group derivement fully. I get a value back from the Hogwarts data as "people" so at the very least the form works well, I'm not 100% sure about the query itself since that's undocumented.
I took the liberty of rearranging the form a bit and truncating / marking binary values to make the form not overrun the page.