Open
Description
Summary
There are some problems when I try to synchronize my Gmail emails to crm-application in version 4.1.2. Previously we used version 3.1.15 where it worked fine.
- First error was: Header name must be an RFC 7230 compatible string. This problem I resolved with changing the $headers array of strings in Oro\Bundle\ImapBundle\Manager\ImapEmailGoogleOauth2Manager.php:192 to an associative array ['Content-Type' => 'application/x-www-form-urlencoded', ...]
- After resolving the first error there was another: In Oro\Bundle\ImapBundle\Manager\ConnectionControllerManager.php:168 the $userInfo variable is HWI\Bundle\OAuthBundle\OAuth\ResponsePathUserResponse and this class doesn't contain getResponse() method. So I removed the condition and just returned the $response so it would work atleast somehow.
- After resolving the second error the request to /gmail/connection/access-token was successful which made me hopeful but the next request to /imap/connection/account/change ended with an exception: Block "widget_container_attributes" on template "OroImapBundle:Form:accountTypeGmail.html.twig" does not exist.
After this error I stopped trying to fix the Gmail synchronization. Because I didn't know if you would like me to do an pull request. For example if you already knew about this issue and someone is already working on a fix (I tried to find an issue in tracker but I wasn't succesful).
Steps to reproduce
- Configure Google integration (secret key, ...) and enable OAuth 2.0 for email sync.
- Go to user's email configuration and in Email synchronization settings select Account type Gmail.
- Log in to Google through their modal.
- After login error's will appear / request will end with 500.
Details about your environment
- OroPlatform version: 4.1.
- PHP version: 7.3
- Database (MySQL, PostgreSQL) version: PostgreSQL 11.6