An HTTP cookie is a piece of data stored by the user's web browser. Unless otherwise specified, cookies can be created, read, modified and deleted and modified both by JavaScript and from server-side scripts by reading the headers.

learn more… | top users | synonyms (1)

2
votes
0answers
24 views

How to pass cookie value into Drupal View

We want to create some logic using JS that creates a cookie and set the node's taxonomy term id (preferred) or taxonomy term name as the cookie value. Then we want to use the cookie value to filter a ...
-1
votes
0answers
13 views

log out an user via custom service, user is never logged in

i'm struggling with the services logout issue, here is how I proceed : calling the login function returns me many data, including sessid and session_name i'm composing the login cookie as following: ...
0
votes
0answers
12 views

Creating token to display cookie counter

I need some help with displaying the cookie counter to user. A friend told me i should use token_replace() instead of defining my own token. That'd be fast and easy but being new, It seems difficult ...
0
votes
0answers
17 views

Show popup block-webform every X minutes & hide if submitted

One of our client would like to display a webform in a popup every X minutes for all the anonymous users on some pages. The popup come with a "No, thank you" button that could hide it. And of course ...
0
votes
1answer
26 views

Language cookie module not working in Safari?

I use language_cookie module to safe the users preferred language with a cookie. E.g. The default site language is English. But i am from Holland so i want always the Dutch version of the site: ...
0
votes
0answers
28 views

Language Cookie (language_cookie) not working in Safari [duplicate]

I use the Language Cookie module to safe the users preferred language with a cookie. E.g. the default site language is English. But I am from Holland so I want always the Dutch version of the site: ...
0
votes
0answers
57 views

caching frontpage in cloudflare free?

I've set up cloudflare caching of Drupal's frontpage by adding a Page Rule for my Drupal base URL, with a "Cache Everyting" setting (otherwise, caching is enabled only for certain file extensions). ...
1
vote
1answer
223 views

Unable to login to services due to session cookies not being passed in

This has been driving me nuts for days. I have an html5 app which logs the user into drupal via services 3.11 but I am unable to connect. Using the Chrome Postman plugin I can connect as expected. ...
0
votes
0answers
30 views

Cannot login possibly due to drupal cookies

Today I got a very strange problem which is that I cannot login even if with correct username and password, It always notifies that 'you are not authorized ...' even if I logged in as admin. I did a ...
0
votes
1answer
195 views

How can I modify the 'has_js' cookie?

I am trying to modify the 'has_js' cookie that is set by Drupal. I need to modify this cookie so it becomes both Http-only and secure in response to a site security review. I attempted to add the ...
0
votes
1answer
308 views

How to configure EU cookie compliance module for only Google Analytics

I have installed and configured the EU cookie compliance module, but it only displays the message when I log into admin section. I use Google Analytics and I must show the message for all the site. ...
1
vote
1answer
123 views

How can I use cookies on Webform?

I'm using Drupal 7 and Webform and I want, remember input texts on next submissions for registered users. How can I do it?
0
votes
1answer
145 views

Drupal refuses to read/check cookie for anonymous users

I currently have a module which creates a welcome overlay upon a user's first visit, This should work by utilizing a jquery created cookie and showing the overlay based on its existence. The jquery ...
2
votes
0answers
72 views

How can i have a SimpleNews signup form as modal/lightbox

Is it possible to have the Simplenews sign up form block as a modal - I'd like to present people to the signup a bit more visible than a static block. Would i be possible to present the modal when ...
0
votes
1answer
273 views

Services 3 Session authentication CSRF Validation with Persistent Log in

I am trying to use Services 7.x-3.11, the latest stable available to authenticate and access Drupal 7.34. Accessing from mobile devices with Native coding. I want to keep the user authenticated ...
0
votes
2answers
63 views

How to use cookies in Drupal? [duplicate]

I am writing a module that allows users to put comment on each paragraph. So in my module I have added a new field to comment table called "paragraph_id" and I have also added a new field to comment ...
2
votes
1answer
97 views

What is the best way to tell anonymous users apart?

My company wishes to split their website so that anonymous users are given slightly different sites based on a question when they first visit. I intend to use a cookie to store the answer to the ...
0
votes
0answers
729 views

Set Cookie in response header

I am actually having a strange problem with one of my drupal installations. While I was trying to setup nginx for one of my sites, I ran into an issue that only the frontpage wont get cached. After a ...
0
votes
0answers
78 views

X-Drupal-Cache is missing from HTTP headers

X-Drupal-Cache seems to be missing from HTTP headers. The funny thing is that, when I cleared my cookies, it reappears twice: once with a "MISS" and then with a "HIT". After that, X-Drupal-Cache ...
0
votes
0answers
384 views

Sessions / Cookies not working for user login, registration or shopping cart

The Problem One of our sites has recently broken. Users can't login or register, and the shopping cart isn't working either. Drupal does not display any errors. Upon clicking the submit button for ...
0
votes
0answers
146 views

Why would error / warning / success messages stack up when using a Service?

I have a mobile app that uses Drupal as an API. As you navigate the site everything works as normal with appropriate messages on errors, warnings, and successful form submissions. After doing that a ...
1
vote
2answers
1k views

Anonymous User gets cookie

I recently saw that when I open of my sites as a anonymous user, a session cookie is set. I checked the database sessions table, and there is a line for uid 0 as well. How can I prevent drupal from ...
1
vote
1answer
88 views

bypassing cookies in varnish [closed]

As explained in https://www.varnish-cache.org/docs/3.0/tutorial/cookies.html I am trying to " Cookies from the client For a lot of web application it makes sense to completely disregard the cookies ...
3
votes
1answer
412 views

How to implement cookieless (sub-) domain with Drupal?

Cookieless (sub-) domains are considered beneficial for a number of purposes: They save some network overhead [1], and they are required for certain types of caching [7] (e.g. reverse proxy like ...
1
vote
0answers
283 views

Access Denied when logging in using Safari

When I login to example.com via Safari web browser, I get a message that says "Access Denied. You are not authorized to access this page." I can login properly when using Chrome, Firefox, and ...
0
votes
1answer
45 views

uid = 0 for all kinds of users

I want to get the uid of a logged in user in an external php script. I am using: chdir("C:/xampp/htdocs/mywebsite"); require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); ...
0
votes
1answer
118 views

Can't get the authenticated user cookie session to be used when creating a new node via Services 3 endpoint

My application is sending this header to Service 3 endpoint when creating a new node: { 'Cookie': 'SESS255f42d9a87a0df5bf8959d25909fe8c=St8o29NI9Hx84kPo8NuZbpdHWuRgNSS9qy9cQ-QM4rA; expires=Sun, ...
0
votes
1answer
206 views

Show custom query page based on user logged in

I want to make a customized query page based on the user who is logged in. The query page is a node made in custom made content type "query"(this content type has no additional fields than which are ...
0
votes
0answers
109 views

after saving new account change anonymous nodes author with rules or a custom module

My site generates a cookie for anonymous users who create content. I added a rule that copies their cookie value to a text field in the nodes they create I need to do the following with rules or a ...
2
votes
1answer
150 views

Are there any acceptable uses for $_COOKIE['has_js'] outside of core?

Drupal 7 has a cookie called has_js. drupal.js sets this cookie, and it is used by the Batch API and the authorize.php script. There is a rather old issue about this cookie, backport ...
1
vote
0answers
46 views

What is the scope of the drupal session cookie?

I am bootstrapping drupal 7 (using DRUPAL_BOOTSTRAP_FULL) so that I can use drupal's authentication/security features in the rapid development of a web app I'm doing a proof of concept for. (And yes I ...
1
vote
1answer
143 views

google analytics are killed after “cookie control” instalation

I'm new in drupal so I will write as simple as possible. I have installed the "google analytics" (GA) module. I have configured it and it worked. I was able to see live statistics on the GA web-page. ...
1
vote
1answer
658 views

Drupal 7 Webform Cookies

I have a Drupal 7 website that has many downloads, each utilizing the same webform. I would like it when an anonymous user downloads once, then goes to another download (same webform, different ...
0
votes
1answer
2k views

How do I access Session variables in Drupal that were set on non-drupal pages?

If I go print_r($_SESSION) on a drupal page (say mysite.com/ )I only get Session variables set from drupal pages (which are none atm). I can set new ones and they'll show up. Array ( ) However If ...
0
votes
1answer
542 views

Where does Drupal 7 clear my custom set cookies and how do I stop this?

I have parts of my website that are not controlled by drupal that set cookies. When I access a drupal-run page, my cookies get cleared. I tried to investigate which script does this by placing ...
0
votes
1answer
223 views

Caching pages with boost based on a cookie value

I have a Drupal website where a part of each page varies depending on the value of a certain cookie. In order to use Boost in this situation, I was thinking of rewriting the cookie value into a query ...
1
vote
0answers
101 views

How to remain logged in when switching languages via domain Drupal 7

I've got a site which will run in different languages. The language is determined based on the language domain, and the site will thus exists as example.com, example.de, example.fr, example.co.uk and ...
1
vote
2answers
1k views

Android to Drupal Submission : [CSRF Validation Failed] while using a cookie

The Drupal Version is 7 and the Services version is 3.4. So, My login into Drupal goes like this: Fetch a token. (POST) Fetch a Cookie using the token. (POST) Make GET Requests using ...
1
vote
3answers
1k views

Access denied for admin user after new drupal 6 install [closed]

I just installed Drupal 6 (Don't ask why) from a fresh install (Version 6.29). I followed the install steps, created an admin user, set the correct time zone, etc. But when I login and attempt to ...
0
votes
0answers
12 views

Cross domain cookie for same Drupal installation [duplicate]

The English translation of my Drupal installation runs on MYSITE.com and my German translation runs on MYSITE.de. Of course, I want my users to be able to switch languages without having to log in ...
2
votes
1answer
1k views

jquery.cookie.js is loaded only for authenticated users, by jQuery update module

jquery.cookie.js is loaded only for authenticated users and i cannot really figure out why. The page caching is disabled. Any thoughts?
-2
votes
1answer
44 views

cookie is being stored as different value [closed]

I have the following code: if(isset($ret["token"])) { drupal_set_message("TOKEN: " . $ret["token"]); user_cookie_save(array("my_token"=>$ret["token"])); drupal_set_message("KEY: " . ...
1
vote
1answer
91 views

Session cookie prevents pages to load

There is a problem with Drupal 6 site. It seems seesion cookie is preventing some pages to load. Site has approximately 5 to 10 pages (out of 30 000) of difference content types which can't be ...
4
votes
1answer
553 views

Additional Configuration to disable anonymous session cookies?

I am running a clean install of Pressflow 6.28. I have set the following configurations: Cache Mode: Normal; Min Cache Lifetime: 5 minutes; Page Cache Max Age: 1 day; I have installed no contributed ...
0
votes
2answers
1k views

Persistent session cookies: remember session even after closing the browser

I would like to store anonymous users $_SESSION in a cookie so that their cart and other custom information is still available even after closing the browser. I found this interesting post which ...
0
votes
0answers
274 views

Check cookies are enabled in hook_boot: cookies disabled issue

In my hook_boot I am checking cookies are enabled via the following code: function my_module_boot() { if(!isset($_COOKIE['my_cookie'])) { // set a test cookie setcookie('my_cookie', ...
3
votes
1answer
1k views

Services - Creating a node with php curl client returns 401 error - X-CSRF token always empty

A recent update to Services and Drupal requires a csrf token, and it broke the php curl client samples. I am trying the sample code for Services to create a node here ...
3
votes
1answer
2k views

Setting $cookie_domain variable for specific folder structure

During configuration of Ckeditor I have to setup the cookie domain variable. I have added my site in subfolder like www.example.com/mynewsitefolder, where www.example.com is my current and running ...
1
vote
2answers
929 views

Cookies change when I navigate to another page (Using jquery cookie)

For example, the user can change the font size, and it is remembered in the cookies. Say I am on the product page and change the font size there and add the cookie. Everything looks fine, but when I ...
0
votes
2answers
473 views

Easy way to add EU cookie notification to multiple Drupal websites?

I have 20+ Drupal sites that I have to add Cookie notifs to. Is there an easy/batch/automated way to do it?