Invalid CSRF Token - Can't login to panel

I get an invalid CSRF token when I try to log in to the panel. I am running the latest version of Kirby 3.9.6 but the issue was before this.

From PHP info

Linux grh3.myukcloud.com 3.10.0-962.3.2.lve1.5.77.el7.x86_64 #1 SMP Mon Dec 12 07:06:14 EST 2022 x86_64
Build Date 	Jul 5 2023 13:49:20
Build System 	Linux buildfarm04.corp.cloudlinux.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux
Configure Command 	'./configure' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/opt/alt/php82' '--exec-prefix=/opt/alt/php82' '--bindir=/opt/alt/php82/usr/bin' '--sbindir=/opt/alt/php82/usr/sbin' '--sysconfdir=/opt/alt/php82/etc' '--datadir=/opt/alt/php82/usr/share' '--includedir=/opt/alt/php82/usr/include' '--libdir=/opt/alt/php82/usr/lib64' '--libexecdir=/opt/alt/php82/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/opt/alt/php82/usr/share/man' '--infodir=/opt/alt/php82/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/opt/alt/php82/etc' '--with-config-file-scan-dir=/opt/alt/php82/link/conf' '--disable-debug' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-huge-code-pages' '--enable-jit' '--enable-opcache' '--enable-shared=yes' '--enable-shmop' '--enable-static=no' '--enable-xml' '--with-bz2' '--with-freetype=/usr' '--with-gettext' '--with-gmp=shared' '--with-gnu-ld=yes' '--with-iconv' '--with-jpeg=/usr' '--with-layout=GNU' '--with-mhash' '--with-password-argon2=/usr' '--with-pcre-jit' '--with-pic' '--with-readline' '--with-webp=/opt/alt/libwebp' '--with-xpm=/usr' '--with-zlib' '--with-zlib-dir=/usr' '--without-gdbm' '--without-pear' '--with-curl=/opt/alt/curlssl11/usr' '--with-openssl-dir=/opt/alt/openssl11' '--with-openssl=/opt/alt/openssl11' '--with-pcre-dir=/opt/alt/pcre2' '--with-kerberos' '--enable-litespeed' '--without-mysqli' '--enable-pcntl' '--disable-mbstring' '--disable-bcmath' '--disable-dba' '--disable-dom' '--disable-fileinfo' '--disable-json' '--disable-intl' '--disable-pdo' '--disable-phar' '--disable-posix' '--disable-soap' '--disable-sockets' '--disable-sysvsem' '--disable-sysvshm' '--disable-sysvmsg' '--disable-xmlreader' '--disable-xmlwriter' '--without-zip' '--disable-gd' '--without-imap' '--without-xsl' '--without-ldap' '--without-pgsql' '--without-snmp' '--without-sodium' '--without-tidy' '--without-enchant' '--without-pspell' '--without-unixODBC' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' 'PKG_CONFIG_PATH=/opt/alt/curlssl11/usr/lib64/pkgconfig:/opt/alt/openssl11/lib64/pkgconfig:/opt/alt/sqlite/usr/lib64/pkgconfig:/opt/alt/pcre2/usr/lib64/pkgconfig:/opt/alt/libzip/usr/lib64/pkgconfig:/opt/alt/libxml2/usr/lib64/pkgconfig:/opt/alt/libicu/usr/lib64/pkgconfig:/opt/alt/libgd/lib64/pkgconfig::/usr/lib64/pkgconfig:/usr/share/pkgconfig' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Dmp_bitcnt_t=long -fno-strict-aliasing -Wno-pointer-sign' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'KERBEROS_CFLAGS=-I/usr/include' 'KERBEROS_LIBS=-L/usr/lib64' 'WEBP_LIBS=-L/opt/alt/libwebp/lib64 -Wl,-rpath=/opt/alt/libwebp/lib64' 'SASL_CFLAGS=-I/usr/include' 'SASL_LIBS=-L/usr/lib64' 

Have you cleared your browser data? Make sure you have a new session, so delete cookies/session data.

Yes, I have done that. Tried different browsers, same issue,

And you don’t have multiple tabs open?

Does this happen with a fresh STarterkit?

And you don’t have multiple tabs open? no

Does this happen with a fresh STarterkit? its a live site

That’s why I was asking if it also happens with a fresh Starterkit, if you install it on the same server.

I run other Kirby sites on the same server and have no issues with those sites.

I guess then it has nothing to do with the Kirby version

and it must be something particular with this website. But unless you have any other information, like if there is anything in the error log or in the browser console, I don’t think I can help you much with this.

When you updated, have you made sure to clear the media folder?

When you updated, have you made sure to clear the media folder? yes

The only thing that I have changed is to move the assets folder out of the content folder so that it is on the same level.

home/robertsd/public_html/site/templates/article.text.php:11 theseare not in use

error log last 2 days

[27-Jun-2023 16:46:58 Europe/London] ParseError: syntax error, unexpected token ";", expecting "]" in /home/robertsd/public_html/site/config/config.php:35
Stack trace:
#0 /home/robertsd/public_html/kirby/src/Filesystem/F.php(364): Kirby\Filesystem\F::loadIsolated()
#1 /home/robertsd/public_html/kirby/src/Http/Response.php(203): Kirby\Filesystem\F::Kirby\Filesystem\{closure}()
#2 /home/robertsd/public_html/kirby/src/Filesystem/F.php(370): Kirby\Http\Response::guardAgainstOutput()
#3 /home/robertsd/public_html/kirby/src/Cms/App.php(1062): Kirby\Filesystem\F::load()
#4 /home/robertsd/public_html/kirby/src/Cms/App.php(102): Kirby\Cms\App->optionsFromConfig()
#5 /home/robertsd/public_html/index.php(5): Kirby\Cms\App->__construct()
#6 {main}
[28-Jul-2023 04:37:11 Europe/London] Whoops\Exception\ErrorException: Undefined variable $articles in /home/robertsd/public_html/site/templates/article.text.php:11
Stack trace:
#0 /home/robertsd/public_html/site/templates/article.text.php(11): Whoops\Run->handleError()
#1 /home/robertsd/public_html/kirby/src/Filesystem/F.php(425): include('/home/robertsd/...')
#2 /home/robertsd/public_html/kirby/src/Filesystem/F.php(364): Kirby\Filesystem\F::loadIsolated()
#3 /home/robertsd/public_html/kirby/src/Filesystem/F.php(372): Kirby\Filesystem\F::Kirby\Filesystem\{closure}()
#4 /home/robertsd/public_html/kirby/src/Toolkit/Tpl.php(34): Kirby\Filesystem\F::load()
#5 /home/robertsd/public_html/kirby/src/Template/Template.php(155): Kirby\Toolkit\Tpl::load()
#6 /home/robertsd/public_html/kirby/src/Cms/Page.php(1071): Kirby\Template\Template->render()
#7 /home/robertsd/public_html/kirby/src/Cms/App.php(796): Kirby\Cms\Page->render()
#8 /home/robertsd/public_html/kirby/src/Cms/App.php(1235): Kirby\Cms\App->io()
#9 /home/robertsd/public_html/index.php(5): Kirby\Cms\App->render()
#10 {main}
[28-Jul-2023 06:55:38 Europe/London] Whoops\Exception\ErrorException: Undefined variable $articles in /home/robertsd/public_html/site/templates/article.text.php:11
Stack trace:
#0 /home/robertsd/public_html/site/templates/article.text.php(11): Whoops\Run->handleError()
#1 /home/robertsd/public_html/kirby/src/Filesystem/F.php(425): include('/home/robertsd/...')
#2 /home/robertsd/public_html/kirby/src/Filesystem/F.php(364): Kirby\Filesystem\F::loadIsolated()
#3 /home/robertsd/public_html/kirby/src/Filesystem/F.php(372): Kirby\Filesystem\F::Kirby\Filesystem\{closure}()
#4 /home/robertsd/public_html/kirby/src/Toolkit/Tpl.php(34): Kirby\Filesystem\F::load()
#5 /home/robertsd/public_html/kirby/src/Template/Template.php(155): Kirby\Toolkit\Tpl::load()
#6 /home/robertsd/public_html/kirby/src/Cms/Page.php(1071): Kirby\Template\Template->render()
#7 /home/robertsd/public_html/kirby/src/Cms/App.php(796): Kirby\Cms\Page->render()
#8 /home/robertsd/public_html/kirby/src/Cms/App.php(1235): Kirby\Cms\App->io()
#9 /home/robertsd/public_html/index.php(5): Kirby\Cms\App->render()
#10 {main}

From console

Status
400
Bad Request
VersionHTTP/3
Transferred990 B (103 B size)
Referrer Policysame-origin
Request PriorityHighest

	
alt-svc
	h3=":443"; ma=86400
cache-control
	no-store, private
cf-cache-status
	DYNAMIC
cf-ray
	7ee5d80399f54057-LHR
content-type
	application/json; charset=UTF-8
date
	Sat, 29 Jul 2023 13:52:41 GMT
feature-policy
	geolocation 'self'; vibrate 'none'
nel
	{"success_fraction":0,"report_to":"cf-nel","max_age":604800}
referrer-policy
	same-origin
report-to
	{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=e8RbrnYX5qoJPlx51WlVEBKe0m3K1rKG5tdk60Hkqq6qyiV%2B5OdUtoVNVWct0WoeSny1XO%2BVFI70Hbe0vmaDNsCkWYnly6Eiv6KEW6FPci9otLeVzASb%2B6UXVpgAdDW8NBzUKA%3D%3D"}],"group":"cf-nel","max_age":604800}
server
	cloudflare
strict-transport-security
	max-age=63072000; includeSubDomains
vary
	Accept-Encoding,User-Agent
x-content-type-options
	nosniff
x-frame-options
	SAMEORIGIN
x-turbo-charged-by
	LiteSpeed
x-xss-protection
	1; mode=block
	
Accept
	*/*
Accept-Encoding
	gzip, deflate, br
Accept-Language
	en-GB,en;q=0.5
Alt-Used
	robertsdesign.biz
Cache-Control
	no-cache
Connection
	keep-alive
Content-Length
	72
content-type
	application/json
Cookie
	kirby_session=c440d705be297bb0ccfc991261a875bd8855385e%2B1690645834.96a25e17954d3e6fc0d7.f1a1da89e0d18157d6f3784e467384269e0f4c10d6c1d4b1bd5f6af62eb72139; cf_clearance=XkBXO9k9ZMNdvPttzWMM_rHP0FV7_VxcsZ.GoWnTnU8-1690638720-0-0.2.1690638720
DNT
	1
Host
	robertsdesign.biz
Origin
	https://robertsdesign.biz
Pragma
	no-cache
Referer
	https://robertsdesign.biz/panel/login
Sec-Fetch-Dest
	empty
Sec-Fetch-Mode
	cors
Sec-Fetch-Site
	same-origin
Sec-GPC
	1
TE
	trailers
User-Agent
	Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0
x-csrf
	5ccbe86d7a73cfe741f66ec17d7fad683426cdb777396b98eceaedac7b2e1264


InstallTrigger is deprecated and will be removed in the future. [commons.js:2:1416762](moz-extension://860d68dc-b831-47c4-96cb-e7c851c8086e/commons.js)

GEThttps://c.1password.com/richicons/images/login/120/robertsdesign.biz.png[HTTP/2 404 Not Found 23ms]

GEThttps://c.1password.com/richicons/images/login/120/analytics.robertsdesign.biz.png[HTTP/2 404 Not Found 23ms]

GEThttps://c.1password.com/richicons/images/login/120/clients.robertsdesign.biz.png[HTTP/2 404 Not Found 22ms]

Does the information supplied above help to fix this issue? or do you need further information?

If you do a search for “invalid csrf token” here on the forum, you will find several hints what might be worth looking at.