cforms II User Forum

Registration is currently disabled.


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


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 . 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 + "//" +'/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] File does not exist: /path-to-site/wp-content, referer:

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 + "//" +'/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?



Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
19 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: 3757

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5355

Posts: 18732

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

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

Administrators: Oliver (6400), Nicky (3)