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.
I've installed both the 1.x and 2.x versions and I get the same issue.
Steps to recreate
- Install the module via composer
- Configured the module at /admin/config/social-api/social-post/twitter
- Visit /admin/user/[uid]/edit
- Click the Add Account button in the Social Post Twitter section.
- Error is displayed.
Error message
The website encountered an unexpected error. Please try again later.
TypeError: Argument 4 passed to Drupal\social_api\Plugin\NetworkBase::__construct() must implement interface Drupal\Core\Logger\LoggerChannelFactoryInterface, instance of Drupal\Core\Entity\EntityTypeManager given, called in /var/www/web/modules/contrib/social_post_twitter/src/Plugin/Network/TwitterPost.php on line 91 in Drupal\social_api\Plugin\NetworkBase->__construct() (line 83 of modules/contrib/social_api/src/Plugin/NetworkBase.php).
Comment | File | Size | Author |
---|---|---|---|
#13 | link_drupal_user_twitter_account--3105779-13.patch | 3.28 KB | Dom. |
Comments
Comment #2
gvsoDo you get the same error if you install the dev version?
composer require drupal/social_post_twitter:2.x-dev
Comment #3
oo0shiny CreditAttribution: oo0shiny at Pegasystems commentedI just tried it with the dev version and got a different error message:
Comment #4
gvsoOpps, try installing dev versions of Social Post and Social API
composer require drupal/social_post_twitter:2.x-dev drupal/social_post:2.x-dev drupal/social_api:2.x-dev
Comment #5
oo0shiny CreditAttribution: oo0shiny at Pegasystems commentedThanks, that seems to have worked! I was able to successfully add a Twitter account to a user when using the 2.x-dev versions of all the required modules.
Comment #6
JankaP CreditAttribution: JankaP commentedI have the same problem when I use the Add Account button in the Social Post area on the edit profil page.
Error:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "social_post.user_manager". Did you mean one of these: "social_auth.user_manager", "social_post.post_manager", "social_post.data_handler"? in Drupal\Component\DependencyInjection\Container->get() (Zeile 153 in /www/xxx/drupal/core/lib/Drupal/Component/DependencyInjection/Container.php).
Versions:
Social API 8.x-2.0-rc2+1-dev (2019-Dez.-30)
Social Post 8.x-2.0-beta3
Social Post Twitter 8.x-2.0-alpha4+1-dev (2019-Aug.-11)
Social Auth 8.x-2.0-rc2 (I tried the dev version too)
Comment #7
gvsoFor Social Post Twitter, you need to use the Social Post dev version. Social Auth shouldn't influence here. I will try to make a new release after some refactoring is done.
Comment #8
JankaP CreditAttribution: JankaP commentedI already use the dev version as mentioned for Sócial Post Twitter (8.x-2.0-alpha4+2-dev)?
Do I need to use another dev Version?
I also tried to use the Sócial Post dev version social_post 8.x-2.x-dev
But with that I get another error message when I try to click on User in the Config/Twitter menu
TypeError: Argument 4 passed to Drupal\social_post_twitter\Controller\TwitterPostController::__construct() must be an instance of Drupal\social_post\SocialPostDataHandler, instance of Drupal\social_post\DataHandler given, called in /wwwxxx/blabla.com/drupal/modules/social_post_twitter/src/Controller/TwitterPostController.php on line 114 in Drupal\social_post_twitter\Controller\TwitterPostController->__construct() (Zeile 81 in /wwwxxx/blabla.com/drupal/modules/social_post_twitter/src/Controller/TwitterPostController.php)
Comment #9
gvsoThere has been changes in Social Post which broke Social Post Twitter. I have been trying to update it, but I am facing an issue with encrypting/decrypting the tokens. The work can be found at #3149947: Make controller similar to OAuth2 implementer controllels. Any help with that issue is very welcome!
Comment #10
gvsoComment #11
JankaP CreditAttribution: JankaP commentedIs there any version combination of Social API, Social Post and Social Post Twitter with which I still can use Social Post Twitter function?
Comment #12
Aleksandr_Borovikov CreditAttribution: Aleksandr_Borovikov commentedIs there any progress in solving this problem?
Comment #13
Dom. CreditAttribution: Dom. as a volunteer and at ACINO commentedI am having this module to work on Drupal 9. I will post a specific issue post to explain every changes and which versions I used, but meanwhile, here is a patch for that related issue.
Comment #14
Rar9 CreditAttribution: Rar9 commentedGathering patches for root package.
Gathering patches for dependencies. This might take a minute.
- Installing drupal/social_post_twitter (2.0.0-alpha4): Extracting archive
- Applying patches for drupal/social_post_twitter
https://www.drupal.org/files/issues/2020-10-26/fix_tweet_rule_action--31... (Fix Tweet rule action)
https://www.drupal.org/files/issues/2020-10-25/link_drupal_user_twitter_... (Error when attempting to add account to user)
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2020-10-25/link_drupal_user_twitter_...
Comment #16
wellsThanks @Dom -- I have applied your patch to the new 3.x-dev branch. Still some issues but this gets us closer to have a working ecosystem again.