Problem

YAML form needs to support third party integration which immediately includes the Honeypot module. (https://www.drupal.org/project/honeypot)

Solution

Use Drupal's ThirdPartySettingsInterface and build extendable Third Party (Settings) forms.

User interface changes

Third Party tabs will be added to the YAML form admin settings and YAML form config entity settings.

Tasks

  • Setup Third Party admin settings tab. (admin/structure/yamlform/settings/third-party )
  • Setup Third Party YAML form settings tab (admin/structure/yamlform/manage/{yamlform}/third-party)
  • Build yamlform_test_third_party.module which just enables a warning on a form.
  • Setup yamlform_third_party_load_includes(). See \Drupal\Core\Extension\ModuleHandler::loadAllIncludes()
  • Setup config schema for third party settings. See .third_party.[%key]
  • Implement yamlform_test_third_party hooks.
  • Delete third party settings when module is uninstalled
  • Write tests
  • Update API documentation.
  • Update README.md

Notes

  • YAML form config entity already implements ThirdPartySettingsInterface
  • YAML form admin settings does not have a concept of third party settings.
  • YAML form module will support implementing third party setting on a contrib modules behalf. Set up yamlform/third_party_settings/yamlform.third_party_settings.{module_name}.inc

Development Notes

  • Branch Name: 2707857-yaml-form-third-party-settings
  • Patch Name: yaml-form-third-party-settings-2707857-XX.patch
  • Commit message: Issue #2707857: Add support for Third Party Settings.

References

Comments

jrockowitz created an issue. See original summary.

jrockowitz’s picture

Issue summary: View changes

Adding Development Notes

jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Issue summary: View changes

  • jrockowitz committed 714bab0 on 2707857-yaml-form-third-party-settings
    Issue #2707857: Add support for Third Party Settings. Add third party...

  • jrockowitz committed c17b43a on 2707857-yaml-form-third-party-settings
    Issue #2707857: Add support for Third Party Settings. Add missing...

  • jrockowitz committed 190d223 on 2707857-yaml-form-third-party-settings
    Issue #2707857: Add support for Third Party Settings. Write tests.
    
jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new61.47 KB

  • jrockowitz committed 190d223 on 8.x-1.x
    Issue #2707857: Add support for Third Party Settings. Write tests.
    
  • jrockowitz committed 714bab0 on 8.x-1.x
    Issue #2707857: Add support for Third Party Settings. Add third party...
  • jrockowitz committed c17b43a on 8.x-1.x
    Issue #2707857: Add support for Third Party Settings. Add missing...
jrockowitz’s picture

Status: Needs review » Fixed

  • jrockowitz committed 8a4bf6c on 8.x-1.x
    Issue #2707857: Add support for Third Party Settings. Remove support for...

  • jrockowitz committed 33007b2 on 8.x-1.x
    Issue #2707857: Add support for Third Party Settings. Revert remove...

  • jrockowitz committed 2cfec4a on 8.x-1.x
    Issue #2707857: Add support for Third Party Settings. Add...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

redstagmedia’s picture

Updated to today's release, crashed site. Below is the error log:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "yamlform.third_party_settings_manager". in Drupal\Component\DependencyInjection\Container->get() (line 157 of /home/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php).

update: Flushing cache seems to have gotten things back up and running. But trying to update the database stalled out. It looks like 8009 might have some issues. Not sure if this is related, I'll wait to hear back before I create a different ticket.

jrockowitz’s picture

Yes flushing cache would fix that initial issue.

8009 executes a batch update on all your submissions. It is possible that it failed because the cache needs to be cleared before 8009 is executed.

How many submissions do you have in your database? 8009 might be running out of memory. I retested 8009 locally at it seems to be okay.