This module has worked fine for over a year.

now when I bring up the media browser

I get a js error:
GET /system/files/styles/media_thumbnail/private?itok=tsE4iC8a 403 (Forbidden)

the directory does not exist

when I upload a file it is placed in sites/default/files/private/ as expected
the appropriate content-file item is created

when I press 'next' I get the same error
GET /system/files/styles/media_thumbnail/private?itok=tsE4iC8a 403 (Forbidden)

I do not see a 'submit' button as I have in the past.

I am able to browse 'My files', select, submit, and the image is included. 'My files' does not include images I uploaded recently.

I was getting the length error https://www.drupal.org/project/media/issues/2542848 I applied the patch and eliminated the error but no other improvement.

This has been happening for a while and I have just worked around it manually.

The only change I recall is moving the entire site to SSL. Not sure about the timing.

CommentFileSizeAuthor
#9 Capture.PNG17.7 KBsmalltalkman
#5 Capture.PNG37.75 KBsmalltalkman

Comments

smalltalkman created an issue. See original summary.

joseph.olstad’s picture

Your baseurl setting may be incorrect for your newly changed ssl/protocol for http or https
This is normally in settings.php

steinmb’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)
smalltalkman’s picture

I set $base_url in settings.php as suggested and am able to see, select, and submit files previously uploaded.

brilliant, thanks

when I upload a new file I am able to select from my PC get a 403 forbidden error when I upload

GET https://myally.co/system/files/styles/media_thumbnail/private?itok=tsE4iC8a 403

I am able to crop but cannot save and have no submit.

smalltalkman’s picture

StatusFileSize
new37.75 KB
chris matthews’s picture

Version: 7.x-2.21 » 7.x-2.x-dev
joseph.olstad’s picture

Assigned: Unassigned » joseph.olstad
Status: Postponed (maintainer needs more info) » Active

smalltalkman , what release of file_entity and media were you using when this last worked for you?

also, can you please try to reproduce this on simplytest.me ?

create a new sandbox environment with this link:
https://simplytest.me/project/media_dev/7.x-4.0-beta9

configure a private filesystem and the permissions as you see fit, and try to reproduce this issue, when you do, describe how, and I will review.

joseph.olstad’s picture

this could be related to the javascript not loading the right protocol, I'll maybe have a look at the javascript, you could try forcing https on the javascript by making sure the url requested is formatted like :

<img src="//domain.com/img/logo.png">
it could be that somewhere along the way the session is lost and doesn't retain your user permissions required for private files.

https://www.paulirish.com/2010/the-protocol-relative-url/

Let me know if you've resolved this issue, and how you did so.

Otherwise, please try to help me with steps to reproduce the issue. I'm using private filesystem with the media_dev distribution and it works for me currently, however I haven't updated to the very latest release of file_entity and media yet, I'm almost at the latest release on this site I've got set up with the private filesystem

I could try upgrading it and try it out..

detailed steps to reproduce would really help save time figuring this out and will result in a prompt solution.

smalltalkman’s picture

StatusFileSize
new17.7 KB

media 7.x.221 file_entiry 7.x-2.22

I cannot reproduce the problem. I have used these successfully for some time. I am all but certain it's a configuration problem on my site caused by switching to secure after many operations.

immediately after "Choose File" "open" before "Upload" error in the console log

403 forbidden GET https://myally.co/system/files/styles/media_thumbnail/private?itok=tsE4iC8a 403

There is no file name which seems to be the problem.

On the same page I can use a file_field with "Choose File" "open" "Upload"

I can usually find a code line associated with an error. Here there is only the GET url. Please point me to js to trace.

joseph.olstad’s picture

ok thanks for that info, I'm a bit busy right now to test this out myself, but try to reproduce this on simplytest.me using the media_dev distribution latest 4.x version

see if you can reproduce this on there.
if you can reproduce this on media_dev, then I'll for sure try to fix it asap.
https://simplytest.me/project/media_dev/7.x-4.0-beta9

configure a private filesystem and the permissions as you see fit

username will be admin
password will be admin

smalltalkman’s picture

I resolved the problem by disabling a few modules which depend on media (Open Atrium Media et.al.) and re-enabling. I could not disable media itself because the Open Atrium distribution is so intertwined.

smalltalkman’s picture

Status: Active » Closed (won't fix)
joseph.olstad’s picture

Thanks for reporting!