Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento 致命错误:未捕获的SoapFault异常:[103]属性";包括“U菜单中的U”;是必需的_Magento - Fatal编程技术网

Magento 致命错误:未捕获的SoapFault异常:[103]属性";包括“U菜单中的U”;是必需的

Magento 致命错误:未捕获的SoapFault异常:[103]属性";包括“U菜单中的U”;是必需的,magento,Magento,“致命错误:未捕获的SoapFault异常:[103]属性“包含在菜单中”是必需的。”在我使用Magento API创建类别时抛出 在MagentoAPI中,它说我需要这样一个数组 array( 'name'=>'Newopenerp', 'is_active'=>1, 'include_in_menu'=>2, 'available_sort_by'=>'p

“致命错误:未捕获的SoapFault异常:[103]属性“包含在菜单中”是必需的。”在我使用Magento API创建类别时抛出

在MagentoAPI中,它说我需要这样一个数组

         array(
            'name'=>'Newopenerp',
            'is_active'=>1,
            'include_in_menu'=>2,
            'available_sort_by'=>'position',
            'default_sort_by'=>'position'
           )
当我使用Magento 1.5.1在localhost中运行脚本时,一切看起来都很好。在使用Magento 1.5.0的服务器中时,引发了此异常。我想知道这是否是由版本更改引起的

我尽了最大的努力调试这个,一天后什么也没有得到。我确定这是Magento API的问题,也许Magento 1.5.0中的“
include_in_menu
”还有另一种数据类型

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

PS: 我在网上得到了一些有用的信息。但它不是用英语写的,所以我不明白它的意思。希望对任何人的帮助都有帮助


提前感谢。

不应该
在菜单中包含\u
是布尔值,因此
1
0

请转到此路径“
app/code/core/Mage/Catalog/etc/
”,并打开此文件“
wsdl.xml
”。然后转到这一行#187,您将发现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>

在这里,如果您遵循所有元素,您将能够知道需要哪些属性/元素

至于您的问题,您是对的,在Magento v1.5.1.0中,元素“
include_in_menu
”用于相同的属性。但是,Magento v1.5.0.1在“
wsdl.xml
”文件中没有任何此类元素,您需要从数组元素列表中删除此元素

另外,我想让您知道,我不建议您将此元素添加到“
complexType
”数据中,因为这将意味着您正在核心中制造漏洞&这只会在您升级Magento核心时妨碍您的Magento


希望有帮助。

好吧,我粘贴了来自MagentoAPI的这段代码。我的代码中有1个用于在菜单中包含,但它仍然不起作用。无论您分配给它什么,它都会抛出此异常。所以我想知道这个数据类型在Magento 1.5.0中是否有所不同。非常感谢您的帮助。我终于知道在哪里可以找到API属性了。但即使我在Magento V1.5.0.1中从数组中删除include_in_菜单,它仍然抛出异常。然后我在服务器文件中检查上面路径中的wsdl.xml,与上面的代码粘贴一样,没有这个属性。我不知道发生了什么,也许我应该在服务器上尝试Magento v1.5.1。如果您可以将Magento升级到最新版本1.5.1.0,请继续。进入最新的联赛总是最好的。是的。我们已将服务器上的Magento升级到1.5.1.0。非常感谢你!还有一个问题要请教你!我想我需要交些学费,哈哈