Skip to content

Support for Nextcloud 34 and 35 (resolves #125, resolves #126) - #129

Draft
martin-rueegg wants to merge 2 commits into
gino0631:masterfrom
metaworx:nextcloud-35
Draft

martin-rueegg wants to merge 2 commits into
gino0631:masterfrom
metaworx:nextcloud-35

Conversation

@martin-rueegg

@martin-rueegg martin-rueegg commented Sep 28, 2026 •

Copy link
Copy Markdown

Fixes the metadata tab on Nextcloud 34, which no longer provides jQuery ($ is not defined, #125), and adds Nextcloud 35.

This builds on #127 and includes its commit unchanged, so the two can be merged in either order: #127 first and then this, or this alone.

Changes on top of #127

  • src/tabview.js no longer uses jQuery. The table is built with the DOM API, the OpenStreetMap view opens in a native <dialog> (Escape, close button or a click outside closes it), and imagePath comes from @nextcloud/router instead of OC.imagePath.
  • The app's own route uses @nextcloud/axios, which adds the request token and refreshes it on a CSRF failure. The Nominatim calls keep the plain axios from Replace jQuery ajax calls with axios #127, so the token is not sent to a third-party host.
  • The CSP for Nominatim and OpenStreetMap is added through AddContentSecurityPolicyEvent instead of the deprecated IContentSecurityPolicyManager::addDefaultPolicy() via \OC::$server->query(). As before, it is added only for requests that load the sidebar.
  • max-version 35, a stable35 Travis job, and the CHANGELOG.

The Vue migration mentioned in #126 can still follow separately. This keeps the change small so that 34 and 35 work now.

Testing

Tested in Chromium on Nextcloud 33.0.8, 34.0.3 and 35.0.1:

  • the metadata table for JPEG and PNG files; metadata values are inserted as text
  • reverse lookup from GPS coordinates, and search lookup from XMP city/country
  • the map dialog: it opens modal and centered, and Escape, the close button and a click outside close it. Escape closes only the dialog, not the Files sidebar.
  • Nominatim requests carry no requesttoken header
  • the CSP additions are present on the Files page and absent elsewhere
  • no console errors from the app

With the current master build on 34, the tab stays at "Reading metadata …".

A test for the sidebar tab?

@gino0631 Travis stayed green while the tab was broken on 34, because nothing tests the frontend. We'd be happy to add a browser test of the sidebar tab in a separate PR (or as a separate commit on top of this), either in Travis or as a GitHub Action, whichever you prefer. Would that be welcome? The standalone Playwright script used for the testing above is in this gist.

🤖 Generated with Claude Code

LePiegro and others added 2 commits July 22, 2026 14:25
Swap the three $.ajax() calls (metadata fetch, Nominatim reverse
geocode, Nominatim search) for axios requests.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…0631#126)

Nextcloud 34 no longer provides jQuery. Building on gino0631#127, which replaced
the $.ajax calls, the metadata table is now built with the DOM API, the
map opens in a native <dialog>, and imagePath comes from
@nextcloud/router. The app's own route uses @nextcloud/axios; the
Nominatim calls keep plain axios, so the request token is not sent to a
third-party host.

The CSP additions for Nominatim and OpenStreetMap are added through
AddContentSecurityPolicyEvent instead of the deprecated
addDefaultPolicy(), still only for requests that load the sidebar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

2 participants