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,051 βš–οΈ - 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,051 βš–οΈ - 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,051 βš–οΈ - 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,051 βš–οΈ - 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,051 βš–οΈ - 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,051 βš–οΈ - Guardians (admin)

    you have not scrolled down yet for that screenshot

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,051 βš–οΈ - Guardians (admin)

    bottom left of the picture

  • U04TV8QP04C
    U04TV8QP04C Posts: 38 πŸ§‘πŸ»β€πŸš€ - Cadet
  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,051 βš–οΈ - Guardians (admin)
  • U04TV8QP04C
    U04TV8QP04C Posts: 38 πŸ§‘πŸ»β€πŸš€ - Cadet
  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,051 βš–οΈ - 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,051 βš–οΈ - 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,051 βš–οΈ - 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,051 βš–οΈ - 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,051 βš–οΈ - Guardians (admin)

    the AbstractDependencyProvider should likely have all what is needed for now