I’m getting the ol’ Unauthorized message on really basic admin tasks – saving a page, navigating from the page editor to the page list, etc. Is this part of the general unauthorized problem that’s going on? Or is it me? (BTW, the saving of the page is successful. And I’m all up-to-date.)
Also, are page media files supposed to be visible in the page media upload box permanently? When I upload, they appear in the box. The files are saved. However, when I save the page or navigate away and back, the files disappear from the upload box. Makes for a memory test…
One problem at a time. I know you say you are all up to date, but the unauthorized errors are caused by trying to make calls without the appropriate nonces which are used for security purposes.
I would first try to force an update of your Grav version and all your plugins too. The easiest way to to do this is by gpm:
The question regarding media. That is not just an ‘upload box’ it’s a list of media, so yes, they should show up there even after you are done uploading and you go back to the page.
There is no support for a media page type, eg media.html.twig in either Antimatter or the admin plugin. I don’t know what theme your are running, or how you are getting a reference to that template unless you created a page called media.md. If that’ sthe case then you would need to create an appropriate media.html.twig to handle it.
The JSON file is used by the admin to get the status of the media files associated with the page. It’s an Ajax call, so it uses a JSON template.
I didn’t make that media.md file, but renaming it does eliminate the Unauthorized problem. For me, the file comes in the admin download. Unless I’m crazy? bin/gpm uninstall admin and then bin/gpm install admin and the media.md is there.
So media.json.twig is my place to start wrt the empty media box?
There is a file called media.md in the admin plugin to display those media files, but that is inside the plugin itself: user/plugins/admin/pages/media.md
This should not effect your site however and i’m not able to replicate the issue when saving pages, it just works, no errors.