I'm trying to follow the example reported here: Ckan theming - Javascript in order to understand how I can add some javascript to my pages. Unfortunately, I can't make the example work. I have a theme called theme, and I'd like to modify that one. So in my ckanext-theme/ckanext/theme/fanstatic/ folder, I add the theme_popover.js file, as per the example (I changed all the file names accordingly). I also put in ckanext-theme/ckanext/theme/templates/snippets/ the package_item.html defined as shown in the example (and changed to match the file names I got).
When I reload my /dataset/ page, all I got is an "internal server error". I searched the logs for further explanation, and here the error I got in my ckan_default.error.log file:
Blockquote [Tue May 30 10:43:17.351659 2017] [wsgi:error] [pid 24241:tid 140295054444288] [remote 172.17.0.1:31237] Error - : invalid literal for int() with base 10: '' [Tue May 30 10:43:17.545679 2017] [wsgi:error] [pid 24241:tid 140295054444288] [remote 172.17.0.1:31237] URL: http://localhost:10080/dataset
I can't quite grasp what it means and what should I fix to make it work. Can somebody help me? Thanks a lot!
Actually, it was my fault. I had not added the toolkit.add_resource('fanstatic', 'theme') line to my plugin file. I added that and everything works fine now!