Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't edit an asset from SELECT section when it's not loaded in the BROWSE section #7458

Closed
wesselvanderlinden opened this issue Aug 13, 2020 · 10 comments · Fixed by #7459
Closed
Labels
good first issue Good for newcomers issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around source: core:upload Source is core/upload package

Comments

@wesselvanderlinden
Copy link
Contributor

Describe the bug
When I try to edit an already uploaded file from within the "selected assets" view, I get a JS error indicating it can't find my selected file.

Steps to reproduce the behavior

  1. Go to a content type with a "multiple media" field
  2. Click on the "+" icon to "add a new file"
  3. Click on the "selected" tab
  4. Click on the edit icon of a selected image

Expected behavior
I expect an edit view on the selected file to open where I can edit the files name, alternative text etc.

Screenshots
Screenshot_20200813_205528
Screenshot_20200813_205823

System

  • Node.js version: v14.5.0
  • NPM version: 6.14.6
  • Strapi version: 3.1.4
  • Database: sqlite
  • Operating system: Manjaro linux
wesselvanderlinden added a commit to wesselvanderlinden/strapi that referenced this issue Aug 13, 2020
wesselvanderlinden added a commit to wesselvanderlinden/strapi that referenced this issue Aug 13, 2020
wesselvanderlinden added a commit to wesselvanderlinden/strapi that referenced this issue Aug 13, 2020
This resolves strapi#7458

Signed-off-by: Wessel van der Linden <wessel.linden@gmail.com>
@derrickmehaffy
Copy link
Member

Please try to run a yarn build --clean or npm run build --clean as I was not able to reproduce on v3.1.4 on Linux Mint 19.3

@wesselvanderlinden
Copy link
Contributor Author

That doesn't work for me unfortunately.

I think it has to do with the images loaded in the "browse" tab. If a selected image is not in there, the edit button will break.

@lauriejim
Copy link
Contributor

Hello did I miss something?
Here is the video of what is did and it's working fine.
https://www.loom.com/share/17d9274537bb4de1849f6c4a5bd971b7

@wesselvanderlinden
Copy link
Contributor Author

Here is a video to show how you can reproduce it: https://streamable.com/97dy0f
Note that the image I select to edit in the "Selected" tab is not loaded in the "Browse" tab

@lauriejim
Copy link
Contributor

Can you confirm that this image is still in your media lib? Just not in the first page.

@wesselvanderlinden
Copy link
Contributor Author

@lauriejim yes it is, but on the third page in the "Browse" tab

@lauriejim
Copy link
Contributor

Can you try to go on the third page (to load the file) and then click on the button that shows trigger the error.
So, if the issue comes from the load of the image, you should not have the issue in this case.
Can you confirm that?

@wesselvanderlinden
Copy link
Contributor Author

wesselvanderlinden commented Aug 18, 2020

Yes I can confirm: https://streamable.com/gg3z2x

It only happens when the image is not in the Browser tab, if it is it works just fine.

wesselvanderlinden added a commit to wesselvanderlinden/strapi that referenced this issue Aug 19, 2020
This resolves strapi#7458

Signed-off-by: Wessel van der Linden <wessel.linden@gmail.com>
@lauriejim lauriejim changed the title Upload plugin: Error after clicking on "edit" in EditAssets view Can't edit an asset from SELECT section when it's not loaded in the BROWSE section Aug 19, 2020
@lauriejim lauriejim added severity: medium If it breaks the basic use of the product but can be worked around source: core:upload Source is core/upload package issue: bug Issue reporting a bug and removed issue: help wanted labels Aug 19, 2020
@lauriejim
Copy link
Contributor

Thank you for helping us to identify the source of the issue.
I will really appreciate your help if you can submit a PR to fix the issue.
It's the summer and a vast part of the team is OOO.
Thank you for your time.

@lauriejim lauriejim added the good first issue Good for newcomers label Aug 19, 2020
wesselvanderlinden added a commit to wesselvanderlinden/strapi that referenced this issue Aug 22, 2020
This resolves strapi#7458

Signed-off-by: Wessel van der Linden <wessel.linden@gmail.com>
@wesselvanderlinden
Copy link
Contributor Author

See the attached PR at #7459 :)

alexandrebodin pushed a commit that referenced this issue Sep 3, 2020
This resolves #7458

Signed-off-by: Wessel van der Linden <wessel.linden@gmail.com>

Co-authored-by: cyril lopez <cyril.lpz@gmail.com>
gfritzdev pushed a commit to gfritzdev/strapi that referenced this issue Sep 7, 2020
This resolves strapi#7458

Signed-off-by: Wessel van der Linden <wessel.linden@gmail.com>

Co-authored-by: cyril lopez <cyril.lpz@gmail.com>
Signed-off-by: Garrett Fritz <garrettfritz@garretts-mbp.home>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around source: core:upload Source is core/upload package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants