致命错误:未捕获的SoapFault异常:[103]属性"include_in_menu"是必须的 [英] Fatal error: Uncaught SoapFault exception: [103] Attribute "include_in_menu" is required

查看:88
本文介绍了致命错误:未捕获的SoapFault异常:[103]属性"include_in_menu"是必须的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

致命错误:未捕获的SoapFault异常:[103]属性"include_in_menu"是必需的."当我使用Magento API创建类别时被抛出.

"Fatal error: Uncaught SoapFault exception: [103] Attribute "include_in_menu" is required." was throwed when I using Magento API to create a category.

在Magento API中,它说我需要一个像这样的数组,

In the Magento API, it says I need an array like this,

         array(
            'name'=>'Newopenerp',
            'is_active'=>1,
            'include_in_menu'=>2,
            'available_sort_by'=>'position',
            'default_sort_by'=>'position'
           )

当我使用Magento 1.5.1在本地主机中运行脚本时,一切看起来都很好.在使用Magento 1.5.0的服务器中时,抛出此异常.我想知道这是否是由版本更改引起的.

When I run my script in localhost with Magento 1.5.1, everything looks fine. While in the server with Magento 1.5.0, this exception was thrown. I am wondering if this is caused by version change.

我尽力调试了这一天,一天后一无所获.我确定这是Magento API的问题,也许在Magento 1.5.0中存在'include_in_menu'的另一种数据类型.

I tried my best to debug this, got nothing after one day. I make sure this is a problem of Magento API, maybe there is a another data type for 'include_in_menu' in Magento 1.5.0.

我真的很想知道这里发生了什么!

I really want to know what happened here!

PS: 我在 http://sourceforge.net/projects/jtlmage获得了一些有用的信息/forums/forum/1009350/topic/4028894 .但这不是英语,所以我听不懂它的意思.希望对您有所帮助!

PS: I got some useful information at http://sourceforge.net/projects/jtlmage/forums/forum/1009350/topic/4028894. But it's not in English so I can't get what it means. Hope it's helpful for anyone's help!

谢谢.

推荐答案

请转到此路径"app/code/core/Mage/Catalog/etc/",然后打开此文件"wsdl.xml".然后转到第187行,您将找到以下Magento v1.5.0.1的代码块:-

Please go to this path "app/code/core/Mage/Catalog/etc/", and open this file "wsdl.xml". Then go to this line #187, and you will find this following code block for the Magento v1.5.0.1:-

<complexType name="catalogCategoryEntityCreate">
    <all>
        <element name="name" type="xsd:string" minOccurs="0" />
        <element name="is_active" type="xsd:int" minOccurs="0" />
        <element name="position" type="xsd:int" minOccurs="0" />
        <element name="available_sort_by" type="typens:ArrayOfString" minOccurs="0" />
        <element name="custom_design" type="xsd:string" minOccurs="0" />
        <element name="custom_design_apply" type="xsd:int" minOccurs="0" />
        <element name="custom_design_from" type="xsd:string" minOccurs="0" />
        <element name="custom_design_to" type="xsd:string" minOccurs="0" />
        <element name="custom_layout_update" type="xsd:string" minOccurs="0" />
        <element name="default_sort_by" type="xsd:string" minOccurs="0" />
        <element name="description" type="xsd:string" minOccurs="0" />
        <element name="display_mode" type="xsd:string" minOccurs="0" />
        <element name="is_anchor" type="xsd:int" minOccurs="0" />
        <element name="landing_page" type="xsd:int" minOccurs="0" />
        <element name="meta_description" type="xsd:string" minOccurs="0" />
        <element name="meta_keywords" type="xsd:string" minOccurs="0" />
        <element name="meta_title" type="xsd:string" minOccurs="0" />
        <element name="page_layout" type="xsd:string" minOccurs="0" />
        <element name="url_key" type="xsd:string" minOccurs="0" />
    </all>
</complexType>

在这里,如果您遵循所有元素,那么您将能够知道所有必需的属性/元素.

Here if you follow all the elements, you will be able to know what all attributes / elements are required.

对于您的问题,您是正确的,在Magento v1.5.1.0中,为同一属性提供了元素"include_in_menu".但是,Magento v1.5.0.1在"wsdl.xml"文件中没有任何此类元素,因此您将需要从数组元素列表中删除该元素.

As for your question, you are right that in Magento v1.5.1.0, the element "include_in_menu" is present for the same attribute. However, the Magento v1.5.0.1 doesn't have any such element present in the "wsdl.xml" file, and you will require to remove this element from your array elements list.

我也想让您知道,我不建议您在"complexType"数据中添加此元素,因为这将意味着您在核心&这只会在您对Magento核心进行任何升级时才会妨碍您的Magento.

Also I would like to let you know that I would not recommend you to add this element in the "complexType" data, since that will mean that you are making holes in the core & that will only hamper your Magento when you will make any upgradation of your Magento core.

希望有帮助.

这篇关于致命错误:未捕获的SoapFault异常:[103]属性"include_in_menu"是必须的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆