camptocamp / c2cgeoportal

c2cgeoportal application
http://geomapfish.org
Other
64 stars 46 forks source link

Admin interface - ordering of elements does not work since 1.6 #1538

Closed gnerred closed 8 years ago

gnerred commented 9 years ago

image

rbovard commented 9 years ago

Confirmed here, it's quite annoying...

rbovard commented 9 years ago

@sbrunner Will it be fixed for 1.6.3?

ochriste commented 8 years ago

sadly there is a remaining problem with some columns, admin/LayergroupTreeitem > column "Group" :

mod_wsgi (pid=6860): Exception occurred processing WSGI script '/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/apache/application.wsgi'.
Traceback (most recent call last):
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/fanstatic/publisher.py", line 219, in __call__
    return self.app(environ, start_response)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/fanstatic/injector.py", line 54, in __call__
    response = request.get_response(self.app)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid/router.py", line 243, in __call__
    response = self.invoke_subrequest(request, use_tweens=True)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid/router.py", line 218, in invoke_subrequest
    response = handle_request(request)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween
    response = handler(request)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid_tm/__init__.py", line 94, in tm_tween
    reraise(*exc_info)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid_tm/__init__.py", line 75, in tm_tween
    response = handler(request)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid/router.py", line 164, in handle_request
    response = view_callable(context, request)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid/config/views.py", line 600, in __call__
    return view(context, request)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid/config/views.py", line 327, in attr_view
    return view(context, request)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid/config/views.py", line 303, in predicate_wrapper
    return view(context, request)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid/config/views.py", line 243, in _secured_view
    return view(context, request)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid/config/views.py", line 353, in rendered_view
    result = view(context, request)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid/config/views.py", line 495, in _class_view
    response = getattr(inst, attr)()
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid_formalchemy/actions.py", line 77, in wrapped
    return func(self, *args, **kwargs)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/pyramid_formalchemy/views.py", line 305, in listing
    page = self.get_page(**kwargs)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/fa/jquery/pyramid/__init__.py", line 72, in get_page
    collection = collection.order_by(getattr(sidx, sord)())
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/sqlalchemy/sql/operators.py", line 541, in desc
    return self.operate(desc_op)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 176, in operate
    return op(self.comparator, *other, **kwargs)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/sqlalchemy/sql/operators.py", line 779, in desc_op
    return a.desc()
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/sqlalchemy/sql/operators.py", line 541, in desc
    return self.operate(desc_op)
  File "/var/www/vhosts/morges-hosting-preprod/private/morges_geomapfish/.build/venv/lib/python2.7/site-packages/sqlalchemy/sql/operators.py", line 185, in operate
    raise NotImplementedError(str(op))
NotImplementedError: <function desc_op at 0x7f5650e347d0>
ochriste commented 8 years ago

same on column "Item" (also in LayergroupTreeitem)

ochriste commented 8 years ago

RestrictionArea > Role column as well

ochriste commented 8 years ago

the fa.jquery update fixed the error, but the sorting is still not good in some case: LayergroupTreeitem > Item

ochriste commented 8 years ago

not possible with the current admin code system

rbovard commented 8 years ago

So it's a regression...

ochriste commented 8 years ago

no, the fixes sbrunner has done will correct the problem you noticed. these will be in the next release.

the unfixable situation is related to join queries and this problem has always existed. for example in 1.5.x, clic on the "children" column in the LayerGroup table, you will see it does nothing.

rbovard commented 8 years ago

Ah ok, thanks for the explanation!