I just downloaded the SimpleModal 1.3.2 Contact Form to my localhost to try it out; the only change I've made is to the user settings in data/contact.php. I get the thankyou message and SimpleModal closes after I hit "send". However, something prevents the email from being sent; I never receive it in my inbox. Any comments would be welcome; it's a slick system and I'd like to use it.
Typically, that means that the problem is on the server end. You can uncomment the # in front of #mail (data/contact.php) to see if you get a server error back. If not, it means there is a problem on the system with mail delivery.
Let me know what you find out.
The fix was very simple, I just had to modify the post url path in contact.js, line 117.
Thank you very much for such a beautiful and functional contact form,
Best
Related
I have been attempting to register a OneDrive File Handler as demonstrated on GitHub.
My initial PUT seems to work but I get very flaky results when I attempt to update. I have one domain where the handler works fine but another where I get these problems:
refresh works first time but not subsequently
refresh seems to work but handler not evident in OneDrive
change and update handler but changes not seen when I refresh
Is there any way to work out what is going on? The responses I get in Postman indicate that everything has worked but the file handler is not working.
Here are some observations which may help anyone else who stumbles on this:
the forceRefresh requests seems very patchy, I can make a change in the handler manifest and only some hours later will forceRefresh actually return the changed manifest
don't make the silly mistake I did and change the version in the handler manifest to something other than 2. If you do this the manifest will upload successfully but your handler will never appear. An error response would be much nicer than a silent fail.
I often find that even once forceRefresh has worked the new handler does not appear in my browser. To fix this I go to Local Storage (in the browser dev tools) and remove the entry for 'fileHandlerCache', then do a refresh.
BTW, handlers seem like a great way to extend OneDrive but I have found the developer experience to be pretty rough. Any chance of a smoother ride?
I am trying to create a testing application to validate server side error messages. Right now our framework is such that each time a incorrect value is entered in a field and the submit button is clicked and on submission, the error message displayed on the page is captured.
Is there anyway I can bypass this technique, such that the validation happens only in the server side and is passed back to the client side, without having to reload the page each time.
Any other ideas would be much appreciated. Please try to ignore the lameness of the question :( I'm just starting off and wanted to try something new to reduce the time taken to capture the error messages.
Thanks a lot..!!
Use AJAX, Luke!
There are a lot of options to do this. You may use jQuery.ajax for sending your form data to some validation servlet. Or you may use JSF for it. It largely depends on your framework and/or architecture of your application.
I have an application which logs into an online site using POST form being sent from ASIHTTPRequest & ASIFormDataRequest.
I have a log in box, a .xib where user enters their details. Then as they click OK, it connects to the site with the details user has entered. It sends the form OK etc.
But there is a problem. I enter the incorrect details first, it connects and tells me the html of response. I can tell from the html that the details are incorrect. Now i enter the correct details, and ASI* does not even bother connecting.
When I enter the correct details first, it tells me a different html which is supposed to show whenever I enter the right log in details.
So the problem is in cache, because it doesn't bother connecting again on second request, right?
I am using Little Snitch.app, so i know when it connects, and when it does not.
Now, the question sounds: "How do I disable Cache in ASIRequests?"
Thanks a lot.
Snippet of class: http://pastebin.com/a83YCpnm
ASIHTTPRequest doesn't cache POST responses by default - see the following code in ASIHTTPRequest.m
if (![[self requestMethod] isEqualToString:#"GET"]) {
[self setDownloadCache:nil];
}
There's clearly something else going on - are you sure it's a POST request you're making? How are you enabling caching / creating the request, can you post some code please?
Alright I found out what the trouble was. I did not reallocate the ASIFormDataRequest & ASIHTTPRequest on each request, which was causing the trouble on other requests because it was being reused.
Therefore the request has been marked as complete and so it did not even bother making another request if that makes sense.
Thanks
I'm working on a site and to help catch errors that we may not hear about, I've created a custom 500 error page.
This page basically records information about the current situation and logs it including the following:
Request.Servervariables("URL")
But, the log seem to actually be providing information about the location of the error.asp file instead of the actual file causing the error. And it doesn't seem to pick up Server.GetLastError().
Any ideas on how to ensure these scripts pick up the errors and deatils about the page causing the error and not the page that is used for 500 errors?
NOTE: When there's an error, the url in the address bar is always the address fo the page causing the error, but the log shows the error handler page 'error.asp'.
I would follow what Dee said, but also be aware that there was something finicky with IIS7 (or 7.5). I can't remember exactly, but you have to do something special to make sure it works on IIS7. Check out this article. IIS7 breaks the server.getlasterror and there is a workaround provided.
Also a cool thing to do is to email yourself those errors. So in your custom 500 asp script just fire off an email with the details. Depends on how critical errors are to your program, but it's good to be in the loop rather than have another log to worry about.
I am curious about the proper way to stop a user from activating my plugin if their system does not meet certain requirements. Doing the checks is easy and I don't need any help with that, I am more curious how to tell WordPress to exit and display an error message.
Currently I have tried both exit($error_message) and die($error_message) in the activation hook method. While my message is displayed and the plugin is not activated, a message saying Fatal Error is also displayed (see image below).
Does anyone know of a better way, that would display my message in a proper error box without displaying Fatal error, it just looks really bad for new users to see that.
Thanks for any help in advance.
This is a little undocumented, as you might have noticed. Instead of die(), do it like this:
$plugin = dirname(__FILE__) . '/functions.php';
deactivate_plugins($plugin);
wp_die('<p>The <strong>X</strong> plugin requires version WordPress 2.8 or greater.</p>','Plugin Activation Error',array('response'=>200,'back_link'=>TRUE));
The lines above wp_die() are to deactivate this plugin. Note that we use functions.php in this case because that's where I have my Plugin Name meta data comment declaration -- and if you use a different file, then change the code above. Note that the path is very specific for a match. So, if you want to see what your path would normally be, use print_r(get_option('active_plugins'));die(); to dump that out so that you know what path you need. Since I had a plugin_code.php where the rest of my plugin code was, and since it was in the same directory as functions.php, I merely had to do dirname(__FILE__) for the proper path.
Note that the end of the wp_die() statement is important because it provides a backlink and prevents an error 500 (which is the default Apache code for wp_die()).
It is only a idea though. Try checking the wordpress version and compare then use php to through custom exception/error. PHP 5.0 try catch can be a good way to do it. Here is some resources.
http://www.w3schools.com/php/php_exception.asp
http://php.net/manual/en/internals2.opcodes.throw.php
You can try the first link. It is pretty basic. Thanks! hope the information will be helpful.