I just updated from 8.4.3 to 8.5.1 and updated this module to the 2.0 version, and was getting this error on all pages with this block, and also when I tried accessing the block layout manager:

TypeError: Argument 1 passed to Drupal\simple_social_icons\Plugin\Block\SimpleSocialIconsBlock::__construct() must be an instance of Symfony\Component\HttpFoundation\Request, array given, called in /core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php on line 25 in Drupal\simple_social_icons\Plugin\Block\SimpleSocialIconsBlock->__construct() (line 66 of /modules/contrib/simple_social_icons/src/Plugin/Block/SimpleSocialIconsBlock.php) #0/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(25):

I also tried the 2.x-dev branch but it has the same problem. I also tested this on a clean 8.5.1 installation and got the same results.
Line 66 of SimpleSocialIconsBlock.php is this:

public function __construct(Request $request, RouteMatchInterface $route, ImmutableConfig $config, TitleResolverInterface $titleresolver)

Drupal thinks the module's using an array for $request, rather than an instance of Symfony\Component\HttpFoundation\Request. I looked at the Request class changes in 8.5. There are some changes there, but nothing I think is relevant. I also had a look at Drupal 8.5's block module API, which seems to suggest the need to use BlockPluginInterface (which this module does not, right now). I tried that but it did not solve this particular issue; didn't seem to do anything.

I don't really know what has to be adjusted to get this working again. I have had a look at core's BlockBase class and I figure the SimpleSocialIconsBlock class needs some tweaks - I just don't know what to tweak here. Anyone have insights on this?

I have had to remove this block from my site for the time being, to keep my site from showing WSODs.

CommentFileSizeAuthor
#8 2957599-08.patch4.3 KBmahaveer003

Comments

caspervoogt created an issue. See original summary.

caspervoogt’s picture

Issue summary: View changes
platinum1’s picture

Tried installing this module on an 8.6 site. Could not place the respective block.
+1 for this problem

fbas’s picture

The problems and a possible solution are described here: https://drupal.stackexchange.com/questions/260187/creating-a-simple-drup...

caspervoogt’s picture

Thanks @fbas. I tried implementing ContainerFactoryPluginInterface and got nowhere with that. Do you have a patch that does that? Do the maintainers have any thoughts here?

mahaveer003’s picture

Assigned: Unassigned » mahaveer003

Sorry For the late Reply Working On it now.

mahaveer003’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev
mahaveer003’s picture

StatusFileSize
new4.3 KB

Hi, I have Added changes to make the module work.

Adding patch for this.

Please review

mahaveer003’s picture

Status: Active » Needs review
chishah92’s picture

Status: Needs review » Reviewed & tested by the community

The patch works fine. I have been able to enable and place the block.

  • mahaveer003 committed bf83d09 on 8.x-3.x
    Issue #2957599 by mahaveer003: Not working anymore with 8.5.x
    
mahaveer003’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.