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

Open
RyoKub opened this issue Apr 30, 2024 · 14 comments
Open

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

RyoKub opened this issue Apr 30, 2024 · 14 comments
Assignees
Labels
1. to develop Accepted and waiting to be taken care of 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working high High priority regression Regression of a previous working feature
Projects
Status: 👓 Design review
Development

No branches or pull requests