I am new to Magento...Installed 1.7 community Edition.
I have heard great deal about it and so far I was not impressed..anyway I am trying to add images to a Product but 'Browse files' and 'Upload' buttons are missing from the backend.
I have tried several solutions from online like:
-copying 'media' folder from 'adminhtml' folder to 'frontend',
-clearing caches,
-reforming indices,
-upgrading to latest flash player.
Nothing seems to work. If any one found solution to this problem please let me know.
These buttons are coming from flash.So check your media folder on following location
design/adminhtml/default/default/template/media
if there is no media folder then copy from fresh magento
This will solve your problem :)
Magento image uploading issue is related to flash. You need to change the settings of your browser. If you are using chrome,
Go chrome settings, or by typing chrome://settings/content
Go to Content settings => flash
Turn on Allow site to run flash
Turn off ask first
And in Firefox, you don't need to do anything, if your flash player is outdated, you need to update it
Go to
chrome://settings/content/flash
Add you website url in allow tag
Then refresh your admin panel
if git is used It's also a good to check .gitignore. it's easy to ignore "media/" instead of "/media/". Deeper media directory contains swf upload buttons.
The upload button is not displayed if JavaScript Variables
maxUploadFileSizeInBytes and maxUploadFileSize are not properly configured in the following files:
/app/design/adminhtml/default/default/template/media/uploader.phtml
/app/design/adminhtml/default/default/template/media/cms/browser/content/uploader.phtml
The variables are declared as follows:
maxUploadFileSizeInBytes = <?php echo $this->getDataMaxSizeInBytes() ?>;
maxUploadFileSize = '<?php echo $this->getDataMaxSize() ?>';
You can directly edit:
maxUploadFileSizeInBytes = 10485760; /* 10.48576 MB */
maxUploadFileSize = '104857600';
The getDataMaxSizeInBytes() and getDataMaxSize() are defined in the file:
/app/code/core/Mage/Adminhtml/Block/Media/Uploader.php
If your server is running with HHVM, the parameters PHP post_max_size and upload_max_filesize are available under the names hhvm.server.max_post_size and hhvm.server.upload.upload_max_file_size.
For this he will have to modify the appeal of these parameters in the php file Uploader.php, here's how:
Copy the file in the Local Uploader.php architecture:
/app/code/local/Mage/Adminhtml/Block/Media/Uploader.php
replace the following lines:
public function getPostMaxSize()
{
return ini_get('post_max_size');
}
public function getUploadMaxSize()
{
return ini_get('upload_max_filesize');
}
by the following:
public function getPostMaxSize()
{
$post_max_size = ini_get('post_max_size');
return $post_max_size ? $post_max_size : ini_get('hhvm.server.max_post_size');
}
public function getUploadMaxSize()
{
$upload_max_filesize = ini_get('upload_max_filesize');
return $upload_max_filesize ? $upload_max_filesize : ini_get('hhvm.server.upload.upload_max_file_size');
}
Cordially.
G
I had problem updating to magento 1.9.1, the problem was solved by copying the folder /app/design/adminhtml/default/default/template/dull
into the new magento instance.
Image upload button is a flash button so you have to download Flash Player.
You can download flash player from following link :
http://get.adobe.com/flashplayer/otherversions/
After installing flash player just need to restart your browser, now you can see the image upload button.
I found this issue in admin area. First Enable the Flash of Browser then Recheck.
These buttons use FLASH.
So if your browser does not support flash - then they will not appear.
Ensure that the app/design/adminhtml/default/default/template/media folder exists and that there are 2 files within it.
editor.phtml
uploader.phtml
Ensure that the skin/adminhtml/default/default/media folder exists and that there are 3 files within it.
flex.swf
uploader.swf
uploaderSingle.swf
If you have created your own theme (ie Theme: "mytheme" and Package "mypackage") then ensure the above applies for:
app/design/adminhtml/mytheme/mypackage/template/media
skin/adminhtml/mytheme/mypackage/media
I hope this helps.
I had the same issue and sorted by doing the following settings in Google Chrome:
Go to menu in the right corner > settings > Advanced > Privacy and Security > Content Settings > Flash > In the allow section click 'ADD' button and type your website URL.
You can check the following URL if any problem:
http://www.alvipixels.co.uk/blog/magento-product-image-upload-button-not-showing.php
I had this problem after emptying all my caches in Opera. I just added the exception of my site to the flash setting. Just make sure it is the complete url starting with http(s). I one case I opened the flash player properies and first deleted all content using the delete all button on the advanced tab.
If it is working in one browser it is usually NOT a magento code error in another browser.
Google Chrome is blocking these buttons because they are flash. follow these steps:
Open Google Chrome
Click on the three dots in the top right hand corner of the browser
Click on settings
Scroll down to advanced and click expand
Scroll down to Privacy and security and click on content setting
Click on flash
Under allow click on add
Copy the homepage link to the website
Here's a tutorial on fixing Magento upload buttons in more details
Related
I am making changes in my theme templates in OpenCart 3. Due to template caching I have to clear cache every time under "storage/cache" directory. It is very annoying when working and previewing changes frequently during development. Please provide some solution how we can configure caching according to production and development environment.
Note: I have already searched for solutions online but there is no solution related to template caching. Solutions are available to disable image caching but "Image Caching" and "Template Caching" are different features provided in Opencart.
You might need to upgrade to a more recent version of OpenCart3 - the first one (3.0.0.0) didn't have a way of doing this in the GUI.
More recent versions, such as 3.0.2.0, have a gear on the admin dashboard. Click the gear and you get options to disable caching.
Another way to do this:
Open to system\library\template\Twig\Cache\Filesystem.php, find following lines of code
public function load($key)
{
if (file_exists($key)) {
#include_once $key;
}
}
Comment out as in the following code:
public function load($key)
{
// if (file_exists($key)) {
// #include_once $key;
// }
}
This will remove the template cache of the twig and recreate every time, once development is over you have to remove the comment.
You can also do this from CODE directly if you have the access. Go to this file path below via ftp or cPanel:
system\library\template\Twig\Environment.php
Find
$this->debug = (bool) $options['debug'];
Replace:
$this->debug = (bool) true;
Opencart Version 3.0.2.0
I was having same problem, try working in theme editor or the actual raw twig file, after an hour or two i tried this it worked.
Delete the changes in theme editor and got back editing actual twig file
my screen shot
I think you edit the template as the path: Design->Theme Editor before.
Clear all of the date in the oc_theme data table of your database.
Scott's answer is best but in case it's not available due to version or you want to disable it programmatically you can do this anywhere before the twig is rendered:
$this->config->set('template_cache', false);
in OC 3.0.3.6, if you have some twig extension, like twig managers, after changes maded you should select that extention in modifications and refresh push button on top right corner.
P.S. loose whole day to find this, hope it helps someone
This is similar to Scott's answer but just on the database/backend. In case you can't rely on the UI and can only access the DB (like me, I'm messing up with the UI) it's on settings table search for 'developer_theme' key and set it to false or 0.
UPDATE `oc_setting` SET `value` = '0' WHERE `oc_setting`.`key` = 'developer_theme';
baytalebaa.com
wordpress,
first
1- search for "fontawesome" using inspect
the following link casing my website to slow down by 2 sec
and i want to remove it .
2- http://baytalebaa.com/?ngg_serve_fontawesome_css=1&ver=4.6.1
it seems that nextgen plugin is calling it , how to stop it ? please help
i have tried the following
wp_dequeue_style( 'fontawesome' );
didnt work...
You can try to edit the plugin directly and serve the CDN version of the plugin, or remove the reference all together.
An alternative option is to serve the plugin files directly from CDN and distribute them via Cloudfront or an alternative service if you are not doing so already.
W3 Cache is a great plugin for managing issues like this.
You can try following code on page load. this might be helpful for you.
function remove_unwanted_css(){
wp_dequeue_style(‘font-awesome’, ‘https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css’);
}
add_filter(‘wp_print_styles’, ‘remove_unwanted_css’);
NOTE: I already use wp_dequeue_script or wp_deregister_script but not successfull
Here is the scenario, i make a image slider plugin that use jquery-cycle2 and it work successfully.
There is a user who used a wp theme and in theme there is a jquery-cycle1, now when he install my plugin the jquery-cycle1 and jquery-cycle2 conflicts, when user delete the jquery-cycle1 file all things work fine and perfectly but i don't want to delete file by user.
Now i am trying that when user install my plugin the jquery-cycle1 in theme close or deregister or stop its effect.
I get file from theme successfully
if((file_exists($theme_file_path."/jquery.cycle.all.js"))){
echo "yes";
}
but i have no idea to close jquery-cycle1 file or stop its effect.
Last Option: I have last solution that delete the file from theme but its my last option.
Please any suggestions, help me.
You will have to place an incompatibility notice on your theme.
It is not possible to attempt to detect the existence of script from server side. You are able to detect queued scripts via the word press methods, however, this assumes that the user has not simply linked the file with a <script></script> tag. The file_exists method assume the file is stored on the server itself - it could be linked from a CDN or another server.
Also, whatever methods you use to detect and remove jQuery-Cycle; You are going to break any feature on the site that uses the existing plugin.
Thus, any solution you able to devise would either be extremely complicated, or would not be generalised enough to account for all these possibilities.
You may be able to use the following to prevent loading your script
if (jQuery().cycle) {
// Script already loaded
console.log("Error: Another version of jQuery-Cycle is already loaded!");
} else {
// Load your script
}
but this cannot unload what is already loaded.
There is a simple hack you can do on you end. In the Cycle2 source replace all $.fn.cycle with $.fn.cycle2 and ).cycle( to ).cycle2(.
I am using the source from here http://malsup.github.io/jquery.cycle2.js
After that You can access it like
$("#id").cycle2({option})
Here is a demo http://jsfiddle.net/33g6z79h/
Here i assume that you are not using cycle events http://jquery.malsup.com/cycle2/api/#events
and cycle extra transitions.
If you are using it you can make a fiddle for your cycle2 implementation and i would be glad to help :)
Forgive me for my English
I am new in PHP. And I'm building a site using Silverstripe and trying to configure Vimeo-Service-module. I'd follow the steps from this link
https://github.com/r0nn1ef/Silverstripe-Vimeo-Service-module
I did everything that mentions in the article. And created a page in admin panel of VimeoGallery page type and set the parameters on Videos tab to grab the videos for display.
After created page, I visited my and clicked on video menu but then all I see is no videos returned. It is showing blank page and no any error messages.
Is that I've done anything wrong. Please guide me...
Thanks in advance.
OK, I think I see the issue here. You are calling VimeoService::setAPIKey() however accessing the method like that is deprecated in the new version (the 2.0 branch - I was incorrect in my comment when I mentioned master) of the module.
The module instead uses the Site Config in the CMS to set the API key and a few other settings.
Now just remove VimeoService::setAPIKey() from your _config.php file, run /dev/build and set the API key through the CMS.
EDIT
On line 142 of VimeoGalleryPage.php, there is a function called flushCache. Replace the code in that function with the following:
public function flushCache($persistent = true) {
parent::flushCache($persistent);
unset($this->_cachedVideos);
}
Basically, the code in the 2.0 branch for this function does not correctly extend the same named function in SiteTree.
This is how I call the editor:
new nicEditor({
buttonList : ['bold','italic','underline','upload'],
iconsPath:'img/nicedit.png',
uploadURI : 'http://server.com/integracion/files/nicUpload.php'
}).panelInstance(textareaId);
And the .php file exists ( and I the one in the Docs, and I updated the target paths )
/* I want them here http://server.com/integracion/files/uploads/ so... */
define('NICUPLOAD_PATH', './uploads'); // Set the path (relative or absolute) to
// the directory to save image files
define('NICUPLOAD_URI', '/uploads'); // Set the URL (relative or absolute) to
// the directory defined above
But I on response when upload completes (and of corse an alert from nicedit..)
<script>
try {
top.nicUploadButton.statusCb({"error":"Invalid Upload ID"});
} catch(e) { alert(e.message); }
</script>
what am I missing?
-EDIT
I think the problem might be in the php file:
$id = $_POST['APC_UPLOAD_PROGRESS']; /* APC is installed and enabled */
if(empty($id)) {
$id = $_GET['id'];
}
FINAL EDIT:
I have managed to make this work!
Here is an working example:
http://simplestudio.rs/yard/nicedit/
Uploaded images are going to be stored here:
http://simplestudio.rs/yard/nicedit/images/
And here is the whole code, just unpack it and put on your server, mainly I needed to adjust nicEdit.js because it had some issues.
http://simplestudio.rs/yard/nicedit/nicedit.rar
Just make your code with that js file and by looking at my example, it will work :)
Also you need to have php APC installed so that this script can work:
http://php.net/manual/en/apc.installation.php
If you by any mean have some problems I am here to solve it.
I will not delete this example on my server so that everybody who have this issue can freely download it...
The code responsible for image upload is the method uploadFile, it is looking for uploadURI option parameter.
You will need to modify onUploaded event handler to parse your custom response instead of the imgur's one (sample). By default it expects at least {"upload": { "links": {"original": "http://..."}, "image": {"width": "123" } }}.
I'm sorry but I can't help with the FormData() handling server side with PHP.
For more information you can try out the demo page on the nicEdit web site using Firebug or WebInspector to snoop the network requests, and, of course, the source code.