Skip to content

Fix photosphere viewer not loading in NC33+#176

Merged
R0Wi merged 8 commits into
masterfrom
copilot/fix-viewer-loading-issue
May 26, 2026
Merged

Fix photosphere viewer not loading in NC33+#176
R0Wi merged 8 commits into
masterfrom
copilot/fix-viewer-loading-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 29, 2026

  • Fix XmpResultModel::xmlSerialize() to write a JSON string as text content instead of XML sub-elements
  • Update fileAction.js _getDavXmpMeta() to JSON.parse the property value
  • Fix enabled check in fileAction.js to accept both boolean true and integer 1 for usePanoramaViewer
  • Update XmpResultModelTest::testXmlSerialize() to expect JSON string output
  • Fix PageControllerTest: update constructor call to match new PageController(IURLGenerator, IAppManager, ContentSecurityPolicyNonceManager) signature (NC34 removed $appName/$request from controller constructor); remove stale unsafe-eval CSP assertion
  • Fix PhotosphereViewerPluginTest: replace new File(...) / new Directory(...) with createMock() to avoid NC34 constructor throwing RuntimeException when view's getRelativePath() returns null; fix getId() return type from string to int (?int in NC34)

Copilot AI linked an issue Apr 29, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix viewer loading for properly tagged images in NC33 Fix photosphere viewer not loading in NC33+ Apr 29, 2026
Copilot AI requested a review from R0Wi April 29, 2026 19:02
Copilot finished work on behalf of R0Wi April 29, 2026 19:02
@R0Wi
Copy link
Copy Markdown
Member

R0Wi commented Apr 29, 2026

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 29, 2026

@copilot Fix failing unit tests

https://github.com/nextcloud/files_photospheres/actions/runs/25134833689/job/73670375329

Fixed in commit 4612e79. Two categories of failures:

  1. PageControllerTest (3 errors): PageController.__construct() changed in NC34 — removed the $appName/$request parameters from the base Controller class; now takes (IURLGenerator, IAppManager, ContentSecurityPolicyNonceManager). Updated the test setup accordingly and removed the stale unsafe-eval CSP assertion.

  2. PhotosphereViewerPluginTest (6 errors):

    • new File(...) / new Directory(...) throw RuntimeException: Failed to get relative path for in NC34 because Node::__construct() now validates $view->getRelativePath() returns non-null. Replaced with $this->createMock(File::class) / createMock(Directory::class) and mock the relevant methods directly.
    • Node::getId() return type changed to ?int — changed ->willReturn('42')->willReturn(42).

Copilot finished work on behalf of R0Wi April 29, 2026 21:51
@alirezamirsepassi
Copy link
Copy Markdown

@R0Wi is there a chance this fix can be released soon?

Copilot AI and others added 8 commits May 26, 2026 19:51
* Fix PHP controller interfaces
* Remove CSP for JS eval
* JS lib for modal
* Update nextcloud/files and adjust registering / callback code for frontend event handler accordingly
@R0Wi R0Wi force-pushed the copilot/fix-viewer-loading-issue branch from 368d30f to c645894 Compare May 26, 2026 19:51
@R0Wi R0Wi marked this pull request as ready for review May 26, 2026 19:56
@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@R0Wi R0Wi merged commit daf9cd0 into master May 26, 2026
16 checks passed
@R0Wi R0Wi deleted the copilot/fix-viewer-loading-issue branch May 26, 2026 19:58
R0Wi added a commit that referenced this pull request May 26, 2026
* Initial plan

* Fix XMP metadata serialization for NC33 WebDAV client compatibility

Agent-Logs-Url: https://github.com/nextcloud/files_photospheres/sessions/ddda8754-90c3-44ca-97c8-9703fbac9f52



* fix: XmpDataReader Test signature

* fix: Remove jQuery

* fix: NC34 compat

* Fix PHP controller interfaces
* Remove CSP for JS eval
* JS lib for modal
* Update nextcloud/files and adjust registering / callback code for frontend event handler accordingly

* Fix unit tests for NC34 API compatibility

Agent-Logs-Url: https://github.com/nextcloud/files_photospheres/sessions/d1f3fb6c-898e-47eb-8812-29e6a650a22c



* Apply php-cs-fixer changes

* fix: update filesAction.js.map

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>
Co-authored-by: Copilot <Copilot@users.noreply.github.com>
R0Wi added a commit that referenced this pull request May 26, 2026
* Initial plan

* Fix XMP metadata serialization for NC33 WebDAV client compatibility

Agent-Logs-Url: https://github.com/nextcloud/files_photospheres/sessions/ddda8754-90c3-44ca-97c8-9703fbac9f52

Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>

* fix: XmpDataReader Test signature

* fix: Remove jQuery

* fix: NC34 compat

* Fix PHP controller interfaces
* Remove CSP for JS eval
* JS lib for modal
* Update nextcloud/files and adjust registering / callback code for frontend event handler accordingly

* Fix unit tests for NC34 API compatibility

Agent-Logs-Url: https://github.com/nextcloud/files_photospheres/sessions/d1f3fb6c-898e-47eb-8812-29e6a650a22c

Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>

* Apply php-cs-fixer changes

* fix: update filesAction.js.map

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>
Co-authored-by: Robin Windey <ro.windey@gmail.com>
Co-authored-by: Copilot <Copilot@users.noreply.github.com>
R0Wi added a commit that referenced this pull request May 26, 2026
* Master is now NC34

- Update phpunit.yml server-versions to stable34
- Update coverage.yml server-versions to stable34
- Update playwright.yml NC_REF to stable34
- Add "This version is tested for Nextcloud 34." to README.md

Agent-Logs-Url: https://github.com/nextcloud/files_photospheres/sessions/eafc5dcb-3f85-4385-bae0-ec5b17672e7d

Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>

* Fix photosphere viewer not loading in NC33+ (#176)

* Initial plan

* Fix XMP metadata serialization for NC33 WebDAV client compatibility

Agent-Logs-Url: https://github.com/nextcloud/files_photospheres/sessions/ddda8754-90c3-44ca-97c8-9703fbac9f52

Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>

* fix: XmpDataReader Test signature

* fix: Remove jQuery

* fix: NC34 compat

* Fix PHP controller interfaces
* Remove CSP for JS eval
* JS lib for modal
* Update nextcloud/files and adjust registering / callback code for frontend event handler accordingly

* Fix unit tests for NC34 API compatibility

Agent-Logs-Url: https://github.com/nextcloud/files_photospheres/sessions/d1f3fb6c-898e-47eb-8812-29e6a650a22c

Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>

* Apply php-cs-fixer changes

* fix: update filesAction.js.map

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>
Co-authored-by: Robin Windey <ro.windey@gmail.com>
Co-authored-by: Copilot <Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>
Co-authored-by: Robin Windey <ro.windey@gmail.com>
Co-authored-by: Copilot <Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The viewer does not load for any properly tagged image in NC33

3 participants