Opened 3 years ago
Closed 2 years ago
#2565 closed Defect (fixed)
Wrap twitterservice's TwitterOauth vendor's OAuth include in class_exists()
| Reported by: | jricher | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Elgg 1.7.5 |
| Component: | Core | Version: | 1.7 |
| Severity: | major | Keywords: | oauth, plugin, crash, namespace |
| Cc: | brettp | Difficulty: | easy |
Description
Elgg 1.7.4 is incompatible with the community OAuth plugin, as the included libraries redefine several of the OAuth classes. If both plugins are enabled simultaneously, the site crashes.
Commenting out the call to include OAuth.php in the twitterOAuth.php file gets rid of the error, but I haven't done a full functionality test yet.
Ideally, the Twitter client should use the existing OAuth plugin for its library support. I don't see any reason in the code that it can't. I can look into what this would take and submit a patch back later, if there's interest in that solution.
Change History (5)
comment:1 Changed 3 years ago by jricher
- Difficulty set to moderate
- Milestone changed from Needs Review to Elgg 1.8
comment:2 Changed 3 years ago by cash
comment:3 Changed 2 years ago by cash
- Milestone changed from Elgg 1.8 to Elgg 1.7.5
comment:4 Changed 2 years ago by brettp
- Difficulty changed from moderate to easy
- Summary changed from Elgg 1.7.4 twitterservice incompatible with OAuth plugin to Wrap twitterservice's TwitterOauth vendor's OAuth include in class_exists()
The Oauth plugin on community requires another 3rd party plugin and does too much to be considered a library plugin. Nick's discussed with Justin about creating a plugin that only includes the libraries, and other plugins needing OAuth would list that library plugin as a requirement. This is the solution for 1.8.
The solution for 1.7 is using class_exists() before , preferably in both plugins.
comment:5 Changed 2 years ago by brettp
- Resolution set to fixed
- Status changed from new to closed
(In [svn:7413]) Fixes #2565: Wrapped twitterOAuth's include for OAuth in class_exists().

This needs to be fixed for Elgg 1.8. In the mean time how about releasing a version of the OAuth plugin that uses class_exists()?