boldenamsterdam / htmlcache

Cache pages to HTML and boost website performance on Craft CMS 3
MIT License
31 stars 21 forks source link

ERROR: null value in column "id" #24

Open nflorentin opened 4 years ago

nflorentin commented 4 years ago

Hi,

I'm having the following error when accessing a page after turning on the cache: SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "id" violates not-null constraint DETAIL: Failing row contains (null, 3, notre-equipe, 2020-03-16 10:05:06, 2020-03-16 10:05:06, 81009d37-9e21-453a-9c35-8b7a6b155a3f).

After digging into the code, I found in the file HtmlCache.php at line 153 that the primary key id is explicitly set to "null". So the error is normal as a primary key cannot be null.

Any help would be appreciated!

Thanks you Nicolas