cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

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

Topic RSS Related Topics
Odd behaviour / bug in cforms.js + upload file fields
Tags: ***
September 9, 2013
5:16 pm
Txema
Guest

Hi,

I am using cforms 14.6 and I think I have found some odd behaviour. I have already fixed it. This is just a report on the issue.

I have a website in http://domain.com/site/ . In that site I have 3 forms. Each of these 3 forms has an upload file field, which I have configured properly to store the files in their given directories.

My js/cforms.js ajax line is as follows:

var sajax_uri = window.location.protocol + "//" + window.location.host+'/wp-content/plugins/cforms/lib_ajax.php';

This all worked smoothly for months.

 

Fast forward to today.

I create a new form, this one with NO upload-file field.

The form doesn't work. Any attempt to submit ends stalled in "One moment please", and apache generates an error as follows:

[Mon Sep 09 16:40:48 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /path-to-site/wp-content, referer: http://domain.com/site/form-page/

I check it and it seems that my js/cforms.js is wrong. I should add a '/site/' between the host and wp-content.

var sajax_uri = window.location.protocol + "//" + window.location.host+'/SITE/wp-content/plugins/cforms/lib_ajax.php';

Once I changed this, it works wonders.

 

Thus, my issue is fixed, my sajax_uri was wrong, but, why was it working before? Why using an upload-file field overrides/corrects it?

 

Txema

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
37 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3739

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5339

Posts: 18706

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)