Help to find certain text/string that I found in my application


Ade Wale

Hi,

Where can I find this text for modification? Because the message was sent successfully without any issue. But the message is misleading

[img=Untitled.png]https://www.decsoftutils.com/_support/uploads/ff78fa1c9a882927d706140c0d18c6c4.png[/img]

Thanks


DecSoft

Hello Ade,

If I am not wrong you are using some modified code of the Calculator sample. The error message that you shown above is in the Calculator's Comments view, more specifically in the HttpClient control Error event. This is the code around:

So, the error message appear if the Http status code is "500", and, at least in the above code, don't appear in any other case.



Ade Wale
Hello Ade,

If I am not wrong you are using some modified code of the Calculator sample. The error message that you shown above is in the Calculator's Comments view, more specifically in the HttpClient control Error event. This is the code around:

So, the error message appear if the Http status code is "500", and, at least in the above code, don't appear in any other case.

Hi,

Yes, I am using the idea of sample calculator feedback and I created a new project for collecting data from mobile to email.

However, the issue I am having is each a message is sent this error "Sorry, a server error occur and the feedback cannot be send. Try again in a couple of minutes!" display.

Although, the message is successfully sent and received in the email and this message suppose to display "Thanks!" "I will contact you if needed. Thanks again!"

I think HTTPClient component need an update.

Could you please have a look at it.

AB Rock Ninja!


DecSoft

Hello Ade,

If what are you based to say "I think HTTPClient component need an update."? I don't think so. The "error" message that you are talking about don't appear from the nothing: such error message must exists in your own code in order to appear!

So maybe you place that message in a wrong place. Or some mistake in your code can be also the cause of the problem. Since I don't know nothing about your code I can't help you in that part.

However, if the "HTTPClient component need an update" then the proper Calculator sample (in which you based your code) fails with the same error... and that's is not the case, as you can see if try it.

I sincerely supose some mistake in your app's code. In the client side, the server side or both places.



Ade Wale
Hello Ade,

If what are you based to say "I think HTTPClient component need an update."? I don't think so. The "error" message that you are talking about don't appear from the nothing: such error message must exists in your own code in order to appear!

So maybe you place that message in a wrong place. Or some mistake in your code can be also the cause of the problem. Since I don't know nothing about your code I can't help you in that part.

However, if the "HTTPClient component need an update" then the proper Calculator sample (in which you based your code) fails with the same error... and that's is not the case, as you can see if try it.

I sincerely supose some mistake in your app's code. In the client side, the server side or both places.

I just realised now that, you are right, the HTTPClient doesn't need update at the moment. I follow the calculator sample feedback idea, it show error too, although I have tested it on another server and the still dispaly.


DecSoft

Hello Ade,

I just realised now that, you are right, the HTTPClient doesn't need update at the moment. I follow the calculator sample feedback idea, it show error too, although I have tested it on another server and the still dispaly.

The Calculator sample ONLY shown that error if the server side response status code is 500. And this only happend if the PHP "mail" function doesn't work as expected. If you receive such error some times, then you know the cause of the error: the "mail" function doens't work as expected. In any other case you can receive that error with the Calculator sample: at least using the provided PHP script.

And this last is the important question... are you modified the PHP script? How? Are you modified the Calculator feedback related code? And how? Take a look at the PHP script that we are talking about, just like is placed right now in my hosting and you can found in the Calculator sample inside the "Server" directory:

Can you see that we only answer with a "500" status code if the "mail" function doesn't work as expected? Now take a look at the HttpClient Error event used in the Calculator sample Comments view:

Can you see that we only shown the "error" message if the status code is "500"? Then the Calculator sample works as expected, and only shown that "error" if the server side return an status code "500". Never in other case.



Ade Wale
Hello Ade,

The Calculator sample ONLY shown that error if the server side response status code is 500. And this only happend if the PHP "mail" function doesn't work as expected. If you receive such error some times, then you know the cause of the error: the "mail" function doens't work as expected. In any other case you can receive that error with the Calculator sample: at least using the provided PHP script.

I understand the reason for the error.

And this last is the important question... are you modified the PHP script? How? Are you modified the Calculator feedback related code? And how? Take a look at the PHP script that we are talking about, just like is placed right now in my hosting and you can found in the Calculator sample inside the "Server" directory.

Yes, the PHP was modified to suit my needs.

Taken the post.php from the sample folder modify the script and uploaded to my webserver then I use the url of post.php from my webserver inside HTTPClient component so that the component can point to the file

Yes, I modified the Calculator feedback related.

Can you see that we only answer with a "500" status code if the "mail" function doesn't work as expected? Now take a look at the HttpClient Error event used in the Calculator sample Comments view:

Yes, only the "500" status code, message display after send button is pressed.

Can you see that we only shown the "error" message if the status code is "500"? Then the Calculator sample works as expected, and only shown that "error" if the server side return an status code "500". Never in other case.

Yes, I understand it. But for unknown reason the message always display.


DecSoft

Hello Ade,

Yes, I understand it. But for unknown reason the message always display.

I try to help you Ade, but, without a way to reproduce a possible problem there is very difficult. My recomendation is to start from the scratch, that is, start with the Calculator sample, and then try to prepare the "feedback" stuff in an "alone" application. Once you get it working you can try to implement the appropiate stuff into your application. If you need any help in the meanwhile just post here.



Ade Wale
Hello Ade,

Yes, I understand it. But for unknown reason the message always display.

I try to help you Ade, but, without a way to reproduce a possible problem there is very difficult. My recomendation is to start from the scratch, that is, start with the Calculator sample, and then try to prepare the "feedback" stuff in an "alone" application. Once you get it working you can try to implement the appropiate stuff into your application. If you need any help in the meanwhile just post here.

Hi,

Thanks for your advise. I started the project from the scratch and only use the PHP script came with AB (Calculator "Feedback"). I just have a look at how you did it in Calculator - Feedback.

Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.