Widget Parameter ID Weirdness

Posted Almost 12 years ago. Visible to the public. Draft.

I've not yet found out why, but this will not work:

<widgets>
    <some_widget type="some_module/block" translate="name description" module="some_module">
        <name>Widget</name>
        <description>Foo</description>
        <parameters>
            <script_tag_id translate="label description">
                <visible>1</visible>
                <required>1</required>
                <label>Script Tag ID</label>
                <description>The ID for the script tag, this looks like DoubleClickFloodlightTag1064319</description>
                <type>text</type>
            </script_tag_id>
        </parameters>
    </some_widget>
</widgets>

But this will:

<widgets>
    <some_widget type="some_module/block" translate="name description" module="some_module">
        <name>Widget</name>
        <description>Foo</description>
        <parameters>
            <script_tag_id_attrib translate="label description">
                <visible>1</visible>
                <required>1</required>
                <label>Script Tag ID</label>
                <description>The ID for the script tag, this looks like DoubleClickFloodlightTag1064319</description>
                <type>text</type>
            </script_tag_id_attrib>
        </parameters>
    </some_widget>
</widgets>

See the difference? The parameter that ends in _id never gets set on the block, but the one that ends in _attrib does.

Mike Whitby
Posted by Mike Whitby to Magento (2012-07-18 10:29)