Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Making files public in roles/permissions generates warning in API request #584

Closed
verbman opened this issue Nov 11, 2018 · 3 comments
Closed
Assignees
Labels
not reproducible The developer couldn’t reproduce the bug

Comments

@verbman
Copy link

verbman commented Nov 11, 2018

Undefined index notice.

  • Azure webapp
  • PHP 7.2
  • MySQL 5.7
  • env - development

Steps to reproduce:

  • Create a public collection
  • Add a field for file.
  • Upload an image
  • Make the directus files system collection read for role public (in settings-user roles/permissions)
  • Call the api end point (query: /_/items/panels?fields=id,title,image.id,image.filename,image.type,image.width,image.height,image.data.full_url,website&meta=total_count,result_count&offset=0)
    Get the results as expected but with the following two lines appended:

Notice: Undefined index: uploaded_by in D:\home\site\directus\src\core\Directus\Database\TableGateway\RelationalTableGateway.php on line 1767

Notice: Undefined index: folder in D:\home\site\directus\src\core\Directus\Database\TableGateway\RelationalTableGateway.php on line 1767

@verbman verbman changed the title Making files public in roles/permissions generates error in API request Making files public in roles/permissions generates warning in API request Nov 12, 2018
@rijkvanzanten rijkvanzanten transferred this issue from directus/directus Nov 14, 2018
@wellingguzman wellingguzman added this to To do in v2.0.10 Nov 26, 2018
@wellingguzman wellingguzman moved this from To do to In progress in v2.0.10 Nov 26, 2018
@wellingguzman
Copy link
Contributor

@verbman I wasn't able to reproduce this issue, can you try this in the current version?

If this issue still exists in the current version, could you please provide a schema that we can use to reproduce this issue?

@wellingguzman wellingguzman added the not reproducible The developer couldn’t reproduce the bug label Nov 26, 2018
@wellingguzman wellingguzman moved this from In progress to To do in v2.0.10 Nov 26, 2018
@rijkvanzanten rijkvanzanten added this to To do in v2.0.11 Dec 3, 2018
@cesasol
Copy link
Contributor

cesasol commented Dec 14, 2018

I just encounter this and solved it by allowing folders and users to the public, the later is not something i would like to keep. Also to note this happened only on one entry of the collection. I could see that the problem lies when you request all fields of any file.
Also, the user who uploaded the entry that triggered the fail was not the first admin, maybe there is something there.

@wellingguzman
Copy link
Contributor

Due to inactivity I will be closing this ticket. If someone still experience this issue in the current version please let us know, and we will re-open this ticket.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
not reproducible The developer couldn’t reproduce the bug
Projects
No open projects
v2.0.10
  
To do
v2.0.11
  
To do
Development

No branches or pull requests

3 participants