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

Unable to edit photos; redirected back to the file list (NC 29 & 30) #2323

Closed
RyoKub opened this issue Apr 30, 2024 · 32 comments · Fixed by #2490
Closed

Unable to edit photos; redirected back to the file list (NC 29 & 30) #2323

RyoKub opened this issue Apr 30, 2024 · 32 comments · Fixed by #2490
Assignees
Labels
2. developing Work in progress bug Something isn't working high High priority regression Regression of a previous working feature

Comments

@RyoKub
Copy link

RyoKub commented Apr 30, 2024

Description

When accessing the Photos app at http://[nextcloud]/apps/photos/ and clicking on the viewer to view images, the interface allows for normal interaction. However, attempting to edit an image by clicking the pencil icon results in being redirected back to the file list screen instead of opening the editing interface.

Error Message

Console in Browser : [Deprecation] Listener added for a 'DOMNodeInserted' mutation event. This event type is deprecated, and will be removed from this browser very soon. Usage of this event listener will cause performance issues today, and represents a large risk of future site breakage. Consider using MutationObserver instead. See https://chromestatus.com/feature/5083947249172480 for more information.

This issue occurs consistently across different browsers including Edge and Chrome on Windows, and Safari on iPad.

Steps to Reproduce

  1. Open the Nextcloud Photos app at http://[nextcloud]/apps/photos/.
  2. Click on any photo to view it.
  3. Attempt to edit the photo by clicking the pencil icon.
  4. Observe that instead of transitioning to the edit mode, the interface redirects back to the file list.

Expected behavior

The expected behavior is to transition to the photo editing interface as was the case in previous version 28.0.3.

Actual behavior

Clicking the edit icon redirects back to the photo file list, and a deprecation warning is logged in the console.

Environment

  • Nextcloud version: 29.0.0
  • Photos app version: 2.5.0
  • Operating system: Windows and iOS
  • Browser: Edge, Chrome, Safari

Additional context

This issue prevents any editing functionality within the Photos app, which was functional in the previous version 28.0.3. The same behavior is observed across multiple platforms and browsers indicating a possible issue with the app's handling of deprecated browser features.

image

@RyoKub RyoKub added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Apr 30, 2024
@RyoKub RyoKub changed the title Title: Unable to edit photos; redirected back to the file list Nextcloud:29.0.0 Unable to edit photos; redirected back to the file list May 1, 2024
@dennisheitmann
Copy link

dennisheitmann commented May 6, 2024

Same here. Nextcloud 29.0.0.19 with photos 2.5.0. Tested with Chrome and Firefox on Linux.

After not editing was not working, also display of photos does not work anymore until reload of page:

image

@ralfi
Copy link

ralfi commented May 13, 2024

confirm, memories works

@aurelienpierre

This comment has been minimized.

@bobobo-git
Copy link

confirm it.
also look at https://help.nextcloud.com/t/editing-in-images-doesnt-work/189508

😀

@bobobo-git
Copy link

the errormessage from above is also applied in NC 27.5.1 but there the fotoapp reacts correct

@bobobo-git
Copy link

bobobo-git commented May 29, 2024

i took the viewer app from a nextcloud 27 , edited the info.xml in the appinfo-folder (max-version="29")
and and overwrote the existing viewer app

and then (after an updatemessage) it worked ok.

so it seam to be the viewer app
(it isn't loaded in webpack when using the nc 29 version)

maybe it is time to contact the author of the viewer app
author mail="skjnldsv@protonmail.com" John Molakvoæ from the info.xml

the content of folder js in the app looks strange
no js files but mjs files ...

@bobobo-git
Copy link

bobobo-git commented May 29, 2024

i replaced all in js folder with the content of the js folder from the nc27 version

after an update message everything runs ok in nc 29
BUT the editor for text / md wont work anymore.

in a fresh installation nc 29.0.1 , all apps deactivated, a click on a jpg shows it but will not load the editor if clicked on the pencil.

@bobobo-git
Copy link

bobobo-git commented May 30, 2024

the image editor (*) fails to load in nc 29.

implementatin of filerobot image editor https://scaleflex.github.io/filerobot-image-editor/

read here https://nextcloud.com/blog/how-we-got-to-the-new-nextcloud-photos/

@joshtrichards joshtrichards added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending approval or rejection. This issue is pending approval. labels May 31, 2024
@joshtrichards joshtrichards transferred this issue from nextcloud/photos May 31, 2024
@joshtrichards
Copy link
Member

Reproduced. Editing is provided by Viewer not the Photos app. Transferred to that repo.

@skjnldsv skjnldsv self-assigned this Jul 5, 2024
@skjnldsv skjnldsv added the high High priority label Jul 5, 2024
@alexanderdd alexanderdd added the regression Regression of a previous working feature label Jul 15, 2024
@alexanderdd
Copy link

Still broken in NC 30.0.0 beta 5 (tested on c.nc.com)

Weird also: after unsuccessfully trying to edit and getting thrown back to files list, and clicking an image again, you see the error "no plugin avialable to view this file type" (German "Es ist kein Plugin zum Anzeigen dieses Dateityps verfügbar")

@alexanderdd alexanderdd changed the title Nextcloud:29.0.0 Unable to edit photos; redirected back to the file list Unable to edit photos; redirected back to the file list (NC 29 & 30) Aug 13, 2024
@thlehmann-ionos
Copy link

thlehmann-ionos commented Sep 10, 2024

Without more in-depth investigation: the problem seems to be related to the bundling/module-loading.

The error is not reproducible in a dev environment with debug => true. The difference here is the script loading does not add a cache-buster to the URL in dev mode, while in production mode, it's added.

In production one can observe that viewer-main.mjs is loaded a second time without a cache buster when clicking the pencil icon.

I assume that the viewer code loads and executes a second time, this time with no handlers being registered through registerHandler() (because this already happend). When stepping through the code one can see that openFileInfo() upon pencil icon click failed due to registeredHandlers being empty. Yet, when breaking in registerHandler() on page load we observe handlers being registered.

Vite does not seem to be aware of the added cachebuster when lazy-importingfilerobot-image-editor in ImageEditort.vue's mounted()

(Edits: clarifications, formatting)

@thlehmann-ionos
Copy link

I'm not familiar enough with the setup and Vite's bundling internals, and I am happy to attempt fixing it if someone could give me some hints here.

@Gortosch

This comment has been minimized.

@dolorosus
Copy link

At the moment it does not look like this error will be fixed. I therefore suggest removing the pencil icon (edit).

@joshtrichards joshtrichards added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels Oct 6, 2024
@joshtrichards joshtrichards linked a pull request Oct 6, 2024 that will close this issue
3 tasks
@joshtrichards joshtrichards pinned this issue Oct 6, 2024
@Infamousbugg
Copy link

Infamousbugg commented Oct 8, 2024

This is resolved for me on Nextcloud 30.0.1 RC1.

@thlehmann-ionos
Copy link

Still reproducible with Nextcloud tag v30.0.0 and Viewer tag v30.0.0,'debug' => false (so that a cache-buster parameter is appended to resources)
Image

@ivnmad
Copy link

ivnmad commented Oct 10, 2024

This is resolved for me on Nextcloud 3.0.1 RC1.

I can confirm the issue seems to be solved with 3.0.1 RC1

@ostasevych
Copy link

ostasevych commented Oct 13, 2024

This is resolved for me on Nextcloud 3.0.1 RC1.

I can confirm the issue seems to be solved with 3.0.1 RC1

Hi! How to get 3.0.1 RC1 version and backport to 29.0.x?
Are any other alternatives?

@ivnmad
Copy link

ivnmad commented Oct 14, 2024

This is resolved for me on Nextcloud 3.0.1 RC1.

I can confirm the issue seems to be solved with 3.0.1 RC1

Hi! How to get 3.0.1 RC1 version and backport to 29.0.x? Are any other alternatives?

Hi, Nextcloud Hub 9 (30.0.1 RC2) has been released in the meantime.
You can find it on the "beta" channel, but I would presume a version that includes the fix [30.0.2 or next] should make it to the "stable" channel soon.

In case you want to get it from the "beta" channel, you can select it from "Administration settings".
After installing the update, you can then "revert" back to "stable" if you want the next update to come from that channel, or you can stay on the beta channel, if you like testing new versions:

Image

@ostasevych
Copy link

ostasevych commented Oct 14, 2024

i took the viewer app from a nextcloud 27 , edited the info.xml in the appinfo-folder (max-version="29") and and overwrote the existing viewer app

and then (after an updatemessage) it worked ok.

so it seam to be the viewer app (it isn't loaded in webpack when using the nc 29 version)

maybe it is time to contact the author of the viewer app author mail="skjnldsv@protonmail.com" John Molakvoæ from the info.xml

the content of folder js in the app looks strange no js files but mjs files ...

UPD: Yes. I have overwritten files from NC 28.0.11 and confirm, that it works, moreover the text docs are opening as well. Rollback to viewer v.2.3.0 can be feasible here as a temporary solution.

@ostasevych
Copy link

ostasevych commented Oct 14, 2024

This is resolved for me on Nextcloud 3.0.1 RC1.

I can confirm the issue seems to be solved with 3.0.1 RC1

Hi! How to get 3.0.1 RC1 version and backport to 29.0.x? Are any other alternatives?

Hi, Nextcloud Hub 9 (30.0.1 RC2) has been released in the meantime. You can find it on the "beta" channel, but I would presume a version that includes the fix [30.0.2 or next] should make it to the "stable" channel soon.

In case you want to get it from the "beta" channel, you can select it from "Administration settings". After installing the update, you can then "revert" back to "stable" if you want the next update to come from that channel, or you can stay on the beta channel, if you like testing new versions:

Can I extract viewer app from NC 30.0.2 and will it be working in NC 29.0.8?

@thlehmann-ionos
Copy link

Still reproducible with Nextcloud tag v30.0.0 and Viewer tag v30.0.0,'debug' => false (so that a cache-buster parameter is appended to resources)

It's no longer reproducible on viewer tag v30.0.1rc2. 👍

@ostasevych
Copy link

Still reproducible with Nextcloud tag v30.0.0 and Viewer tag v30.0.0,'debug' => false (so that a cache-buster parameter is appended to resources)

It's no longer reproducible on viewer tag v30.0.1rc2. 👍

What is the version of the viewer app? Is it 3.0.0 according to info.xml file?

@thlehmann-ionos
Copy link

Still reproducible with Nextcloud tag v30.0.0 and Viewer tag v30.0.0,'debug' => false (so that a cache-buster parameter is appended to resources)

It's no longer reproducible on viewer tag v30.0.1rc2. 👍

What is the version of the viewer app? Is it 3.0.0 according to info.xml file?

The version from info.xml is 3.0.0.

Git revision: 6d3ae93f.

@ostasevych
Copy link

ostasevych commented Oct 14, 2024

Still reproducible with Nextcloud tag v30.0.0 and Viewer tag v30.0.0,'debug' => false (so that a cache-buster parameter is appended to resources)

It's no longer reproducible on viewer tag v30.0.1rc2. 👍

What is the version of the viewer app? Is it 3.0.0 according to info.xml file?

The version from info.xml is 3.0.0.

Git revision: 6d3ae93f.

I tried to use it with NC29.0.8, changed the info.xml file by setting version=2.3.0 and min-version=29 to skip the update prompt. That didn't work.

@randall11GB
Copy link

same issue. installed new nextcloud using linuxserver.io v30 hub9 -- same issue exists on new install.

@ivnmad
Copy link

ivnmad commented Oct 19, 2024

same issue. installed new nextcloud using linuxserver.io v30 hub9 -- same issue exists on new install.

@randall11GB upgrade to 30.0.1 and the issue will be solved.

@randall11GB
Copy link

randall11GB commented Oct 19, 2024 via email

@ostasevych
Copy link

same issue. installed new nextcloud using linuxserver.io v30 hub9 -- same issue exists on new install.

@randall11GB upgrade to 30.0.1 and the issue will be solve.

Is that possible to fix it somehow at 29.0.x?

@randall11GB
Copy link

30.0.1 definitely resolved issue . From original 30.0.0 . But dont know about 29.x resolution. I am sure other friends here can help you. Best

@ralfi
Copy link

ralfi commented Oct 21, 2024

Yes, issue resolved with 30.0.1

@artonge
Copy link
Contributor

artonge commented Oct 23, 2024

Should be fixed in 29.0.9 and 28.0.12

@artonge artonge closed this as completed Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug Something isn't working high High priority regression Regression of a previous working feature
Projects
Status: 🎉 Done
Development

Successfully merging a pull request may close this issue.