Error Message "There was an error setting cookie mtm_consent_removed
. Please check domain and path" on every page load, when requireConsent option is set
#19488
Labels
Bug
For errors / faults / flaws.
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone
When the requireConsent option is set, every page load logs the error message "There was an error setting cookie
mtm_consent_removed
. Please check domain and path" to the console.Reason seems to be that during creation of a Tracker
forgetConsentGiven
is being called, which then callssetCookie(CONSENT_REMOVED_COOKIE_NAME, ...)
.setCookie
sets the cookie properly, but wants to check that it is indeed set with a call to getgetCookie
, which then fails, becauseconfigCookiesDisabled
is set to true at this point, and the function returns 0Fix would be make the behavior of
getCookie
andsetCookie
in regards to theCONSENT_REMOVED_COOKIE_NAME
andconfigCookiesDisabled
the same.The change to
setCookie
was introduced here 9e10a15The text was updated successfully, but these errors were encountered: