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

Some images are displayed in PLANTDataHub as links which link to nowhere #12

Open
ArmandoTeixeira opened this issue Oct 23, 2024 · 9 comments
Assignees

Comments

@ArmandoTeixeira
Copy link

Describe the bug
When using the tool, some of the images are shown in the PLANTDataHub online viewer as only "broken" links. When you try to click them, they yield a 404 error. However, the image files are uploaded in the dataset folder. It does not happen because of a specific file type (e.g. png also yielded this problem), name (e.g. unusual characters), nor because of some text formating (e.g. indentation, inclusion in a bullet list, etc.). Until now, it's unclear why some pictures show up good and others have this bug.

When inspecting the webpage code, the src of the images that are correctly showing look like this:
"https ://git.nfdi4plants.org/ag_zurbriggen_hhu/*folder name*/*ARC name*/-/raw/main/assays/*assay name*/dataset/2_image.png"
while the src link of the "broken" images look like this:
"/ag_zurbriggen_hhu/*folder name*/*ARC name*/main/app/download.php?name=image.png&f=94/94eb2d0b570663f22de8959d2542cf7af8a1058d6be94da95924a44279d86c523e673b068d97ef42f8fa2ce5582db986ddb0265d9047c33da55b1d944e63bb43.png&storage=2"

To Reproduce
Steps to reproduce the behavior:
Note: I am not sure of exactly how to reproduce it because some images work and some don't, and I haven't find a common denominator regarding the file type/name/size

  1. Go to the elab2arc online tool
  2. Fill in the Experiment ID and both tokens, all issued with the required permissions.
  3. Click on 'One Click Submission'
  4. Afterwards, go to the PLANTDataHub webpage, log in with your credentials and open the desired ARC
  5. Go to 'assays' and open the desired assay
  6. Click on 'protocols' and open the protocol (converted eLab entry)
  7. Visualize in the online viewer the images appearing as only links

Expected behavior
Images show up in the web viewer of PLANTDataHub as "broken" links.

Screenshots
elab2arc image error

Desktop (please complete the following information):

  • OS: all
  • Browser: all
@SabrinaZander
Copy link
Collaborator

Thank you for reporting this issue. We have investigated this issue further and it might be due to the upload method you are using for the images. If you upload the image as a file first and then use "insert into text at cursor position" it will not work.
image
Because this is a different way of referencing than if you drag the image directly into the text.

How did you insert the images into elabFTW?

We will try to improve the image behavior.

@xiaoranzhou
Copy link
Member

Hi thanks for your feedback, I have implemented a new way to handle the different urls created by elabftw. Please try again and give more feedback. Thanks in advance

@xiaoranzhou
Copy link
Member

@ArmandoTeixeira I would like to invite you to test the tool again when you have time. In addition, it will be great if you can give me some feedback on the new version of elab2arc, so I can further improve it 😄

@xiaoranzhou xiaoranzhou self-assigned this Oct 23, 2024
@ArmandoTeixeira
Copy link
Author

Thank you for your quick response! The issue was raised by a coworker, since my pictures were all fine until now, but I will check with them to see if the issue has been solved. Regarding my feedback, when the conversion works, it is well formated in the ARC it goes to. However, I am coming across a problem of, while the eLab2ARC converter successfully adds an Experiment to an ARC for the first time, it cannot add a second Experiment, rasing the error of "could not find main". Sabrina is already aware of this, but maybe I should raise another Issue here.

@xiaoranzhou
Copy link
Member

Hi @ArmandoTeixeira , glad to know that the tool worked (at least for the first experiment 😄 ).
Sabrina also suggested adding a function to convert multiple experiments to different assays of a single ARC.
I had some time yesterday and added a feature to add multiple experiment ids (seperated by comma) for the conversion. I would like to invite you for another testing phrase and I hope it can also sovle the problem of adding a second experiment 😄

@ArmandoTeixeira
Copy link
Author

Hi @xiaoranzhou, unfortunately, when I try to convert another experiment, even if it is adding only one more to the arc and not several in a batch, it still yields me the error of "main not found". Please see the attached screenshot with the error. Apparently, it seems to be having problems finding the main branch of my ARC.
image

@xiaoranzhou
Copy link
Member

Hi @ArmandoTeixeira, thanks for the feedback again. Does the ARC have a main branch?
I think there might be some issue related to the pushing of the ARC back to datahub. You can first check the "rights" of the DataHub access token. Make sure that the token is:

  1. not expired.
  2. set as maintainer.
  3. has right to read and push to the repository.
    image

At the moment, I can not reproduce the error on other repos.
If the problem presists, I can help to debug on a similar DataHUB repo that I can access to.

@ArmandoTeixeira
Copy link
Author

Dear @xiaoranzhou, yes, the ARC has a main branch, which is accompanied by the tags "default" and "protected" (see picture).

image

The access token is most likely not the problem, since it expires in 1 year, has Maintainer role and has the necessary permissions. I even tried generating a token with all possible permissions but it still yielded me an error. I am also a bit lost on what the problem might be, maybe I need to delete the ARC and create it again, but still I don't know what would make it act like this.
Thank you a lot for all your help so far!

@xiaoranzhou
Copy link
Member

xiaoranzhou commented Nov 4, 2024

Hi @ArmandoTeixeira, have you tried to restart conversion from eLabFTW to a new ARC? Is there anything I can help now? 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants