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

Only local images are allowed.

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

maxxer created an issue. See original summary.

aaronbauman’s picture

Issue summary: View changes

This path should not be exposed on webforms, since webform is a config entity.

maxxer’s picture

Issue summary: View changes

Hi 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.

aaronbauman’s picture

The 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

maxxer’s picture

Issue summary: View changes
maxxer’s picture

thanks 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!

aaronbauman’s picture

aaronbauman’s picture

Status: Active » Needs review
StatusFileSize
new14.16 KB

This 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.

Status: Needs review » Needs work

The last submitted patch, 8: salesforce-access_by_entity_types-2915578.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

aaronbauman’s picture

Status: Needs work » Needs review
StatusFileSize
new14.01 KB

trying again.

Status: Needs review » Needs work

The last submitted patch, 10: salesforce-access_by_entity_types-2915578-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

aaronbauman’s picture

Status: Needs work » Needs review
StatusFileSize
new13.97 KB

and again

aaronbauman’s picture

Status: Needs review » Fixed

  • aaronbauman committed d6a6090 on 8.x-3.x
    Issue #2915578 by aaronbauman: Mismatched entity interface for webform
    

Status: Fixed » Closed (fixed)

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