Config form arguments error

Created on 4 March 2025, about 1 month ago

Problem/Motivation

There is an error on module config page:

ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /modules/contrib/linked_field/src/Form/ConfigForm.php on line 36 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 44 of core/lib/Drupal/Core/Form/ConfigFormBase.php).

Steps to reproduce

I use linked field 8.x-1.6-rc1 on Drupal 11.1.3

🐛 Bug report
Status

Active

Component

Code

Created by

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

Merge Requests

Comments & Activities

  • Issue created by @mydot
  • 🇮🇳India kishan@lnwebworks

    Hi @mydot

    I installed the module in Drupal version 10.4.3 and PHP version 8.3.13.
    Linked field Module is working fine in the local environment.

    Can you please share the steps to replicate the issue?

  • 🇮🇳India kishan@lnwebworks

    Hello @mydot.
    I reviewed the module on my local environment.
    Config page is working fine without any errors

    Could you please share the steps to replicate the issue.

    I have attached my drupal version and PHP version.

  • As mentioned i use Drupal 11.1.3. and not Drupal 10 as you. Maybe there is the problem

  • Merge request !17Edit ConfigForm.php → (Open) created by Unnamed author
  • Pipeline finished with Success
    25 days ago
    Total: 137s
    #446220
  • 🇮🇳India kishan@lnwebworks

    @mydot Thanks for mentioning the Drupal version.
    I replicated the issue in Drupal 11 version and provided the merge request ,and it's working fine.
    Please review once.

  • First commit to issue fork.
  • 🇦🇺Australia tarawij

    Hi @kishan kumar and maintainers,

    Thank you for the great work on MR #17! I have tested the current changes and noticed a few issues related to constructor arguments and service injection for D11 support.

    To help move this forward, I made some adjustments and fixes, including:

    • Corrected the constructor signature and service injection to align with D11 standards.
    • Improved the order of dependencies in the factory method.
    • Simplified the row calculation logic for better readability.
    • Updated the row calculation comment for clarity.

    You can find my commit with the fixes here:
    Fix commit for MR #17

    Since I couldn't push changes to the main project repository to directly update the MR, I kindly ask if you could cherry-pick my commit or incorporate the changes into the existing MR. Please let me know if you would like me to make any further adjustments.

    Thank you once again for your effort on this! I hope my contribution helps move the MR forward.

  • First commit to issue fork.
  • Pipeline finished with Success
    9 days ago
    Total: 229s
    #459413
  • Pipeline finished with Success
    9 days ago
    Total: 130s
    #459441
  • Can confirm error in D11 and that the config form loads with additional changes from @tarawij

Production build 0.71.5 2024