Closed cjhendrix closed 10 years ago
@teodorescuserban from Marianne: it looks like select2.min.js being bundled is the OLD one not the new one. Ask Serban about this. We had this issue once before but I can't remember how we fixed it :/
Solved for now. For our reference:
Solution was: remove min.js file & restart ckan.
Serban, Please provide a solution for our local instances of ckan. Tnx On Jul 4, 2014 3:03 PM, "Serban Teodorescu" notifications@github.com wrote:
Solved for now. For our reference:
- paster refuses to issue ckan-related commands unless you type python setup.py install inside /opt/ckan/hdx-ckan
- when installing, the ckan resources used are also spilled into /opt/ckan/lib/python2.7/site-packages/ckan-2.2-py2.7.egg/
- this issue appeared because the min.js file actually used is to be found in /opt/ckan/lib/python2.7/site-packages/ckan-2.2-py2.7.egg/ckan/public/base/vendor/select2
Solution was: remove min.js file & restart ckan.
— Reply to this email directly or view it on GitHub https://github.com/OCHA-DAP/hdx-ckan/issues/661#issuecomment-48035704.
remove the default select.min.js and the new one will be regenerated.
the difference between your local instances and the ckan instances on dev stag and prod is that you probably were running python setup.py develop for ckan, hence all resources are in src/ckan folder
@teodorescuserban @mbellotti @cjhendrix reopening this issue because on Staging I can not make it work I tried this one: http://test-data.hdx.rwlabs.org/dataset/new?group=0974463c-5419-4e89-9b55-90e035074ccf and I can not see the tags. please advice
the select2.min.js is from July 4th.
@mbellotti - any input on this one?
Really fixed. On both stag and dev. @danmihaila : Please check (give it a few seconds - autcomplete looks a bit slow) Closing.
I can not make it work on stag or dev. reopening... pingin @mbellotti @teodorescuserban @cjhendrix
@mbellotti : after digging a bit more on what and where: it looks like if I start gunicorn or paster as root, the autocomplete works (even without select2.min.js - it works with the original one - select2.js); if I start it as usual (as a normal user), although the js is loading, the autocomplete is not working. By not working I mean the browser does not call /api/2/util/tag/autocomplete?incomplete=xxx. I tried to access /api/2/util/tag/autocomplete?incomplete=tan manually from another window and it returns the response ok. Also, all resources requested are being loaded (only http 200 on the page).
I have no idea why it would matter what user starts gunicorn (more over, actually gunicorn starts as root but drops privileges afterwards).
Please try to debug that script. As long as all resources are loaded successfully, the script should make a call home for autocomplete - it's only up to the browser.
Btw may I suggest a blunt alternate solution for the autocomplete? What if we are loading up all tags alongside the "new" page? The tags would be loaded using async ajax call on $(document).ready so it wont impact page load times. This way, the autocomplete would be much faster and I'm pretty sure it would solve our initial issue as well.
fixed and closed. tested on dev and stag.