19

I encountered a very weird error which i can't seem to solve. Anywhere in the admin area where i want to upload/view/delete images nothing is showing up.

My 'inspect element' console gives me this error:

Uncaught ReferenceError: id_23b2a41c446dee70b327b51065e06137_UploaderJsObject is not defined 

I tracked this down to the gallery.phtml file which has this code:

<script type="text/javascript">
//<![CDATA[
    var <?php echo $_block->getJsObjectName(); ?> = new Product.Gallery('<?php echo         $_block->getHtmlId() ?>', <?php if ($_block->getElement()->getReadonly()):?>null<?php     else:?><?php echo $_block->getUploader()->getJsObjectName() ?><?php endif;?>, <?php echo $_block->getImageTypesJson() ?>);
//]]>
</script>

I have absolutely no clue what went wrong here. I haven't messes with any core files. Nor did i change any javascript things.

I'm hoping someone can help me find out what is wrong. Been stuck on this error since yesterday..

Any help is appreciated :)

Wesley Smits
  • 1,314
  • 6
  • 23
  • 37

7 Answers7

37

Recently cloned a repo or trying to set up another magento environment and seeing this error? check to see if the following files are in their proper places that may have been left behind due to being binary file (swf flash file) or ignored by version control software:

/skin/adminhtml/default/default/media/uploader.swf
/skin/adminhtml/default/default/media/uploaderSingle.swf
/skin/adminhtml/default/default/media/editor.swf
/skin/adminhtml/default/default/media/flex.swf

and for good measure these files:

/app/design/adminhtml/default/default/template/media/uploader.phtml
/app/design/adminhtml/default/default/template/media/editor.phtml

And someone below was kind to mention as of magento 1.9:

/skin/adminhtml/default/default/media/editor.swf

does not exist, so don't worry about that file.

Danny Z
  • 659
  • 6
  • 11
5

I had the same problem.

In my php.ini the max_post was set to 0 which should disable it, however this breaks the JS Uploader as it queries php's max upload size.

I Just set it to 100M and the browse and upload buttons appeared.

Ronnie Hyslop
  • 61
  • 1
  • 4
1

In my case, removing the file Dull_Uploader.xml from /app/etc/modules solved this specific problem.

Meetai.com
  • 6,622
  • 3
  • 31
  • 38
  • performed an upgrade from 1.7 to 1.9 and the images / buttons were missing in the admin area. Disabling this sorted the issue. – Andrew Aug 01 '14 at 12:47
0

Oke, wow my collegae just found it a second after posting this question.

If anyone else has this problem.

Somehow certain files in the skin folder went missing.

Hope someone will find this information useful.

Wesley Smits
  • 1,314
  • 6
  • 23
  • 37
0

I checked everything that is given in this page and all files are in right place. Further investigating took me to this page.

Then I realize I am in firefox, and that could be the reason.

After installing flash player it all working fine.

Hope this will help someone.

Update -1 (in case ref link changes):

Check for the flash player

http://helpx.adobe.com/flash-player.html
Your magento root directory should not be password protected using .htpasswd file.

Please post if you are getting any error.
Community
  • 1
  • 1
Adarsh Khatri
  • 358
  • 1
  • 5
  • 23
0

The answer given be @danny-z seems to have done the trick.

I'd like to also add that the permissions of all of those files should be set to 0644. So simply cd into each of those directories and check the current permissions using ls -l. They should appear as -rw-r--r--. If they do not then do chmod 0644 * (make sure you are inside the directory when running this so it only affects those files) and then check them again to make sure it worked.

Also, @KPheasey mentions above in a comment that .gitignore was excluding all media. I understand that to mean that when deploying the site to the server all media was excluded because of the .gitignore, but having media in .gitignore locally will not prevent those files from working locally. Just wanted to clarify because I was a bit confused at first by that comment.

The reason the files were missing for me was because I did a tar of an existing website (to set up on my local machine) and excluded media so that I did not get a huge file. I meant to exclude the main media folder, but by mistake excluded these as well (and perhaps others I guess).

dovid
  • 16
  • 2
  • 3
0

At last I got it resolved by installing flash on my ubuntu 16.04:

sudo apt install adobe-flashplugin
shemaya
  • 156
  • 2
  • 13