Skip to content

Potree extension routes not working after CKAN 2.9 to 2.11 migration #106

@mosoriob

Description

@mosoriob

Problem Description

The Potree extension routes defined in src/ckanext-potree/ckanext/potree/views.py are not working after migrating from CKAN 2.9 to 2.11.

Affected Routes

The following Flask blueprint routes are not functioning:

  • @blueprint.route('/dataset/potree/<resource_id>') - Main scene viewer
  • @blueprint.route('/dataset/potree/<resource_id>/edit', methods=['GET', 'POST']) - Scene editor
  • @blueprint.route('/dataset/potree/<resource_id>/save', methods=['POST']) - Save scene data

Technical Details

Current Implementation

  • Plugin implements IBlueprint interface in plugin.py:8
  • Blueprint registration via get_blueprint() method returns views.get_blueprints()
  • Routes are defined using Flask Blueprint pattern in views.py:16, views.py:65, views.py:131

Migration Context

  • Migrating from CKAN 2.9 to 2.11
  • Other extensions and core CKAN functionality appears to be working
  • Issue is specific to custom blueprint routes

Potential Causes

  1. Blueprint Registration Changes: CKAN 2.11 may have changed how blueprints are registered or discovered
  2. Flask/Werkzeug Version: Updated Flask/Werkzeug versions in CKAN 2.11 may require route pattern changes
  3. URL Generation: The toolkit.url_for('potree.scene_viewer', resource_id=resource['id']) call in plugin.py:60 may need updating
  4. Plugin Loading Order: Blueprint registration timing may have changed

Expected Behavior

Routes should be accessible and functional as they were in CKAN 2.9.

Investigation Needed

  • Verify blueprint is being registered correctly in CKAN 2.11
  • Check if Flask Blueprint syntax needs updates for newer Flask version
  • Confirm URL routing patterns are compatible with CKAN 2.11
  • Test if plugin loading order affects blueprint registration
  • Review CKAN 2.11 migration documentation for blueprint-related changes

Related Files

  • src/ckanext-potree/ckanext/potree/plugin.py - Plugin definition and blueprint registration
  • src/ckanext-potree/ckanext/potree/views.py - Route definitions and handlers
  • src/ckanext-potree/ckanext/potree/helpers.py - Helper functions

Environment

  • CKAN version: 2.11 (migrating from 2.9)
  • Branch: 102-migrate-ckan-from-29-to-211

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions