| Post |
|
New Member | sven posts 5 6:55 pm March 3, 2009
| |
|
|
Hallo,
I have several problems with Ajax functions both in backend and frontend. I use WP 2.7.1 and cforms 10.3. Everytime I get a 'Undefined variable: abspath …' message in my error-logs and some otherresulting messages (such as 'Failed opening required 'wp-config.php'' …). But there is a abspath.php with the right path in my cforms directory. The path to WP is /srv/www/vhosts/designxxl24.de/wp-test/ and in my abspath.php I have <?php $abspath='/srv/www/vhosts/designxxl24.de/wp-test/'; ?>.
If I delete the abspath.php some of the Ajax functions work (such as the 'Input Field Settings') but others (like the tinyMCE form insert) don't.
The form in my frontend only works if Ajax is disabled in cforms, otherwise I get an endless 'One moment please …' on submitting.
What else can be interesting? My htaccess contains the following:
RewriteEngine On
RewriteBase /wp-test/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ./wp-test/index.php [L]
I think that's ok.
Is there some solution?
|
|
|
Admin
| Oliver Munich, Germany posts 6237 7:53 am March 4, 2009
| |
|
|
If you have setup your WP's wp-content/ & WP plugins/ folder in the default places (which it does automatically) you don't necessairly need abspath.php since cforms will assume a relative path to WP's root folder.
Concerning your hanging form check the FAQs or do a for "sajax_uri"
|
|
|
|
|
New Member | sven posts 5 8:41 pm March 4, 2009
| |
|
|
Thanks for your reply!
I read some of the sajax_uri posts and first nothing won't work.
Now I changed var sajax_uri = '/wp-content/plugins/cforms/lib_ajax.php'; to var sajax_uri = '/wp-test/wp-content/plugins/cforms/lib_ajax.php'; and cleared the cache. After a few moments the contact form worked fine.
So there is only one little problem: If I want to insert a form with the tinyMCE cforms button I get only an empty little window and no list of my forms. I only can insert an new form per code.
Is there a solution for this?
The errorlog says the following: PHP fatal error: require_once(): failed opening required 'wp-blog-header.php' in /srv/www/vhosts/designxxl24.de/httpdocs/wp-test/wp-content/plugins/cforms/js/insertdialog25.php on line 9 and also a notice that the variable abspath is undefined … I deleted the abspath.php
By the way … great plugin. Thanks for your work! I hope to understand it's complete functionality soon ;o).
|
|
|
Admin
| Oliver Munich, Germany posts 6237 9:59 pm March 4, 2009
| |
|
|
So it doesn't work without abspath.php?
Then try to create it per the instructions in the warning message and make sure that the suggested path is correct.
|
|
|
|
|
New Member | sven posts 5 12:11 am March 5, 2009
| |
|
|
In the frontend everything is fine now (without abspath.php).
But the insertdialog in the tinyMCE is empty … with and without an abspath.php. Also I get the message of the undefined variable abspath no matter if the abspath.php with it exists or not.
If the abspath.php with the above code exists the contact form hangs with a "One moment please …" and I get a similiar error message as above (Undefined variable abspath in /srv/www/vhosts/designxxl24.de/wp-test/wp-content/plugins/cforms/lib_ajax.php in line 15 … and … require_once(): Failed opening 'wp-config.php' in /srv/www/vhosts/designxxl24.de/wp-test/wp-content/plugins/cforms/lib_ajax.php in line 15). Also the "Input Field Settings"-dialog keeps empty if I call it. Here I get also a similiar message … this time textfield.php line 11 is searching for wp-config.php.
If I delete the abspath.php everything is fine except the insertdialog keeps empty.
Very strange.
|
|
|
New Member | jriemerm posts 5 6:32 pm March 5, 2009
| |
|
|
I'm having what sound like the same problems–can't use the tinymce button to insert a form, and get empty "Input Field Settings" dialog. Both sajax_uri and abspath are correct as near as I can tell.
|
|
|
|
|
Admin
| Oliver Munich, Germany posts 6237 7:35 pm March 5, 2009
| |
|
|
The errors you describe usually are due to…
- a missing abspath.php file
- wrong path in abspath.php (double and triple check!)
- js/cforms.js / sajax uri path
- .htaccess / server security settings
- file permissions
I'm happy to take a closer look, feel free to send me temp login credentials via email (see contact form at the top)
|
|
|
|
|
New Member | jriemerm posts 5 8:35 pm March 5, 2009
| |
|
|
I just checked to make sure–a site where I still have version 10.1 of cforms installed is not having these problems. I am pretty sure the problems arose when I first installed 10.2, and continued with 10.3.
|
|
|
|
|
New Member | sven posts 5 12:27 pm March 7, 2009
| |
|
|
I've got it!
As I wrote I don't use a abspath.php, because it won't work with it (I don't know why).
And without abspath.php everything worked fine except the insertdialog in tinyMCE.
Now I take a look in the code of insertdialog25.php and I saw there is a 'else' missing. In every or most of the other script files you have something like this
if ( file_exists('../../abspath.php') ) include_once('../../abspath.php'); else $abspath='../../../../../';
but in insertdialog25.php the else part is missing. Now I added in insertdialog25.php
else $abspath='../../../../';
and everything works as desired.
Maybe it should officially be added?
Thanks again for your work.
Sven
|
|
|
Admin
| Oliver Munich, Germany posts 6237 12:38 pm March 7, 2009
| |
|
|
very nice catch sven, thanks. it's fixed in v10.4 to be released any time now.
|
|
|
|