dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
48 stars 63 forks source link

Preference checkboxes have invalid ID attribute if 'public name' has more than one word #543

Closed BDierks closed 5 years ago

BDierks commented 5 years ago

We are attempting to style our Newsletter Subscriptions page in Magento 2, but we have encountered a bug. We are utilizing Marketing Preferences to manage our subscribers' frequency preferences. When attempting to read in the category and preferences, the values being passed from dotdigital to create the labels and id attributes are the public names. The integration uses the public name as the input label, but also as the input “id” attribute. If we attempt to use a public name that contains spaces, the resulting code is invalid since the HTML5 specification prohibits spaces.

For example, we have a marketing preference as follows: category private name='Frequency' category public name='How often would you like to receive marketing email?' preference private name='Daily' preference public name='Send me everything!'

Since the public name is being passed from dotdigital, we're seeing the following for the preference: id="Send me everything!_606" value="605,606"

screenshot-3

Magento 2.3.1 dotdigital Engagement Cloud (formerly dotmailer) for Magento 2 - 3.1.1 dotmailer for Magento 2 Enterprise - V1.0.3

adeelq commented 5 years ago

Thanks @BDierks for reporting this. We have added this to current sprint. Will update you when released.

sta1r commented 5 years ago

Hi @BDierks, fix released in https://github.com/dotmailer/dotmailer-magento2-extension/releases/tag/v3.2.4.