Uploading image on localhost | Support Questions | Support Forum

A A A

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Uploading image on localhost
January 12, 2019
7:45 am
Lukmatt
Member
Members
Forum Posts: 5
Member Since:
January 12, 2019
sp_UserOfflineSmall Offline

Hello,

I'm trying the awpcp plugin on my local machine. 

I have WP 4.9.9 and AWPCP 3.9.3

I have try with Chrome, IE and Firefox.

I have problems on uploading images: I have try to select from browse on my pc window and also with drag and drop function but when I slect image the only things that I see is an element under the box with some option and no preview of the image uploaded.

On the console I have this error:

moxie.min.js?ver=1.3.5:2
Uncaught DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL
at d.send (http://localhost:8080/mysite/w......5:2:29002)
at d.exec (http://localhost:8080/mysite/w......5:1:21006)
at d.shimExec (http://localhost:8080/mysite/w......5:1:22078)
at d.exec (http://localhost:8080/mysite/w......5:1:22211)
at e (http://localhost:8080/mysite/w.....3.5:2:5596)
at n.i (http://localhost:8080/mysite/w.....3.5:2:6132)
at n.send (http://localhost:8080/mysite/w.....3.5:2:9453)
at f (http://localhost:8080/mysite/w......9:1:10078)
at g.Uploader.r (http://localhost:8080/mysite/w......9:1:10834)
at g.Uploader.dispatchEvent (http://localhost:8080/mysite/w......9:1:14736)

 

Wait your feedback.

Tanks

Best Regards

 

awpcp_upload_image_error-1.jpgImage Enlarger

January 14, 2019
8:12 am
AWPCP Support
Moderator
Members

Moderators
Forum Posts: 5262
Member Since:
September 4, 2013
sp_UserOfflineSmall Offline

Hi Lukmatt,

Thanks for your post. Sorry that you ran into issues with this!

We are happy to help troubleshoot this issue with you. 

We should do a check for theme and plugin conflicts. Theme and plugin conflicts are very common in WordPress, and a conflict test is used to help determine the cause of the issue. Please conduct the test and let me know the results. Here is an article about how to test for theme and plugin conflicts with AWPCP, which may help pinpoint the issue: http://awpcp.com/forum/faq/how.....conflicts/

That will help us troubleshoot the issue a little faster. Please let me know what you find. 

January 15, 2019
4:11 pm
Lukmatt
Member
Members
Forum Posts: 5
Member Since:
January 12, 2019
sp_UserOfflineSmall Offline

Hello Support,

I have check your procedure for testing if there is some conflict with other plugins or with theme but I have only AWPCP plugin activated and I'm using default theme Twenty Seventeen and the problem still persists.

Wait your feedback.

Thanks.

Regards

January 16, 2019
8:15 am
AWPCP Support
Moderator
Members

Moderators
Forum Posts: 5262
Member Since:
September 4, 2013
sp_UserOfflineSmall Offline

Hi Lukmatt,

Thanks for trying that.

Can you tell me a bit more?
- What version of WP are you running here?
- What exact version of AWPCP?  (number, please)
- What exact version of any other AWPCP Modules? (number, please)
- Can you please send a link to the affected site? 

Please let me know. 

January 16, 2019
2:05 pm
Lukmatt
Member
Members
Forum Posts: 5
Member Since:
January 12, 2019
sp_UserOfflineSmall Offline

Hi Support,

- What version of WP are you running here? --> 4.9.9
- What exact version of AWPCP?  (number, please) --> 3.9.3
- What exact version of any other AWPCP Modules? (number, please) --> no other modules, i'm trying free base version
- Can you please send a link to the affected site? --> No I can't because I'm on my local host.

This is the error reported on Chrome console:

Uncaught DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL
at d.send (http://localhost:8080/mysite/w......5:2:29002)
at d.exec (http://localhost:8080/mysite/w......5:1:21006)
at d.shimExec (http://localhost:8080/mysite/w......5:1:22078)
at d.exec (http://localhost:8080/mysite/w......5:1:22211)
at e (http://localhost:8080/mysite/w.....3.5:2:5596)
at n.i (http://localhost:8080/mysite/w.....3.5:2:6132)
at n.send (http://localhost:8080/mysite/w.....3.5:2:9453)
at f (http://localhost:8080/mysite/w......9:1:10078)
at g.Uploader.r (http://localhost:8080/mysite/w......9:1:10834)
at g.Uploader.dispatchEvent (http://localhost:8080/mysite/w......9:1:14736)

 

Wait your reply.

Thanks

Regards

January 17, 2019
9:10 am
AWPCP Support
Moderator
Members

Moderators
Forum Posts: 5262
Member Since:
September 4, 2013
sp_UserOfflineSmall Offline

Hi Lukmatt,

Thanks for that information. I will have my developer check into this and I'll report back when I know more. Thanks for your patience.

January 18, 2019
8:35 am
AWPCP Support
Moderator
Members

Moderators
Forum Posts: 5262
Member Since:
September 4, 2013
sp_UserOfflineSmall Offline

Hi Lukmatt,

I have heard back from the developer on this:

-----------------------

Could you please ask the customer to send us the full URL that appears on the Network tab in Chrome's console when that error occurs?

I recommend that the customer clear the entries on that tab right before attempting to upload a new image. It is possible that multiple URLs appear when the error occurs, so if the customer can't identify the one associated with the error, they can send all the URLs that appear at that moment and I can take a look.

The error says the URL is invalid, so it would be really helpful to see what URL is the plugin trying to use.

-----------------------

Please let me know.

January 19, 2019
7:20 am
Lukmatt
Member
Members
Forum Posts: 5
Member Since:
January 12, 2019
sp_UserOfflineSmall Offline

Hello,

I've tried to recover full URL from Network tab in Chrome's console but i'm not able to see where it was located. I've tried also to check on Console tab but I dont had found anything.

So, since I'm a software developer though I didn't not really know too much on web programming language, I have try to fixed the problem and now images are successfully uploaded. Following developer's hint, I have printed on the console the URL that was causing problem and I have found that was having port number repeated two times. The URL was:

http://localhost:8080:8080/my_site/wp-admin/admin-ajax.php

Then I remove one occurency of :8080 and now it is woking. Probably is a workaround but it is only for working on my local machine. 

The modify that I've done is inside javascript file moxie.min.js.

The line of code is the one underlined and bolded:

-----------------------------------------------------------------------

.

.

.

var m, n, o = this;
b.extend(this, {
send: function(c, e) {
var h = this
, k = "Mozilla" === i.browser && i.verComp(i.version, 4, ">=") && i.verComp(i.version, 7, "<")
, o = "Android Browser" === i.browser
, p = !1;
if (c.url.includes(":8080")) c.url = c.url.replace(":8080", "");
if (n = c.url.replace(/^.+?\/([\w\-\.]+)$/, "$1").toLowerCase(),
m = j(),
m.open(c.method, c.url, c.async, c.user, c.password),
e instanceof f)
e.isDetached() && (p = !0),
e = e.getSource();

.

.

.

-----------------------------------------------------------------------

Check this modify with yours developers and let me know.

Best Regards.

Matteo

January 19, 2019
7:26 am
Lukmatt
Member
Members
Forum Posts: 5
Member Since:
January 12, 2019
sp_UserOfflineSmall Offline

Sorry, this is the corrected code:

.

.

.

var m, n, o = this;
b.extend(this, {
send: function(c, e) {
var h = this
, k = "Mozilla" === i.browser && i.verComp(i.version, 4, ">=") && i.verComp(i.version, 7, "<")
, o = "Android Browser" === i.browser
, p = !1;
if (c.url.includes(":8080:8080")) c.url = c.url.replace(":8080", "");
if (n = c.url.replace(/^.+?\/([\w\-\.]+)$/, "$1").toLowerCase(),
m = j(),
m.open(c.method, c.url, c.async, c.user, c.password),
e instanceof f)
e.isDetached() && (p = !0),
e = e.getSource();

.

.

.

Forum Timezone: America/Denver

Most Users Ever Online: 163

Currently Online:
11 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Johnny B: 140

godie: 120

kerdezo: 99

laburke: 94

NAIN KHAN: 93

salvig67: 84

rude: 72

purplepaula: 72

WAYTOBAYWTB52: 71

gery: 71

Member Stats:

Guest Posters: 32

Members: 37963

Moderators: 2

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 6980

Posts: 31071

Newest Members:

realtoxic, Coen Deurloo, Ewa, nailsjul24, marnails89, Rahul Bose, Nick, natinail52, I love James Bond

Moderators: awpcp: 7530, AWPCP Support: 5262

Administrators: wpengine: 0, awpcp: 298

Skip to toolbar