Skip to main content

Questions tagged [cookies]

0 votes
1 answer
1k views

I have a drupal 10 website. I have to set a cookie for the first time the user visits the site, a cookie with a lifetime of 1 year. When the user first visits the website, the cookie is not set, a ...
Mira's user avatar
  • 3
0 votes
1 answer
235 views

I want to add a session cookie when a user logs in. The previous implementation I had, was setting the cookie in hook_user_login with this snippet: $response = new Response(); $response->headers-&...
Maria Ioannidou's user avatar
3 votes
1 answer
129 views

I am trying to run some functional tests in DDEV that check functions of protected routes. I can log in the first couple of users fine, but after that drupaLogin() fails to generate a logged in ...
Kevin's user avatar
  • 28.2k
1 vote
1 answer
2k views

I can programmatically set a cookie in a Drupal 9 controller and I can see that cookie in Chrome's developer tools. However, I cannot programmatically get that cookie from a hook. I'm using the SAML ...
BrettSh's user avatar
  • 119
1 vote
1 answer
309 views

I just finished the migration of a D7 site into D9. Unfortunately, as I kept the same domain, before the first time I login to the new D9 site, I have to remove my domain's cookies from within my ...
Baud's user avatar
  • 562
2 votes
1 answer
1k views

I have a custom endpoint which stores a value in a session cookie, using this code: $session = $this->request->getCurrentRequest()->getSession(); $session->set('test.email', $data['email'])...
Lambic's user avatar
  • 740
1 vote
1 answer
2k views

I am using the eu cookie compliance module in Drupal 9 and I need to change the "secure" and "httpOnly" values of the cookies, as I am getting a vulnerability error "CWE-614: ...
Juan Carlos Osorio's user avatar
0 votes
0 answers
395 views

There are plenty of posts regarding this Drupal error, but my situation is quite odd indeed. Here's the background: I was asked to investigate an ajax error popping up on a form which does an account ...
user1015214's user avatar
  • 1,821
1 vote
1 answer
552 views

I am running Drupal 9 commerce 2.0 as headless CMS, and I am trying to integrate the user registration/user login part of my frontend application. I was able to use the user/register REST API to ...
levente.nas's user avatar
-1 votes
1 answer
232 views

I am logged in to my Drupal account and if I use the jQuery code from here then I can make a post request to my site and create a node. But if I try from another site, like my local host or a third ...
Tasha Jordan's user avatar
0 votes
0 answers
99 views

I use this module and I cannot make it to load from the start gtm.js, without any cookie. If I don't load gtm.js from start, the whole Google Ads and Analitycs becomes useless. If I load gtm.js with ...
rukya's user avatar
  • 231
0 votes
2 answers
4k views

On my dev environment hosted on the cloud which has SSL, I added this to the settings.php $secure = true; // if you only want to receive the cookie over HTTPS $httponly = true; // prevent JavaScript ...
Gabriel Fernandez's user avatar
1 vote
1 answer
327 views

I am trying to create a cookie in Drupal 8.9 with SameSite=none with secure attribute, using the Symfony\Component\HttpFoundation\Cookie class but I am unable to do so as the class doesn't allow the ...
Sharique Husain's user avatar
0 votes
2 answers
449 views

There is a drupal 9 site that has a REST-endpoint that can be accessed for logged-in users (not for anonymous ones). And, it's necessary to make a GET request to the endpoint using cookie ...
Yakimkin Roman's user avatar
0 votes
1 answer
88 views

We need to track some anonymous users coming to the site with a URL parameter, like "?utc=1234". This could be on any page though so I don't know what the most resource-efficient way to ...
quantumized's user avatar
  • 1,359

15 30 50 per page
1
2 3 4 5
12