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

Error on layer replace #7392

Closed
giohappy opened this issue Apr 26, 2021 · 1 comment
Closed

Error on layer replace #7392

giohappy opened this issue Apr 26, 2021 · 1 comment
Assignees
Labels
backport 3.2.x PR should be backported to target version regression Issues related to regressions.
Milestone

Comments

@giohappy
Copy link
Contributor

giohappy commented Apr 26, 2021

When a layer is replaced GeoNode returns the following error:

Some error occurred while trying to access the uploaded schema: Please ensure the name is consistent with the file you are trying to replace.
Traceback (most recent call last):
  File "/usr/src/geonode/geonode/layers/utils.py", line 1131, in validate_input_source
    raise Exception(
Exception: Please ensure the name is consistent with the file you are trying to replace.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/geonode/geonode/layers/views.py", line 1338, in layer_replace
    saved_layer = file_upload(
  File "/usr/local/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "/usr/src/geonode/geonode/layers/utils.py", line 462, in file_upload
    validate_input_source(layer, filename, files, gtype, action_type='replace')
  File "/usr/src/geonode/geonode/layers/utils.py", line 1164, in validate_input_source
    raise Exception(
Exception: Some error occurred while trying to access the uploaded schema: Please ensure the name is consistent with the file you are trying to replace.
Bad Request: /layers/geonode:Reg01012019_g_WGS847/replace

This log comes from master demo. It can be replicated on any layer.

@giohappy giohappy added regression Issues related to regressions. backport 3.2.x PR should be backported to target version labels Apr 26, 2021
@giohappy giohappy changed the title Geoserver error on layer replace Error on layer replace Apr 26, 2021
mattiagiupponi added a commit to mattiagiupponi/geonode that referenced this issue Apr 27, 2021
mattiagiupponi added a commit to mattiagiupponi/geonode that referenced this issue Apr 27, 2021
@mattiagiupponi
Copy link
Contributor

PR for fix the issue are opened,
master: #7395
backport: #7396
Friendly reminder that the name of the layer should match the name of the uploaded files
immagine

@afabiani afabiani added this to the 3.2 milestone Apr 27, 2021
afabiani pushed a commit that referenced this issue Apr 29, 2021
* [Backport Resolves #7392] Fix upload/replace/append layer

* [Backport #7377] Thesauri in metadata details

* [Backport #7377] Fix flake8 formatting
afabiani pushed a commit that referenced this issue May 4, 2021
#7468)

* [Backport Resolves #7392] Fix upload/replace/append layer

* [Relates to #7435] Include UUID handling in set_all_layer_metadata
afabiani pushed a commit that referenced this issue May 4, 2021
* [Backport Resolves #7392] Fix upload/replace/append layer

* [Backport Fixes #7440] Migration for setting resource_type

* [Backport Fixes #7440] Add exception handling with log
afabiani pushed a commit that referenced this issue May 5, 2021
…7454)

* [Backport Resolves #7392] Fix upload/replace/append layer

* [Backport Fixes #7441] Handle configuration for CSW pre-filtering

* - Adding "geonode.catalogue.backends.tests" to CircleCI

Co-authored-by: afabiani <[email protected]>
afabiani pushed a commit that referenced this issue May 5, 2021
* [Backport Resolves #7392] Fix upload/replace/append layer

* [Fixes #7429] Null references in thesauri items

* [Fixes #7429] Fix tests due the changes to the initial test json
afabiani pushed a commit that referenced this issue May 5, 2021
#7479)

* [Backport Resolves #7392] Fix upload/replace/append layer

* [Fixes #7477] Sorting dropdown is blank for Group Categories
afabiani pushed a commit that referenced this issue May 26, 2021
…emote Service" (#7602)

* [Backport Resolves #7392] Fix upload/replace/append layer

* [Fixes #7600] Replace "Register a new Service" with "Add Remote Service"
afabiani pushed a commit that referenced this issue Jun 3, 2021
… the thesauri (#7622)

* [Backport Resolves #7392] Fix upload/replace/append layer

* [Resolves #7619] Align geostory and fix issue with the thesauri

* [Resolves #7619] Align geostory and fix issue with the thesauri
afabiani pushed a commit that referenced this issue Jun 10, 2021
…s broken (#7643)

* [Backport Resolves #7392] Fix upload/replace/append layer

* [Backport][Fixes #7638] thumbnail widget inside the metadata wizard is broken
afabiani pushed a commit that referenced this issue Jun 11, 2021
…doesn't return all favorites item (#7646)

* [Backport Resolves #7392] Fix upload/replace/append layer

* [Fixes #7644] resources endpoint doesn't return all favorites item
afabiani pushed a commit that referenced this issue Jun 21, 2021
* [Backport Resolves #7392] Fix upload/replace/append layer

* [Fixes #7676] Search by thesauri items fails
afabiani pushed a commit that referenced this issue Jun 21, 2021
* [Backport Resolves #7392] Fix upload/replace/append layer

* [Fixes #7679] Abstract not truncated in resource list
afabiani pushed a commit that referenced this issue Jun 23, 2021
* [Backport Resolves #7392] Fix upload/replace/append layer

* [Backport][Fixes #7692] Layers caching problem

* [Backport][Fixes #7692] Layers caching problem
afabiani pushed a commit that referenced this issue Jul 6, 2021
* [Backport Resolves #7392] Fix upload/replace/append layer

* [Fixes #7718] Permissions assignments on Remote Services

* [Fixes #7718] Permissions assignments on Remote Services

* [Fixes #7718] Permissions assignments on Remote Services

* [Fixes #7718] Permissions assignments on Remote Services

* [Fixes #7718] Pep8 issues fixed

* [Fixes #7718] Permissions assignments on Remote Services

* [Fixes #7718] remove unused imports

* [Fixes #7718] Fix broken migrations

* [CircelCI] Tests fix

* [Fixes #7718] db startup error

* [Fixes #7718] Fix impovements from ISSUE

* Update views.py

* Update service_detail.html

* [Fixes #7718] Fix count layers on services list, now is based on visible resources

Co-authored-by: afabiani <[email protected]>
afabiani pushed a commit that referenced this issue Jul 6, 2021
* [Backport Resolves #7392] Fix upload/replace/append layer

* [Fixes #7718] Permissions assignments on Remote Services

* [Fixes #7718] Permissions assignments on Remote Services

* [Fixes #7718] Permissions assignments on Remote Services

* [Fixes #7718] Permissions assignments on Remote Services

* [Fixes #7718] Pep8 issues fixed

* [Fixes #7718] Permissions assignments on Remote Services

* [Fixes #7718] remove unused imports

* [Fixes #7718] Fix broken migrations

* [CircelCI] Tests fix

* [Fixes #7718] db startup error

* [Fixes #7718] Fix impovements from ISSUE

* Update views.py

* Update service_detail.html

* [Fixes #7718] Fix count layers on services list, now is based on visible resources

Co-authored-by: afabiani <[email protected]>
(cherry picked from commit 0c71f23)
afabiani pushed a commit that referenced this issue Jul 14, 2021
…2 endpoint #7791 (#7797)

* [Backport Resolves #7392] Fix upload/replace/append layer

* [Fixes #7787] Replace layer_thumbnail method with new API v2 endpoint
afabiani pushed a commit that referenced this issue Jul 14, 2021
* [Backport Resolves #7392] Fix upload/replace/append layer

* [Fixes #7740] Fix reverse urls

Fix reverse urls for get_url_for_app_model and get_url_for_model methods

* Remove unused import

* Fix flake8 formatting

* [Fixes #7740] Reverse url fix for tests

* [Fixes #7801] Fix broken tests for 3.2.x build

* [Fixes #7801] Fix flake8 error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 3.2.x PR should be backported to target version regression Issues related to regressions.
Projects
None yet
Development

No branches or pull requests

3 participants