The sample code to copy & paste after creating a new Oracle connection appears to use an older and now broken version of the entityManager functions. This did not work for me
For example, here is the code block I was given to copy & paste:
$entity_storage = \Drupal::entityTypeManager()->entityManager->getStorage("drupacle_connection");
$entity = $entity_storage->load("wfora");
$connObj = \Drupal::service("drupacle.connection_service")->drupalConnectionCallback($entity);
$Sql = oci_parse($connObj["wfora"], "YOUR QUERY");
This would result in errors like:
Notice: Undefined property: Drupal\Core\Entity\EntityTypeManager::$entityManager
Error: Call to a member function getStorage() on null
I was able to get this running by changing the first line to:
$entity_storage = \Drupal::entityManager()->getStorage("drupacle_connection");
Not sure if that is exactly the correct way to do it but, it seems to be working now and also is closer to the example currently provided in the documentation.
Comments
Comment #2
yogeshmpawarLooking into this issue now.
Comment #3
dipohl commentedI experienced the same problem with drupacle v.2.0.1 and Drupal 9.4.1 and could solve it there by changing the first line of the snippet to:
$entity_storage = \Drupal::entityTypeManager()->getStorage("drupacle_connection");Comment #5
yogeshmpawarcommitted & pushed to 2.0.x branch.