Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • 12:26
    smotornyuk closed #4990
  • 12:25
    smotornyuk commented #4990
  • 10:36

    amercader on dev-v2.8

    Revert "[#6006] Fix auth error … [#6006] Better fix (compare)

  • 10:35

    amercader on dev-v2.7

    Revert "[#6006] Fix auth error … [#6006] Better fix (compare)

  • 10:35

    amercader on dev-v2.9

    [#6006] Remove redundant redire… Sanitize user image url, add he… (compare)

  • 09:48
    amercader synchronize #6076
  • 09:48

    amercader on 6006-auht-err-when-deleting-group

    [#6006] Remove redundant redire… (compare)

  • 09:23
    Gauravp-NEC synchronize #6081
  • 09:02
    Gauravp-NEC commented #5690
  • 09:01
    Gauravp-NEC commented #5690
  • 08:56
    Gauravp-NEC opened #6081
  • 08:33
    Sunny-NEC commented #5888
  • 08:11
    mbocevski commented #228
  • 06:21
    Gauravp-NEC commented #6037
  • 06:19
    Gauravp-NEC commented #6037
  • 05:48
    ThrawnCA commented #5717
  • 05:06
    Zharktas closed #6073
  • 05:06
    Zharktas commented #6073
  • May 10 21:55
    GitYepper edited #6078
  • May 10 21:54
    GitYepper edited #6078
ckan is last
not first
Jari Voutilainen
ckan template should be last as you are over riding blocks from it
if it is first, your templates would not load at all
mine is the second to last
right before kcan itself

the issue states:

Inspecting the config['computed_template_paths'] you could tell that the templates from plugin1 always were loaded first than the plugin2, regardless of the order of the plugins in the ini file.

Jari Voutilainen
but my guess is that as ckan loads main.css via webassets, the resulting html is not where you assume it to be
i can try using web assets myself?
but why would it be that
if themA has not the issue, but themeB has the issue?
they literally only named differently atm(forking them to make a new theme atm)
maybe not?
Jari Voutilainen
your example uses super() which then uses webassets from core, the other example just adds the link tag directly which then does not use webassets
both examples are the same theme
the other theme uses
{% block styles %}
  {{ super() }}

  <link rel="stylesheet" href="/rvr.css" />

{% endblock %}
Jari Voutilainen
if you have two plugins which both override styles block, then the bug might have an effect
how if only one is loaded?
i change the ckan ini everytime is switch between them
Jari Voutilainen
if you only have one, which overrides only the ckan core template, then it should affect
sorry i think i start to confuse you
so i have 2 exactly same themes outside different namings
if i put pluginA in the ckan.ini
the css is above ckan's
if i instead put plugin B in the ckan.ini the css is below ckans
NOT both plugins at the same time
Jari Voutilainen
if you add any html tag before super(), it probably renders it there where you assume it to render, ckan css is still somewhere else in html due to webassets
but it does not do that with pluginB?
Jari Voutilainen
the fix for that is to use webassets yourself :)
or use custom_styles block https://github.com/ckan/ckan/blob/2.9/ckan/templates/base.html#L82 which is later than styles block
asset doesnt work at all
toolkit.add_resource('public', 'ka')

{% block styles %}
{{ super() }}
{% asset 'ka/ka.css' %}

{% endblock %}

adding to custom_styles does work, atleast atm
lets see if i can figure out what changed in 2.9 since theres no documentation for migrations afaik? the changelog only mentions
All the static CSS/JS files must be bundled via a webassets.yml file, as opposed to the previously used, optional resource.config file. Check the Assets documentation for more details. (#4614)
we havent used resource.config , just the public directory directive

It is important to note that these assets will be added to the page as defined by the assets configuration, not in the location of the {% asset %} tag. Duplicate assets will not be added and any dependencies will be included as well as the assets, all in the correct order (see below for details).


especially that assets can move freely in the whole jinja block and not just above any other directive
And likely if I would be using assets ckan would still be on top since the order isn't guaranteed
1 reply
*in wrong order not on tolb
Is it safe to delete users from the ckan backend PostgreSQL DB table user if their status is state=deleted?
3 replies
how do i recreate the jobs table of the datapusher?
i cant even find a line mentioning the sqlite file in the github D:
Exception on /job/52ac3647-4930-4b0f-b837-3d597d2df456 [GET]
Traceback (most recent call last):
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanserviceprovider/web.py", line 442, in job_status
    job_dict = db.get_job(job_id, limit=limit)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanserviceprovider/db.py", line 158, in get_job
    JOBS_TABLE.select().where(JOBS_TABLE.c.job_id == job_id)).first()
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2235, in execute
    return connection.execute(statement, *multiparams, **params)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
    return meth(self, multiparams, params)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1130, in _execute_clauseelement
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context
    e, statement, parameters, cursor, context
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1511, in _handle_dbapi_exception
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
    cursor, statement, parameters, context
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) no such table: jobs
[SQL: SELECT jobs.job_id, jobs.job_type, jobs.status, jobs.data, jobs.error, jobs.requested_timestamp, jobs.finished_timestamp, jobs.sent_data, jobs.result_url, jobs.api_key, jobs.job_key
FROM jobs
WHERE jobs.job_id = ?]
[parameters: ('52ac3647-4930-4b0f-b837-3d597d2df456',)]
(Background on this error at: http://sqlalche.me/e/13/e3q8)