Files blueprint issue

Hi, I’m developing a website with Kirby. Everything works great on my localhost, but when I uploaded on a server I get a problem with files blueprint. If I click on the image I get a “unauthenticated” message (or something like that, it’s very quick the screen, and then immediately I get jumped back to the main panel page. I developed several Kirby websites I never get this error, so I think it’s probably something connected with the hosting (Godaddy). Any suggestions? I need to access the image blueprint to set captions.

Thanks!

Can you see anything more detailed in the browser’s console maybe (with debugging enabled)?

Yes, there’s an error when I click on the image, but the refresh is too quick and I can’t read the error message… How can I find it?
Thanks

Found! :slight_smile:

Schermata 2020-06-09 alle 17.05.31

Could you please open these errors, so that we can see the complete message?

Schermata 2020-06-09 alle 17.32.16

It says: Impossible to find the property. The object could not exist anymore
Thanks!

I meant this second bit here:

There seems to be more information lurking after the dots…

When I click on the object it says it can’t retrieve info about the object as it’s not existing anymore…

Does other stuff work, like uploading files, editing pages etc.?

yes, everything is fine! Also I must say that it works on other website with different hosting…

Could you please post the file blueprint? Also, is there anything specific about the filenames? Godaddy is a pain…

this is the part of the page blueprint where I upload images:

      images:
        label: Images
        fields:
          image:
            type: files
            max: 3
            template: image             

this is the files/image.yml

title: Image
fields:
caption:
type: text

What do you mean with filenames?
Thanks for the help!

If I click on the link of the image blueprint page i get this:
{“status”:“error”,“message”:“Unauthenticated”,“code”:403,“exception”:“Kirby\Exception\PermissionException”,“key”:“error.permission”,“file”:"/debug/kirby/config/api/authentication.php",“line”:10,“details”:[],“route”:"(.*)/files/([a-zA-Z0-9\.\-_%= \+\@\(\)]+)"}

Thanks. The error is thrown because of this condition:

if ($auth->type() === 'session' && $auth->csrf() === false) {

So there is a problem with the csrf token… But that doesn’t explain why it only happens when you want to access the image view :thinking:

I don’t either know what a csrf token is :sweat_smile:

Have you tried to remove the media folder and clear the session folder?

A csrf token is used to prevent Cross-Site-Request-Forgery, to make sure that a request comes from your site. As such, it is a security measure.

Thanks! :slight_smile:
Yes, I deleted the media folder but nothing changed…

  1. Are you using the latest Kirby version (3.3.6)? If not, download the latest copy and replace the current Kirby folder with the new one. If that doesn’t help:

  2. Have you tried if the same happens with a fresh Starterkit on the same server?

Done, but it doesn’t fix :sob:

Does that mean the same happens with a fresh Starterkit?