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

Failed to load attachment #1096

Closed
Jeefongithub opened this issue Jan 28, 2024 · 6 comments · Fixed by nextcloud/text#5484
Closed

Failed to load attachment #1096

Jeefongithub opened this issue Jan 28, 2024 · 6 comments · Fixed by nextcloud/text#5484
Labels
bug Something isn't working needs info

Comments

@Jeefongithub
Copy link

Describe the bug
A clear and concise description of what the bug is.

When opening a page with attachments in view mode all attachments show as 'failed to load attachment'

To Reproduce
Steps to reproduce the behavior:

  1. Go to collective
  2. Open page with attachment
  3. view in non-edit mode

Expected behavior
preview of dialog showing attachment that can be selected

Screenshots
If applicable, add screenshots to help explain your problem.

image

Server details:

  • Collectives app version: 2.9.2
  • Nextcloud version: 28.0.2 RC4
  • PHP Version: 8.2.13
  • Database: MariaDB 10.5.21

Client details:

  • OS: Debian 12
  • Browser: floorp (firefox fork)
  • Browser version: 11.8.2
  • Device: Desktop
Logs

Nextcloud log (data/nextcloud.log)

[nextcloud.log](https://github.com/nextcloud/collectives/files/14077655/nextcloud.log)

Browser log

Insert your browser log here, this could for example include:

[console-export-2024-1-28_15-39-9.txt](https://github.com/nextcloud/collectives/files/14077645/console-export-2024-1-28_15-39-9.txt)


</details>
@Jeefongithub Jeefongithub added the bug Something isn't working label Jan 28, 2024
@MagsMagnoli
Copy link

Also seeing this. Browser console says there's an issue due to the socket being in connecting state. Probably related to why it works when moving to edit mode?

@Cris70
Copy link

Cris70 commented Mar 4, 2024

I see this too, but not with all attachment types: PDFs and SVGs show the buggy behavior, but PNGs work correctly.
Maybe this can help shed some light on the root cause of the problem?

@Aveyron-RetD
Copy link

Aveyron-RetD commented Mar 7, 2024

I have defaulted to edit mode. This is only happening in preview mode

@mejo-
Copy link
Member

mejo- commented Mar 14, 2024

Dear @Jeefongithub, thanks for the report.

Does this happen to you all the time? Or just in some cases or on some pages?

Can you please open the web console of your browser (Ctrl-Shift-I on Firefox/Chrome), reproduce this bug and send us any errors or warnings being logged there.

@Cris70
Copy link

Cris70 commented Mar 14, 2024

Does this happen to you all the time? Or just in some cases or on some pages?

Only for some attachment types: PDFs and SVGs show the buggy behavior, but PNGs work correctly.
Also, the problem is visible in view mode but not in edit mode.

Can you please open the web console of your browser (Ctrl-Shift-I on Firefox/Chrome), reproduce this bug and send us any errors or warnings being logged there.

Just tried: I do not see anything in the console when opening pages which contain buggy attachments, nor when switching from view mode (which shows the buggy behavior) to edit mode (which shows attachments correctly).

@mejo-
Copy link
Member

mejo- commented Mar 14, 2024

This is a bug in Nextcloud Text. nextcloud/text#5484 fixes it. We'll take care that this lands in the upcoming Nextcloud 27 and 28 bugfix releases.

mejo- added a commit to nextcloud/text that referenced this issue Mar 14, 2024
When switching pages in Collectives, `currentSession` might still be the
session from the last page. The readonly view (`MarkdownContentEditor`)
doesn't get a session, so the outdated session is used.

Instead, always pass the session from `AttachmentResolver` to
`setAttachmentList`.

Fixes: nextcloud/collectives#1096
Fixes: nextcloud/collectives#1112

Signed-off-by: Jonas <jonas@freesources.org>
backportbot bot pushed a commit to nextcloud/text that referenced this issue Mar 14, 2024
When switching pages in Collectives, `currentSession` might still be the
session from the last page. The readonly view (`MarkdownContentEditor`)
doesn't get a session, so the outdated session is used.

Instead, always pass the session from `AttachmentResolver` to
`setAttachmentList`.

Fixes: nextcloud/collectives#1096
Fixes: nextcloud/collectives#1112

Signed-off-by: Jonas <jonas@freesources.org>
backportbot bot pushed a commit to nextcloud/text that referenced this issue Mar 14, 2024
When switching pages in Collectives, `currentSession` might still be the
session from the last page. The readonly view (`MarkdownContentEditor`)
doesn't get a session, so the outdated session is used.

Instead, always pass the session from `AttachmentResolver` to
`setAttachmentList`.

Fixes: nextcloud/collectives#1096
Fixes: nextcloud/collectives#1112

Signed-off-by: Jonas <jonas@freesources.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs info
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants