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

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,084 ⚖️ - Guardians (admin)

    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,084 ⚖️ - Guardians (admin)

    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

    yes please help me

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

    indexAction in AddController

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

    what is your CommunicationFactory look like?

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

    communicationfactory

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

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

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

    no

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

    i have not used dependencies

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

    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

    ok

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

    you have not scrolled down yet for that screenshot

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

    bottom left of the picture

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

    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

    ok

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

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

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

    so which type of dependencies it need

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

    and how i can add them in formfactory

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

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

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

    yes i have the ContactDatadependencyProvider.php file but it empty

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

    what kind of functions i should write here and how

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

    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,084 ⚖️ - Guardians (admin)

    the AbstractDependencyProvider should likely have all what is needed for now