1

I have a trouble with upload images in Magento backend. I think there is a problem with

<?php echo $this->getJsObjectName() ?>

in app/design/adminhtml/default/default/template/media/uploader.html. I have an JS errors. This scirpt:

<script type="text/javascript">
//<![CDATA[

var maxUploadFileSizeInBytes = <?php echo $this->getDataMaxSizeInBytes() ?>;
var maxUploadFileSize = '<?php echo $this->getDataMaxSize() ?>';

<?php echo $this->getJsObjectName() ?> = new Flex.Uploader('<?php echo $this->getHtmlId() ?>', '<?php echo $this->getUploaderUrl('media/uploader.swf') ?>', <?php echo $this->getConfigJson() ?>);

if (varienGlobalEvents) {
    varienGlobalEvents.attachEventHandler('tabChangeBefore', <?php echo $this->getJsObjectName() ?>.onContainerHideBefore);
}

//]]>
</script>

on my browser looks:

<script type="text/javascript">
//<![CDATA[

var maxUploadFileSizeInBytes = ;
var maxUploadFileSize = '';

 = new Flex.Uploader('id_be78c0de320409a822bfb385331b6473_Uploader', '', );

if (varienGlobalEvents) {
    varienGlobalEvents.attachEventHandler('tabChangeBefore', .onContainerHideBefore);
}

//]]>
</script>

Do you have any ideas what's wrong is this code?

1 Answer 1

0

In Magento 1.9.3 they removed flash player buttons, so no need to worry about flash player anymore. If you are using 1.9.2, try apply the SUPEE-8788 patch, Also check this post. If you already have the patch, hope bellow steps will be helpfull.

1- Check browser console for any javascript errors.

2- inspect the 'Browse/Upload' button area to check any issues.

3- Delete all files inside the folder skin/adminhtml/default/default/media/

4- Make sure below js were included, you can view source in browser.

lib/uploader/flow.min.js
lib/uploader/fusty-flow.js
lib/uploader/fusty-flow-factory.js 
mage/adminhtml/uploader/instance.js

5- Also make sure these js files not included, if exist just remove.

lib/flex.js
lib/FABridge.js
mage/adminhtml/flexuploader.js

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.