Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello Everyone, I am creating a form to add new data but facing issue in it ,I have defined ContactD

Options
U04TV8QP04C
U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet

Hello Everyone, I am creating a form to add new data but facing issue in it ,I have defined ContactDataFormType.php in directory ContactData/Communication/Form/

«1

Comments

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    Options

    It seems like something in your module tries to access the DependencyProvider and it is not there. I would first look for what tris to access and decide if you need this or not. if you need the DependencyProvider then I would create it

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    Options

    Can you please try to form one message before you press “submit” in slack? or use the thread function. with this it is also easier to follow the message flow…

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    yes please help me

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options
  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    indexAction in AddController

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    Options

    what is your CommunicationFactory look like?

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options
  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    communicationfactory

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    Options

    in any of your Factories (business, communication, persistence) is there anything trying to access dependencies? i.e. ->getProvidiedDependencies()

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    no

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    i have not used dependencies

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    Options

    you likely do somehow 😛 can you share more about the exception trace? in your screenshot with the exception you can scroll down on the left side

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    ok

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options
  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    Options

    you have not scrolled down yet for that screenshot

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    Options

    bottom left of the picture

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options
  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    Options
  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options
  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    Options

    i think there is still something missing from the middle-part of that trace. can you share one screenshot without scrolling completely to the bottom?

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    ok

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options
  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    Options

    ok, so if you read carefully through the trace you will notice that getFormFactory() needs the dependencyprovider 🙂

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    so which type of dependencies it need

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    and how i can add them in formfactory

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    edited March 2023
    Options

    so likely just an empty ContactDataDependencyProvider class (so it has already the helper functions available)

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    yes i have the ContactDatadependencyProvider.php file but it empty

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    what kind of functions i should write here and how

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    Options

    i think no need to add extra functions. just the class which extends from the right AbstractDependencyProvider

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    Options

    the AbstractDependencyProvider should likely have all what is needed for now