您好,登录后才能下订单哦!
我有Magento的CE 1.9.2.4一起安装的补丁(5377,1533,4788等几乎所有的补丁)。
这个问题也揭示可能/肯定会出现在涉及图像上传自己定制的部分,而不仅仅是核心的Magento问题的任何自定义模块的问题。
现在,当我安装了最新的补丁8788通过命令行,我无法打开“添加/编辑”我的自定义模块,这是之前8788的安装做工精细的页面。
我收到以下错误,当我尝试打开我的模块中的“添加新旗帜”页面:
致命错误:调用一个成员函数setUrl()一个非对象在/home/site_user/public_html/app/code/community/My/Module/Block/Adminhtml/Banner/Add/Tab/Image.php在线57
罪魁祸首线如下:
$this->getUploader()->getConfig()->setUrl(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/*/p_w_picpath'))
我也看不到管理员已上传产品图片Catalog > Manage Products > Any product > Images
部分。
下面是核心Mage_Adminhtml_Block_Media_Uploader
被称为类。
<?php/** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magento.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magento.com for more information. * * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) *//** * Adminhtml media library uploader * * @category Mage * @package Mage_Adminhtml * @author Magento Core Team <core@magentocommerce.com> *//** * @deprecated * Class Mage_Adminhtml_Block_Media_Uploader */class Mage_Adminhtml_Block_Media_Uploader extends Mage_Uploader_Block_Multiple{ /** * Constructor for uploader block */ public function __construct() { parent::__construct(); $this->getUploaderConfig()->setTarget(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/*/upload')); $this->getUploaderConfig()->setFileParameterName('file'); }}
任何人都让我知道如何用最少的代码更改尽可能解决这个问题。
麦进斗科技:http://www.maijindou.com.cn/
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。