statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
3.58k stars 490 forks source link

can't acces CP when I upload the website #9879

Closed AntoineChartier1 closed 2 months ago

AntoineChartier1 commented 2 months ago

Bug description

when I shared my statamic website admin credential with my colllegue it stopped working ever since. I have a CSRF token missmatch error sometimes. also, it lets me log in for couple of seconds or more, i even went on clearing the cache before it disconnected me automatically.

I am on the free version of statamic

the CP is still working locally

How to reproduce

share your statamic account with somone else.

Logs

No response

Environment

statamic  v.4.56.1

Installation

Starter Kit using via CLI

Antlers Parser

Runtime (default)

Additional details

No response

duncanmcclean commented 2 months ago

Please provide the full output of php please support:details. It really helps with debugging.

Is there any kind of caching enabled on the server? Varnish / CDN caching?

AntoineChartier1 commented 2 months ago

Hi duncan,

this is my setup on the server https://cloud.digitalocean.com/, I don't know if there is cdn caching on the server

Environment Application Name: Statamic Laravel Version: 10.48. 7 PHP Version: 8.3.5 Composer Version: 2.7. 2 Environment: production Debug Mode: OFF URL: localhost Maintenance Mode: OFF Cache Config:NOT CACHED Events :NOT CACHED Routes:NOT CACHED Views:CACHED

Drivers Broadcasting: null Cache: statamic Database: mysql single Logs: stack Mail: smtp Queue: sync Session: file

Statamic Addons: 0 Antlers: runtime Sites: 1 Stache Watcher: Enabled Static Caching: Disabled Version: 4.56.1 Solo

Capture d’écran 2024-04-15 081950 Capture d’écran 2024-04-15 082010

Thanks for the help!

AntoineChartier1 commented 2 months ago

I have this message also when I tried to sign in to the cp: image

duncanmcclean commented 2 months ago

Do you get the "419 Page Expired" error when you try to login in Incognito Mode?

AntoineChartier1 commented 2 months ago

Yes, just tried and I also get it on incognito mode.

AntoineChartier1 commented 2 months ago

I have this error when I tried log in also, but I don't think its related. " CSRF token mismatch" image

duncanmcclean commented 2 months ago

Which browser are you using?

AntoineChartier1 commented 2 months ago

Brave for the incognito screenshot I gave you, but mostly chrome for the testing and developing. I have also tried incognito in chrome and it did the same error.

duncanmcclean commented 2 months ago

Which web server are you using? Apache, Nginx, Litespeed?

AntoineChartier1 commented 2 months ago

I think its Apache based on the Run Command: heroku-php-apache2 public/

but there is also those bundler running I guess: image

AntoineChartier1 commented 2 months ago

I have erased the problem ! I simply restarted my project from a previous working version and it solved it. I don't know why nor how..

But I still have my doubts on the fact that its because I shared my credentials with a colleague.

Thank you so much for your time Duncan!!

I have a last question for you since you seem to know your statamic a lot better than I do. If I use the SSG plugin to create a static site, and deploy it on netlify for example, will the CP still be working?

duncanmcclean commented 2 months ago

No worries, glad you were able to get it working!

If I use the SSG plugin to create a static site, and deploy it on netlify for example, will the CP still be working?

No, when you deploy your site using the SSG you won't be able to access the Control Panel or use any Statamic Forms.