# After published, can't edit and logout

**URL:** <https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544>\
**Category:** Questions\
**Tags:** v3\
**Created:** [June 11, 2019, 1:00pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544 "2019-06-11T13:00:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![malin](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@malin](https://forum.getkirby.com/u/malin)\
**Post date:** [June 11, 2019, 1:00pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/1 "2019-06-11T13:00:55Z")

</div>

Hallo,  
i’m traing find solution for sessions problem. After publish I can’t edit pages, i can’t logout too.  
I try change chmod to 777 for site/sessions and files but it doesn’t work.  
In localhost everything works fine. How can I do this?

```
Exception: undefined

session_start(): The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in file: /domains/.../public_html/kirby/vendor/getkirby/toolkit/lib/s.php on line: 64

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 11, 2019, 1:05pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/2 "2019-06-11T13:05:46Z")

</div>

Which Kirby version?

---

<div class="post-metadata">

**Author:** ![malin](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@malin](https://forum.getkirby.com/u/malin)\
**Post date:** [June 11, 2019, 1:06pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/3 "2019-06-11T13:06:55Z")

</div>

3.1.4

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 11, 2019, 1:08pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/4 "2019-06-11T13:08:54Z")

</div>

The path for the toolkit looks wrong for Kirby 3. Are you running different version concurrently on the server?

> [@malin](#):
>
> session\_start(): The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and ‘-,’ in file: /domains/…/public\_html/kirby/vendor/getkirby/toolkit/lib/s.php on line: 64

That is a path to the toolkit for Kirby 2

---

<div class="post-metadata">

**Author:** ![malin](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@malin](https://forum.getkirby.com/u/malin)\
**Post date:** [June 11, 2019, 1:13pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/5 "2019-06-11T13:13:12Z")

</div>

Possible, it’s because in parent (domain) folder i have kirby 2 too?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 11, 2019, 1:14pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/6 "2019-06-11T13:14:23Z")

</div>

Probably. In any case something get’s mixed up here badly.

You should probably run Kirby 3 on it’s own domain, not by calling a subfolder.

---

<div class="post-metadata">

**Author:** ![malin](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@malin](https://forum.getkirby.com/u/malin)\
**Post date:** [June 11, 2019, 1:16pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/7 "2019-06-11T13:16:35Z")

</div>

Ok, i try and come back with answer

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 11, 2019, 1:18pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/8 "2019-06-11T13:18:04Z")

</div>

I usually see this error message if I try to log into Kirby 2 while a Kirby 3 session is still active (on localhost, if not using virtual hosts). So keeping your 2 Kirby installation separate should fix the issue.

---

<div class="post-metadata">

**Author:** ![malin](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@malin](https://forum.getkirby.com/u/malin)\
**Post date:** [June 11, 2019, 1:27pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/9 "2019-06-11T13:27:12Z")

</div>

I run website on test subdomain. Alert doesn’t show now, but i can’t save edits and logout. What wrong now can be?

I see fun face in right top corner, but changes are don’t saved

Its server log

`Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.`

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 11, 2019, 1:42pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/10 "2019-06-11T13:42:28Z")

</div>

Hm, have you cleared all sessions? Cleared the browser cache and all session data in the browser?

That error message means that there are too many redirects happing for some reason, but that is an issue you have to solve on the server level.

---

<div class="post-metadata">

**Author:** ![malin](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@malin](https://forum.getkirby.com/u/malin)\
**Post date:** [June 11, 2019, 1:53pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/11 "2019-06-11T13:53:54Z")

</div>

I checked console while i try saving changes and i got this code:

`app.js:1 PATCH http://test.domain.pl/api/site 403 (Forbidden)`

`{"status":"error","route":"site","exception":"Kirby\\Exception\\PermissionException","message":"Unauthenticated","key":"0","file":"kirby\/config\/api\/authentication.php","line":12,"details":[],"code":403}`

Kirby on server without any else installations of kirby, while saving changes, shows error with API

```
Exception: undefined
The JSON response from the API could not be parsed. Please check your API connection.
```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 11, 2019, 2:38pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/12 "2019-06-11T14:38:40Z")

</div>

It seems to be some session problem, so the user is not authenticated when the PATCH request is made or PATCH requests are not allowed.

Do other requests, like creating new pages etc. work?

Please also see the troubleshooting docs: [https://getkirby.com/docs/guide/troubleshooting/panel#fields-randomly-not-saving-random-logouts](https://getkirby.com/docs/guide/troubleshooting/panel#fields-randomly-not-saving-random-logouts)

---

<div class="post-metadata">

**Author:** ![malin](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@malin](https://forum.getkirby.com/u/malin)\
**Post date:** [June 11, 2019, 3:20pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/13 "2019-06-11T15:20:28Z")

</div>

Creating new pages works fine, but problem is with publish. When I try, I have a error:  
`The JSON response from the API could not be parsed. Please check your API connection.`

I tried with `php_value opcache.revalidate_freq 0` in httaccess, but doesn’t work.

---

<div class="post-metadata">

**Author:** ![malin](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@malin](https://forum.getkirby.com/u/malin)\
**Post date:** [June 12, 2019, 10:07am UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/14 "2019-06-12T10:07:55Z")

</div>

Now console shows this message after login panel:

`Failed to load resource: the server responded with a status of 404 (Not Found)`

```
app.js:1

  Object

  code: 404
  exception: "Exception"
  file: "kirby/src/Http/Router.php"
  line: 145
  message: "No route found for path: "auth/logout" and request method: "GET""
  route: null
  status: "error"
  __proto__ : Object

```

I can’t find solution ☹ it’s possible, because i do it on trial licence?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 12, 2019, 10:24am UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/15 "2019-06-12T10:24:21Z")

</div>

> [@malin](#):
>
> it’s possible, because i do it on trial licence?

No.

Have you also checked the other points mentioned in the troubleshooting guide I linked to?

Also, have you tried to install a fresh Starterkit to see if you can reproduce your issue there?

---

<div class="post-metadata">

**Author:** ![malin](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@malin](https://forum.getkirby.com/u/malin)\
**Post date:** [June 13, 2019, 9:47am UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/16 "2019-06-13T09:47:48Z")

</div>

I try install starterkit - still does’t work  
I turn off mod\_security on domain  
i add to htaccess:

```
php_value opcache.revalidate_freq 0
<IfModule mod_expires.c>
ExpiresActive off
</IfModule>

```

I clean media, cache and sessions folders

really i don’t know what more can i do. Still i can’t logout, edit and publish pages. I can create drafts, thats all. I have a problem with PATHS. when i try edit page title i get:  
`No route found for path: "site/title" and request method: "GET"`

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 13, 2019, 10:06am UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/17 "2019-06-13T10:06:36Z")

</div>

Looks like the PATCH request doesn’t work.

This is the `site/title` route:

```auto
  [
        'pattern' => 'site/title',
        'method' => 'PATCH',
        'action' => function () {
            return $this->site()->changeTitle($this->requestBody('title'));
        }
    ],

```

As you can see, the expected method for this route is a PATCH request, not a GET request.

Have you contacted your provider to find out if PATCH requests are disabled?

---

<div class="post-metadata">

**Author:** ![malin](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@malin](https://forum.getkirby.com/u/malin)\
**Post date:** [June 13, 2019, 10:33am UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/18 "2019-06-13T10:33:25Z")

</div>

Do you mean [https://en.wikipedia.org/wiki/Hypertext\_Transfer\_Protocol](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol)

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 13, 2019, 10:38am UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/19 "2019-06-13T10:38:57Z")

</div>

Yes, HTTP has different request methods: GET, POST, PATCH, DELETE etc.

Sometimes, Hosting providers do not support all of them, at least we had an issue here on the forum [where PATCH wasn’t supported](https://forum.getkirby.com/t/cant-save-pages-in-panel/13653/26).

---

<div class="post-metadata">

**Author:** ![malin](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@malin](https://forum.getkirby.com/u/malin)\
**Post date:** [June 26, 2019, 1:48pm UTC](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544/20 "2019-06-26T13:48:12Z")

</div>

Ok, if someone have a the same problem with PATCH, add this to httaccess file:

```
<Limit PATCH>
order allow,deny
allow from all
</Limit>
```

[Next page](https://forum.getkirby.com/t/after-published-cant-edit-and-logout/14544.md?page=2)
