Problem/Motivation

Config Name as a unique key for the drupalSettings.salesforce_mfw object will not work when there are multiple instances of the same Salesforce utility that needs to be configured on the site. Each utility would have the same config name, leading to overwriting of existing configuration in the drupalSettings object. It would likely be better to key off of the unique identifier of the block plugin instance.

Steps to reproduce

Create two instances of a Salesforce MFW block and give them the same config name
Verify that only one exists in your drupalSettings.salesforce_mfw.

Proposed resolution

Update block plugin to use the block plugin id (machine id) instead of config_name.
Update the module hook to also use the block->id() instead of config_name

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kjl16 created an issue. See original summary.

kyleleber’s picture

Status: Active » Needs review
kyleleber’s picture

Issue summary: View changes
luke.leber’s picture

Status: Needs review » Reviewed & tested by the community

  • kyleleber committed f98d3e13 on 1.0.x
    Issue #3466979: Change config name in the drupalSettings object to use...
kyleleber’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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