Page 1 of 1

Opencart Issue document.cookie Alert on Page Load

Posted: Thu Dec 13, 2018 3:57 pm
by dynamicexperts
One of my client's Opencart website have issues when open the website, a prompt alert shows following code:

Conflict

Code: Select all

<script>document.cookie = "humans_21909=1"; document.location.reload(true)</script>
How to get this resolve. Also help me to find the files where they are located to fix it.

Re: Opencart Issue document.cookie Alert on Page Load

Posted: Thu Dec 13, 2018 11:23 pm
by ADD Creative
It would most likely be in the header of footer controllers or templates. But if could be anywhere, including the database. Search your files and database for some of the text in the alert. Or compare your files against a fresh download of your version of OpenCart, your theme and all your extensions.

Re: Opencart Issue document.cookie Alert on Page Load

Posted: Mon Jan 07, 2019 1:29 am
by thekrotek
This is soooooooooooo not related to OpenCart.

Re: Opencart Issue document.cookie Alert on Page Load

Posted: Thu Feb 07, 2019 12:00 am
by Tornado Info
i got a same issue in opencart 2.0.1.1. when click on cart button and go for check out and then open register account and login option in this login option working well but when click on register account that time got same error.

Any one can help for how to resolve this error.

Re: Opencart Issue document.cookie Alert on Page Load

Posted: Thu Jun 06, 2019 1:27 am
by pspezone
I have the same issue with opencart.3.x ,looking for support :o :o :o

Re: Opencart Issue document.cookie Alert on Page Load

Posted: Mon Feb 24, 2020 12:27 pm
by kasun0777
I am getting this trouble also. I think its coming with register.php. I am hosted in hostgator shared server. How can we resolve this problem. My opencart version is 3.0.3.2

Re: Opencart Issue document.cookie Alert on Page Load

Posted: Mon Feb 24, 2020 9:27 pm
by ADD Creative
Could be some protection on your hosting. Try disabling ModSecurity if it's enabled on your server.

Re: Opencart Issue document.cookie Alert on Page Load

Posted: Thu May 14, 2020 6:59 pm
by HarishST
I think there are two options you can try.

1. Change the register.php file into another name like registration.php. I think the keyword register is reserved and throwing the issue.
2. Disable the mod_security module and restart Apache.

Not sure the second one works or not. I had same issue with one client and resolved using the 1st method since the client was using Hostgator shared hosting where we won't have access to Apache Modules at all.

Hope this helps.

Re: Opencart Issue document.cookie Alert on Page Load

Posted: Tue Jun 16, 2020 9:54 pm
by guilherme.cespedes
HarishST wrote:
Thu May 14, 2020 6:59 pm
I think there are two options you can try.

1. Change the register.php file into another name like registration.php. I think the keyword register is reserved and throwing the issue.
2. Disable the mod_security module and restart Apache.

Not sure the second one works or not. I had same issue with one client and resolved using the 1st method since the client was using Hostgator shared hosting where we won't have access to Apache Modules at all.

Hope this helps.


I didn't want to revive the topic, but unfortunately I'm facing the same problem. I am a Hostgator customer and the moment the customer finalizes the order and needs to register, the error appears.

The funny thing is that this does not happen with all customers, only with a few, others manage to perform the procedure normally.


I'm a bit of a layman, how do I change register.php ... after changing the file name will I have to change which files to correct its address?

Thanks for listening