The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Error with both API on external form - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17) +--- Thread: Error with both API on external form (/showthread.php?tid=1681) |
Error with both API on external form - cpicker - Oct 10th, 2011 Hello, I am a new user of Form Tools 2.1.4. My hosting provider is MidPhase. I am running my site with MODx Revo 2.1.3. I am able to login to the UI, create internal forms, clients, login with those clients etc. I have a problem, however, when trying to manage external forms. The following message appears when I attempt to use the API. Quote:Uh-oh. The hostname in config.php is localhost, the DB username and password are correct, and since I am able to use the UI I suspect that this message is really indicating some other issue. I have checked the Apache & MODx logs and there is no pertinent data there. I have also included these DEBUG statements in the config.php: $g_debug = true; $g_api_debug = true; $g_default_error_reporting = "2047"; Unfortunately the only message I get is the one above. Can you suggest anything else that might help me narrow down the cause? RE: Error with both API on external form - Ben - Oct 11th, 2011 Hi cpicker, Ah! I added that in 2.1.0 to completely shut things down in the event of really serious errors that will prevent the script from working at all. Is your API form on the same host as your Form Tools installation? If not, you'll see that error. Is it on the same website? Also, how are you including the API? Make sure you're doing a require_once("..."); with the path to the api.php file, and not the URL. - Ben RE: Error with both API on external form - cpicker - Oct 11th, 2011 Good morning Ben, The Form Tools app is installed on the same host & same website, in /ftools. I am including the API using require_once('full/path/to/api.php') as specified in the docs. I suspect that FTools and MODx are tripping over each other but I can't seem to get any more info to help isolate the problem. The DIRECT method works fine but I want to have more flexibility with the submissions both before and after they are created. RE: Error with both API on external form - Ben - Oct 11th, 2011 Hmm... that's kind of weird! There's really no difference between the way the files are included when you include the API and how the core script does it. The API includes a couple of extra files, but that's pretty much it... curious. I don't know much about MODx, so maybe you're right. Any chance you could you get me a temporary FTP account so I could look at it? If so, email me at ben.keen@gmail.com - Ben RE: Error with both API on external form - cpicker - Oct 13th, 2011 Howdy Ben, Have you had a chance to look into this yet? I sent you the info you requested at ben.keen@gmail.com. Is there any way I can get more specific info about this error? I just need a starting point, I can get the MODx experts involved and maybe track this down and come up with a fix or a workaround. RE: Error with both API on external form - Ben - Oct 15th, 2011 Hi cpicker, Ack! I'm so sorry, but I didn't get your email! Try sending me another - or send me a PM with the info; that'll ensure it gets through. - Ben |