please have a look at the Structure \ Blocks in your Drupal admin area. There you should also see a social login block that you can move at the position of your choosing.
yesterday I found the solution. I had to add the "@Block" part to the SocialLoginBlock.php:
/** * Displays a Social Login block. * * @Block( * id = "SocialLoginBlock", * admin_label = @Translation("Social Login block"), * ) */
After this the block showed up.
But I experienced another problem with the SocialLoginBlockForm.php afterwards. There was an error message about a class which could not be found and line 40 was mentioned: $is_https = Drupal::request()->isSecure(); Maybe not a good workaround, but changing it to $is_https = true solved it for now. I couldn't have a closer look already...
I just tried what mentioned (adding the "use..." line of code at the top). Unfortunately it didn't work. Here's the error message I get: Error: Class 'Drupal\social_login\Form\Drupal' not found in Drupal\social_login\Form\SocialLoginBlockForm->buildForm() (line 41 of modules/social_login/src/Form/SocialLoginBlockForm.php)
Answers
please have a look at the Structure \ Blocks in your Drupal admin area.
There you should also see a social login block that you can move at the position of your choosing.
Regards,
unfortunately there isn't a block like this. I'm using Drupal 8. Maybe it isn't implemented there already?
yesterday I found the solution. I had to add the "@Block" part to the SocialLoginBlock.php:
/**
* Displays a Social Login block.
*
* @Block(
* id = "SocialLoginBlock",
* admin_label = @Translation("Social Login block"),
* )
*/
After this the block showed up.
But I experienced another problem with the SocialLoginBlockForm.php afterwards. There was an error message about a class which could not be found and line 40 was mentioned: $is_https = Drupal::request()->isSecure();
Maybe not a good workaround, but changing it to $is_https = true solved it for now.
I couldn't have a closer look already...
thank you very much for the update and the bugfix!
It seems like we unintentionally removed that comment during one of the last commits.
To fix the error with
$is_https = Drupal::request()->isSecure();
you can also add the following line at the top of the file SocialLoginBlock.php:
use Symfony\Component\HttpFoundation\Request;
We will push a new version with the bugfix.
I just tried what mentioned (adding the "use..." line of code at the top). Unfortunately it didn't work.
Here's the error message I get:
Error: Class 'Drupal\social_login\Form\Drupal' not found in Drupal\social_login\Form\SocialLoginBlockForm->buildForm() (line 41 of modules/social_login/src/Form/SocialLoginBlockForm.php)