Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 13:59

    amercader on master

    resource page source: show tran… Don't use c Merge pull request #6077 from c… (compare)

  • 13:59

    amercader on resource-source-translated-title

    (compare)

  • 13:59
    amercader closed #6077
  • 13:28
    amercader assigned #6070
  • 13:28
    amercader unlabeled #6070
  • 13:15
    amercader assigned #6074
  • 13:14
    amercader locked #6078
  • 13:14
    amercader closed #6078
  • 13:10
    amercader assigned #6077
  • 13:10
    amercader assigned #6048
  • 13:06
    amercader unlabeled #6048
  • 13:06

    amercader on resource-source-translated-title

    Don't use c (compare)

  • 13:06
    amercader synchronize #6077
  • 13:04
    amercader assigned #6081
  • 13:04
    amercader assigned #6076
  • 12:57
    amercader assigned #6082
  • 12:57
    amercader opened #6082
  • 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)

gallexme
@gallexme
YUP its that issue
Jari Voutilainen
@Zharktas
main.css is loaded with asset tag https://github.com/ckan/ckan/blob/2.9/ckan/templates/base.html#L72, which probably moves it later in the html
gallexme
@gallexme
computed_template_paths
[u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/stats/templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/textview/theme/templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/imageview/theme/templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/webpageview/theme/templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/reclineview/theme/templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/datastore/templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/geoview/templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/pdfview/theme/templates',
u'/usr/lib/ckan/default/src/ckanext-pages/ckanext/pages/plugin/../theme/templates_main',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/showcase/plugin/../templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/harvest/templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/citehelp/templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/ka_weather_harvester/templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/extractor/templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/discovery/plugins/search_suggestions/templates',
u'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckanext/discovery/plugins/similar_datasets/templates',
u'/usr/lib/ckan/default/src/ckanext-ka-theme/ckanext/ka/templates',
'/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckan/templates']
ckan is last
not first
Jari Voutilainen
@Zharktas
ckan template should be last as you are over riding blocks from it
if it is first, your templates would not load at all
gallexme
@gallexme
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
@Zharktas
but my guess is that as ckan loads main.css via webassets, the resulting html is not where you assume it to be
gallexme
@gallexme
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)
hmm
maybe not?
Jari Voutilainen
@Zharktas
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
gallexme
@gallexme
both examples are the same theme
the other theme uses
{% block styles %}
  {{ super() }}


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

{% endblock %}
Jari Voutilainen
@Zharktas
if you have two plugins which both override styles block, then the bug might have an effect
gallexme
@gallexme
how if only one is loaded?
i change the ckan ini everytime is switch between them
Jari Voutilainen
@Zharktas
if you only have one, which overrides only the ckan core template, then it should affect
gallexme
@gallexme
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
@Zharktas
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
gallexme
@gallexme
but it does not do that with pluginB?
Jari Voutilainen
@Zharktas
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
gallexme
@gallexme
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
gallexme
@gallexme
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).

interesting

especially that assets can move freely in the whole jinja block and not just above any other directive
gallexme
@gallexme
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
reedv
@reedv
Is it safe to delete users from the ckan backend PostgreSQL DB table user if their status is state=deleted?
3 replies
gallexme
@gallexme
how do i recreate the jobs table of the datapusher?