Page 1 of 2

After migrate, image menager stoped working.

Posted: Wed Apr 04, 2018 8:59 pm
by DesignCart
I have problem with my Opencart. After migrate, image menager stoped working. When I click button "edit image", I see only dark, transparency background from modal window but image menager not run. I check defines url from config.php and everything is fine there.
Somebody know how fix it?

???

Re: After migrate, image menager stoped working.

Posted: Wed Apr 04, 2018 10:22 pm
by straightlight
No OC version posted.

Re: After migrate, image menager stoped working.

Posted: Wed Apr 04, 2018 10:26 pm
by DesignCart
I'm sorry. My OC version is 2.3.0.2

Re: After migrate, image menager stoped working.

Posted: Wed Apr 04, 2018 10:27 pm
by straightlight
When clicking on the image manager button, use the Developers Kit and view the console tab. Do you see events appearing when clicking the image manager button at the same time?

Re: After migrate, image menager stoped working.

Posted: Wed Apr 04, 2018 10:31 pm
by Qphoria
If using Chrome:
1. Hit F12 (on windows). That opens the console
2. Click the "Network" tab
3. Then click the "XHR" sub-tab/button
4. Now try to open the image manager and see if there are any errors or if the status is something other than 200

Right click on the image below and choose "Open image in new tab" to see it full size

Re: After migrate, image menager stoped working.

Posted: Wed Apr 04, 2018 10:32 pm
by DesignCart
Yes, I also checked it. The console is not showing anything. Php error logs is also clean

Re: After migrate, image menager stoped working.

Posted: Wed Apr 04, 2018 10:37 pm
by straightlight
What about Qphoria's solution?

Re: After migrate, image menager stoped working.

Posted: Wed Apr 04, 2018 10:38 pm
by DesignCart
Qphoria XHR is clean also

Re: After migrate, image menager stoped working.

Posted: Wed Apr 04, 2018 10:41 pm
by straightlight
Try with another browser noticing any errors from the developers kit or if it's also empty.

Re: After migrate, image menager stoped working.

Posted: Wed Apr 04, 2018 10:46 pm
by DesignCart
In Mozilla is this same. Do You see dargk grey background? Bootsrap want run but in menager must be some problems.

Re: After migrate, image menager stoped working.

Posted: Wed Apr 04, 2018 11:01 pm
by straightlight
Follow these instructions and retry QPhoria's process afterwards: https://stackoverflow.com/questions/186 ... -the-conso

Re: After migrate, image menager stoped working.

Posted: Thu Apr 05, 2018 12:58 am
by DesignCart
I don't see in bottom. Do You thing about this from my attachment?

Re: After migrate, image menager stoped working.

Posted: Thu Apr 05, 2018 1:20 am
by straightlight
From which route location are you using the image manager feature in the admin right now?

Re: After migrate, image menager stoped working.

Posted: Thu Apr 05, 2018 3:47 pm
by DesignCart
In all admin: catalog/product/edit, catalog/product/add, catalog/option/edit, catalog/option/add etc.
I no longer have any idea what it can be.
:-\

Re: After migrate, image menager stoped working.

Posted: Thu Apr 05, 2018 8:18 pm
by straightlight
In admin/view/javascript/common.js file,

find:

Code: Select all

success: function(html) {
					$('body').append('<div id="modal-image" class="modal">' + html + '</div>');

					$('#modal-image').modal('show');
				}
replace with:

Code: Select all

success: function(html) {
					$('body').append('<div id="modal-image" class="modal">' + html + '</div>');

					$('#modal-image').modal('show');
				},
				error: function(xhr, ajaxOptions, thrownError) {
					alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
				}
Try the image manager again afterwards. Do you see an error message appearing?

Re: After migrate, image menager stoped working.

Posted: Thu Apr 05, 2018 8:47 pm
by DesignCart
No. There are not any errors. In Attachments I send screen.
Everything worked well on localhost.

Re: After migrate, image menager stoped working.

Posted: Thu Apr 05, 2018 9:12 pm
by straightlight
Looks like a restriction in effect issue. What are your php.ini, .htaccess, config.php and admin/config.php file configurations (without provided passwords from the config files)?

Re: After migrate, image menager stoped working.

Posted: Thu Apr 05, 2018 10:10 pm
by DesignCart
I don't change php.ini

magic_quotes_gpc = Off;
register_globals = Off;
default_charset = UTF-8;
memory_limit = 64M;
max_execution_time = 18000;
upload_max_filesize = 999M;
safe_mode = Off;
mysql.connect_timeout = 20;
session.auto_start = Off;
session.use_only_cookies = On;
session.use_cookies = On;
session.use_trans_sid = Off;
session.cookie_httponly = On;
session.gc_maxlifetime = 12000000;
allow_url_fopen = on;

in .httaccess I add redirect from not www to www

Re: After migrate, image menager stoped working.

Posted: Thu Apr 05, 2018 10:11 pm
by straightlight
in .httaccess I add redirect from not www to www
It should be .htaccess, however. What changes did you made?

Re: After migrate, image menager stoped working.

Posted: Thu Apr 05, 2018 10:20 pm
by DesignCart
It is my .htaccess

Code: Select all

 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
 Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines :
# Order deny,allow
# Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteCond %{HTTP_HOST} ^xxxxxxxx.com [nc]
RewriteRule ^(.*)$ http://www.xxxxxxxx.com/$1 [r=301,nc]

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none