Skip to main content
removed "Drupal" and tags from the title
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

How do I troubleshoot PrivateTempStore for session data in Drupal 8?

I am updated one of my D7Drupal 7 modules for D8Drupal 8 and I discovered that I need to use PrivateTempStore rather than $_SESSION variables. I followed some great examples online, but it does not seem to be storing the data correctly. I am even checking the database directly afterwards, but it does not have the correct data. I've done some debugging at the point where I am storing the data to see what is set, and it says it is set with the value I expect. However, the database does not show this value and reloading the page and outputting the value retrieved does not show what I expect. What are the method people use to debug these issues.

Currently running Drupal 8.8.1 on PHP 7.3.

How do I troubleshoot PrivateTempStore for session data in Drupal 8

I am updated one of my D7 modules for D8 and I discovered that I need to use PrivateTempStore rather than $_SESSION variables. I followed some great examples online, but it does not seem to be storing the data correctly. I am even checking the database directly afterwards, but it does not have the correct data. I've done some debugging at the point where I am storing the data to see what is set, and it says it is set with the value I expect. However, the database does not show this value and reloading the page and outputting the value retrieved does not show what I expect. What are the method people use to debug these issues.

Currently running Drupal 8.8.1 on PHP 7.3.

How do I troubleshoot PrivateTempStore for session data?

I am updated one of my Drupal 7 modules for Drupal 8 and I discovered that I need to use PrivateTempStore rather than $_SESSION variables. I followed some great examples online, but it does not seem to be storing the data correctly. I am even checking the database directly afterwards, but it does not have the correct data. I've done some debugging at the point where I am storing the data to see what is set, and it says it is set with the value I expect. However, the database does not show this value and reloading the page and outputting the value retrieved does not show what I expect. What are the method people use to debug these issues.

Currently running Drupal 8.8.1 on PHP 7.3.

Source Link
shelane
  • 511
  • 1
  • 3
  • 23

How do I troubleshoot PrivateTempStore for session data in Drupal 8

I am updated one of my D7 modules for D8 and I discovered that I need to use PrivateTempStore rather than $_SESSION variables. I followed some great examples online, but it does not seem to be storing the data correctly. I am even checking the database directly afterwards, but it does not have the correct data. I've done some debugging at the point where I am storing the data to see what is set, and it says it is set with the value I expect. However, the database does not show this value and reloading the page and outputting the value retrieved does not show what I expect. What are the method people use to debug these issues.

Currently running Drupal 8.8.1 on PHP 7.3.