"Page only allows" error when uploading files

I have the same issue. What do you mean by .htaccess code changing PHP version? Do you know which is the right PHP version for this to work?

when I try to upload a file I keep getting a message: “Page only allows:” with no other explanation. It worked before having the latest Kirby Update. But this shouldn’t affect access rights…

With certain hosters it might be necessary to set the PHP version via .htaccess and updating might overwrite a former .htaccess setting. That’s probably what @unli355 referred to.

Have you checked all of the above and your PHP version? The requirement is PHP 5.4+.

Yes, my PHP version is 5.5.33. And in the .htaccess file there’s no overriding of that.
There are no console or php errors. And on localhost I was able to change the php.ini to allow large files.

What is really weird is that just before the kirby update, it worked just fine to upload files. Then after the update, doesn’t work anymore.
Not sure if it’s the file size that’s the problem, or something else. Any leads?

Also Kirby itself doesn’t give a proper message, it only says “Page only allows:”, but what does the page only allow? I tried larger files, smaller file in the jpg or gif format. Which both worked before.

Thanks :slight_smile:

From looking at the error message, this refers to the file type settings in blueprints. Have you added any restrictions to your blueprints?

yes, but the restriction is on images & videos, which is exactly what i was trying to upload:

		- image
		- video

Can you upload if you remove the restriction?

Yes! It works! Thanks a bunch! :smiley: :smiley:

Ok, thanks for testing. Sounds like a bug.

I briefly tested this and rather than this being a bug, I think you probably had an indentation error in your blueprint. Pls. try again with proper indentation using 2 spaces (not tabs) for each level.

Ok, might have been. I tried it again and now it works. :slight_smile:
sorry for the trouble.

Actually, this is weird. Because I just checked the previous version from GitHub, and seems like there wasn’t a problem with the spacing.
So you say not to use tabs, but spaces… however I’ve used tabs in the whole of the blueprint, and it seems to be working fine now. Other fields and restrictions are also quite valid, for now.

Well, maybe it was something else, but I copied your code from above into one of my test blueprints and I could not upload any files. After I removed the error the blueprint was showing in my editor, everything worked fine again; when I turned back to the original version, the error came back.