시스템 구성에서 사용자 정의 그룹 및 필드를 작성하는 동안 404 오류를 찾을 수 없습니다


14

사용자 정의 탭에서 사용자 정의 섹션에 대한 그룹 및 일부 필드를 만들려고합니다.

탭과 섹션이 생성되고 있지만 내용 영역에서 섹션을 클릭하면 404를 찾을 수 없음 오류가 표시됩니다.

내 system.xml 파일은 다음과 같습니다

<config>
    <tabs>
        <!--node is just an identifier-->
        <animala translate="label" module="training_animal">
            <label>Training</label>
            <sort_order>1</sort_order>
        </animala>
    </tabs>
    <sections>
        <animals translate="label" module="training_animal">
            <class>seperator-top</class>
            <label>Training</label>
            <!--node vlaue should match the tabs node name-->
            <tab>animala</tab>
            <frontend_type>text</frontend_type>
            <sort_order>100</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>

            <groups>
                <training_animal_group translate="label">
                    <label>My Custom Group</label>
                    <comment>Some comment about my group</comment>
                    <sort_order>10</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <training_animal_field translate="label tooltip comment">
                            <label>My Custom Field</label>
                            <comment>Some comment about my field</comment>
                            <tooltip>Field ToolTip</tooltip>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                            <frontend_type>text</frontend_type>
                        </training_animal_field>
                    </fields>
                </training_animal_group>
            </groups>
        </animals>
    </sections>
</config>

내 섹션의 URL은

http://localhost/mage2/index.php/admin/system_config/edit/section/animal/

config.xml 모듈

<modules>
    <Training_Animal>
        <version>0.2.0</version>
    </Training_Animal>
</modules>

Training_Animal_Block

    <training_animal>
        <class>Training_Animal_Helper</class>
    </training_animal>

</helpers>


이 글에 참여해 주신 모든 분들께 감사드립니다 :)
— siliconrockstar

답변:


31

또한 사용자 정의 시스템 구성 그룹에 대한 ACL 자원을 설정해야합니다. Magento> 1.5를 사용한다고 가정합니다. 귀하의 adminhtml.xml( app/code/{codepool}/Training/Animal/etc/adminhtml.xml)

<config>
    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <animals translate="title" module="training_animal">
                                        <title>Animals</title>
                                        <sort_order>999</sort_order>
                                    </animals>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</config>

이전 버전의 Magento에서는이 정보가에 저장되었습니다 config.xml.


6
또한이 파일을 추가 한 후 로그 아웃했다가 다시 로그인하여 Magento가 ACL 규칙을 새로 고치도록하십시오.
— fmrng

2
실제로 나는 acl 자원을 설정했다. 하지만 로그 아웃하고 로그인하지 않았습니다. 지금은 잘 작동합니다. 감사합니다
— zamil

고마워요 fmrng. 이것은 나를 도왔다. 이전에 acl 리소스의 일부 태그가 누락되었습니다 ...
— Pavan Kumar
당사 사이트를 사용함과 동시에 당사의 쿠키 정책과 개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.