You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a $chado member variable that gets set with the Chado connection object during the constructor of the ChadoIdSpace class. However, I found out that if you want to use Ajax in forms you get an error message if there is a connection object in any class stored in the form. Since we never know when an instance of the ChadoIdSpace could be housed in the form we should remove it as a member variable and just get the connection object in the functions.
The text was updated successfully, but these errors were encountered:
Storing the connection in the class in that manner is a Drupal convention so I'm surprised it causes errors in that manner... what is the error that you get?
As pointed out by @spficklin, this issue has been fixed in per #271. It was also causing errors in the automated testing. I simply removed it and re-initiated the database connection object in each method needing it. I decided on this approach since Tripal DBX had been shown to have some difficulties with stored database connections anyway. Additionally further investigation implies dependency injection might be another route we could take in the future and may be how Drupal is getting around these types of errors.
There is a $chado member variable that gets set with the Chado connection object during the constructor of the
ChadoIdSpace
class. However, I found out that if you want to use Ajax in forms you get an error message if there is a connection object in any class stored in the form. Since we never know when an instance of theChadoIdSpace
could be housed in the form we should remove it as a member variable and just get the connection object in the functions.The text was updated successfully, but these errors were encountered: