Render OneAll Social Login Block in a .php file

Created on 27 February 2023, over 1 year ago
Updated 28 February 2023, over 1 year ago

Render OneAll Social Login Block in a .php file

Hi everyone, I wants help of this community regarding an issue. I don't know its an issue of OneAll Social Login or something else going wrong in my Drupal 7 site. I have configured OneAll Social Login module successfully everything works well but there is an issue in the block. I haver rendered OneAll Social Login Block programmatically in a custom page successfully. but I need the block to be rendered in a xyz.php file. I know its not a standard in Drupal 7 but these files have created someone else. so I try to render the block on the xyz.php file I only gets the heading of the Facebook and Google icon links.

Following code I have used to render the block.

$blockObject = block_load('social_login_widget', 'social_login_widget');
 $block_ = _block_get_renderable_array(_block_render_blocks(array($blockObject)));
 $output = drupal_render($block_);

Check the attached screenshot for the possible output. I only get "Login with your Social Network account." instead of whole block with links.

πŸ› Bug report
Status

Active

Version

2.12

Component

User interface

Created by

πŸ‡΅πŸ‡°Pakistan Qaiser iqbal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024