We're trying to install Get Linked Posts on a Drupal 8 installation installed via Drush, not composer. What would be the proper way to install league/oauth2-linkedin on such a site?

CommentFileSizeAuthor
#4 vendor_league.png52.15 KBdendrmx

Comments

Ben Coleman created an issue. See original summary.

dendrmx’s picture

Hello!
Thank you for interesting in to my module. Sorry for long term of reply. I've installed all dependencies with Composer and didn't try to use it without Composer.

chris pergantis’s picture

Is it possible that with your composer installation that you can locate the library files from your site's root directory? I think the path from the root directory to the library file name is most of what I actually need. If I need more than that I will figure out what that is after getting the library into the correct location within the site. Thanks for this module.

dendrmx’s picture

StatusFileSize
new52.15 KB

Hello!
When you will install this module with composer - League libraries will be installed automatically to
vendor/league/oauth2-client and
vendor/league/oauth2-linkedin.
My understanding is - you need to download and place these libraries to vendor/league folder.
You can find these libraries here http://oauth2-client.thephpleague.com/providers/league/
or on github https://github.com/thephpleague/oauth2-client
https://github.com/thephpleague/oauth2-linkedin
Vendor League

If you have any questions - please ask me. I will try to answer as soon as possible.

dendrmx’s picture

Status: Active » Fixed
dendrmx’s picture

Status: Fixed » Closed (fixed)
aswathyajish’s picture

Category: Support request » Bug report
Priority: Normal » Critical

I am using a non-composer drupal 8 instance. I have downloaded the oauth2-client and oauth2-linkedin libraries from the links mentioned in #4 and pasted them in the path "/vendor/league". In the Get Linkedin Posts settings, I have given company ID, client id and client secret. But when I tried to click on the button "Get new linkedin access token", I got an error "The website encountered an unexpected error. Please try again later.". In the recent log messages, I have found the following error :

Error: Class 'League\OAuth2\Client\Provider\LinkedIn' not found in Drupal\get_linkedin_posts\Form\GetLinkedinPostsSettings->getNewLinkedinToken() (line 174 of /opt/web/modules/contrib/get_linkedin_posts/src/Form/GetLinkedinPostsSettings.php) #0 [internal function]: Drupal\get_linkedin_posts\Form\GetLinkedinPostsSettings->getNewLinkedinToken(Array, Object(Drupal\Core\Form\FormState)) #1 /opt/web/core/lib/Drupal/Core/Form/FormSubmitter.php(111): call_user_func_array(Array, Array) #2 /opt/web/core/lib/Drupal/Core/Form/FormSubmitter.php(51): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState)) #3 /opt/web/core/lib/Drupal/Core/Form/FormBuilder.php(590): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState)) #4 /opt/web/core/lib/Drupal/Core/Form/FormBuilder.php(319): Drupal\Core\Form\FormBuilder->processForm('get_linkedin_po...', Array, Object(Drupal\Core\Form\FormState)) #5 /opt/web/core/lib/Drupal/Core/Controller/FormController.php(93): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\get_linkedin_posts\Form\GetLinkedinPostsSettings), Object(Drupal\Core\Form\FormState)) #6 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #7 /opt/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #8 /opt/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #9 /opt/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #10 /opt/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #11 /opt/web/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #12 /opt/web/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #13 /opt/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 /opt/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 /opt/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /opt/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /opt/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /opt/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /opt/web/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /opt/web/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /opt/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #22 {main}.

Is there any solution to this?

ben coleman’s picture

You don't want to be using this module anyway. This module uses the LinkedIn API v. 1.0, which hasn't been available for almost 3 years. See the issue Changing this to use LInkedin API v. 2.0 for the obstacles preventing upgrading the code to use the newer LinkedIn API.

mmjvb’s picture

Category: Bug report » Support request
Priority: Critical » Normal

Please refrain from hijacking old issues. Create your own issue for more assistance and relate to this one.

It is expected to use Composer to introduce this module to your code base. The Composer autoload feature will make sure classes are found.
To answer the question: There is Ludwig for introducing modules with dependencies without using Composer.

Obviously, these things can be solved manually. Expect that beyond the support provided for this module. Even when using the right API.
Definitely not a bug report !