When trying to visit the configuration page for an individual webform (see screenshot), fatal error is received.
This is alliteratively triggered by directly visiting the URL
/webform/[WEBFORM NAME]/salesforce

Error is:
TypeError: Argument 1 passed to Drupal\salesforce_mapping\MappedObjectStorage::loadByEntity() must implement interface Drupal\Core\Entity\ContentEntityInterface, instance of Drupal\webform\Entity\Webform given, called in /mnt/www/html/infobuildersdev/docroot/modules/contrib/salesforce/modules/salesforce_mapping/src/Controller/MappedObjectController.php on line 53 in Drupal\salesforce_mapping\MappedObjectStorage->loadByEntity() (line 83 of modules/contrib/salesforce/modules/salesforce_mapping/src/MappedObjectStorage.php).
Drupal\salesforce_mapping\MappedObjectStorage->loadByEntity(Object) (Line: 53)
Drupal\salesforce_mapping\Controller\MappedObjectController->getMappedObjects(Object) (Line: 67)
Drupal\salesforce_mapping\Controller\MappedObjectController->listing(Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 18)
We are currently at the latest development released on October 11, 2017.
However this has persisted back as far we can tell to 8.2x
Comments
Comment #2
aaronbaumanThis path should not be exposed on webforms, since webform is a config entity.
Comment #3
maxxer commentedHi aaraon, is suite designed to work at all with webforms?
We're not seeing other salesfroce mapping/config options on say, individual webform node edit pages
We are not seeing correct behaviour with contact form module either, so are UI based form modules not implemented?
Sorry if that's a naive question, can't seem to find clarification in docs.
Comment #4
aaronbaumanThe suite is designed to push fieldable content entity data from Drupal to Salesforce.
Unfortunately, webform "fields" (and the submission entities created by webform) do not use field API, and therefore aren't covered out of the box.
Webform submission data is totally denormalized, and not exposed in any way to field API.
I would love to include webform support for D8 - probably in the form of an update to https://www.drupal.org/project/webform_salesforce
In the meantime, you *can* use contact module to create fielded content entities, which are then map-able and push-able to Salesforce, with the help of https://www.drupal.org/project/contact_storage
Comment #5
maxxer commentedComment #6
maxxer commentedthanks for the clarification @aaronbaum
just a note that the option is added to contextual menu on contact form overview, which returns same typeerror
i.e.
http://[DOMAIN]/admin/structure/contact
(because presumably a config entity as well so I'm assuming the same issue)
However, just to confirm for anyone else who might see this issue, when we followed your advice and added contact storage module, and then
configured via:
http://[DOMAIN]/admin/structure/salesforce/mappings/add
mapping appear to WAD with contact form.
thanks again aaron!
Comment #7
aaronbaumanComment #8
aaronbaumanThis patch is overwrought to solve the particular issue here, but it also cleans up local actions and some other menu stuff.
It works for me, but let me know if it works for you before I commit it.
Comment #10
aaronbaumantrying again.
Comment #12
aaronbaumanand again
Comment #13
aaronbauman