Error when trying to access config, can't use the module

Created on 30 March 2023, over 1 year ago
Updated 23 June 2023, over 1 year ago

Problem/Motivation

/admin/config/twitter_feed/settings doesn't load:

The website encountered an unexpected error. Please try again later.

with php error:
TypeError: Drupal\twitter_feed\Form\TwitterFeedConfigForm::__construct(): Argument #1 ($render) must be of type Drupal\Core\Render\RendererInterface, Drupal\Core\Config\ConfigFactory given, called in /var/www/html/web/core/lib/Drupal/Core/Form/ConfigFormBase.php on line 29 in Drupal\twitter_feed\Form\TwitterFeedConfigForm->__construct() (line 31 of /var/www/html/web/modules/contrib/twitter_feed/src/Form/TwitterFeedConfigForm.php).

General system information:

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇮🇹Italy kopeboy Milan

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

Comments & Activities

  • Issue created by @kopeboy
  • 🇮🇳India somesh1999

    I am not able to find the exact part of code which is causing this issue but when I replace the contruct interface and use this code it starts working properly.

    public function __construct() {
    $this->render = \Drupal::service('renderer')
    }

    There is some problem in either the DI or some conflict in ConfigFormBase class.

  • First commit to issue fork.
  • @sakthi_dev opened merge request.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India sakthi_dev

    Please review.

  • First commit to issue fork.
  • 🇮🇳India arisen Goa

    Fixed the errors/warnings while applying the patch from the MR.

    4.patch:30: trailing whitespace.
    4.patch:33: trailing whitespace.
      *
    Checking patch src/Form/TwitterFeedConfigForm.php...
    Applied patch src/Form/TwitterFeedConfigForm.php cleanly.
    warning: 2 lines add whitespace errors.

    Please review.

  • 🇺🇸United States dwisnousky

    That works perfect with our codebase! Thank you so much!

    Uploading patch to be safe

Production build 0.71.5 2024