Skip to content

Create custom attribute page asks that hyphens should be used but the given example uses underscores #108

Open

Description

@pablomoreno61

Is there an existing issue for this?

  • I have searched the existing issues

Which topic?

https://experienceleague.adobe.com/en/docs/commerce-admin/page-builder/walkthrough/3-catalog-content#step-2-create-custom-attributes

What's wrong with the content?

On this page https://experienceleague.adobe.com/en/docs/commerce-admin/page-builder/walkthrough/3-catalog-content#step-2-create-custom-attributes, it says "Attribute Code: Enter an attribute code in lowercase characters, using hyphens instead of spaces. For this example, use my_page_builder_attribute.". However, when trying to use hyphens, the validation complains, "Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.".

Code enforcing hyphens
https://github.com/magento/magento2/blob/5b3d233df732d5c573cb93e78576b9b86278573d/lib/web/prototype/validation.js#L795

Error in PaaS instance
Image

What changes do you propose?

Instead of "Attribute Code: Enter an attribute code in lowercase characters, using hyphens instead of spaces. For this example, use my_page_builder_attribute."

It should say "Attribute Code: Enter an attribute code in lowercase characters, using underscores instead of spaces. For this example, use my_page_builder_attribute."

Fix in

- [!UICONTROL Attribute Code]: Enter an attribute code in lowercase characters, using hyphens instead of spaces. For this example, use `my_page_builder_attribute`.

Anything else that can help to cover this?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions