Pretty Big Problem-Need Help :)

0 Nikola Novakovic · June 28, 2014
Hello people!

Well as the title of the post states I have a big problem. I have no freakin' idea whats going on and maybe some of the more experience guys here has encountered the same problem as I did and might be able to help out.

I kinda did not want to post on stackoverflow, because I will share a link to the website, and the website is pretty private for now. Maybe I will post to stack but with only describing the problem not the actual link, anyways here is the problem:

I have a website , it uses WordPress CMS, but everything is done custom in there. The developer that has worked a lot on it, has gone to a 2 week vocation and they  have left the finishing touches to me, and some major fixes. I did everything that needs to be done, and even some major issues, and when I thought I have finished everything , project menager report a major bug that I was not even aware off.

The website uses a an "Exchange" ecommerce plugin( and that plugin is also altered to fit our needs, so thats kinda custom too ) , that was built by the developer who went on vacation , and the website itself has two products. Each product after purchase has "thank you" pages and they are shown after you have purchased a product. A product page has detailed description of what it is and a form below that you need to fill out ( credit card info , email , username etc. ). Now the the actual problem is when you go to anywhere from the website, to a product page ( its not important if its product 1 or product 2, since it has two products ) , it loads that page, and after a second or two it redirects you to thank you page. Without you even doing anything. Now another intresting thing is that this is totally random , for example 8 times out of ten this will happen and those other two times , this will not happen and it will not redirect.

Any idea why is this happening ?

The link is:

Try clicking on any of the orange buttons, one is a free trial ( that is a product also ) and other is subscribe , that is kinda a full subscription. Has anyone encountered this problem ?

Post a Reply


Oldest  Newest  Rating
+4 Samuel Oloruntoba · June 28, 2014
from all i have seen this is not a php problem, it is actually a javascript problem, check at the bottom of the page, you should see a jquery function that automatically submits a form on the page, that is why you have this problem, since there are no validation on those forms o' yours they just automatically submit themselves whenever the document is ready.


You also said that this is a random event, the reason is because most of the javascript on the page don't get loaded, triggering an error and therefore stops the interpreter from running the code that is why it occurs randomly.

Before i go, you should add validation to those forms and also

put jquery plugins at the top of the page, put all your own scripts at the page bottom, this would prevent script breakage during execution. Because this way all the dependencies get loaded first
0 Nikola Novakovic · June 28, 2014
Man you are so freaking awesome. I can not believe I missed this. :( I actually thought at first that it was actually a front end problem. One of the reasons I don't like WordPress is that it has stuff like this. That contact form is a plugin, and someone else previously has put it there, and it looks like they did not do their job right :) 

Thanks a lot man, this really helps a ton! Much love! :)
+2 Samuel Oloruntoba · June 28, 2014
no problem
  • 1



Server-side, HTML embedded scripting language used to create dynamic Web pages.