New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mezzanine 4.1 + autocomplete 2.3 + filer 1.1 #736
Comments
Hi, I've some improvements about this issue :
So I'm still stuck. Has anybody the same issue ? How can I fix it ? Thanks ! |
I personally have no experience with mezzanine. But I suspect this will be a problem with any other widget on the same admin form that uses jQuery. @Flight do you know more? |
@frague59 would be cool if you could confirm if our latest changes fix the issue. :-) |
Hi,
I have the same issue. Could I help you ? How ? |
... I've tryed with the development branch of django-filer, and it seems to work for me : I can see the left menu and the autocomplete widget. I had to re-import jQuery to load autocomplete, but it works now ! The filer itself does not work at all, with no JS error. The widget displays the loaded (previously) image and a text field containing an ID. Thanks for your help and excuse me for my slow responses. Bye ! |
@frague59 thanks for testing. |
hi, It worked with django-filer==1.1.1, the widget was showed, autocomplete worked too but the left menu were not displayed. The problem comes from filer loading jquery (1.11.3) unconditionally, overriding the site-level one. Thanks ! |
I have the same error. I am not using mezzanine, but only autocomplete_light. My widgets show up perfectly fine, but I get the same JS error, and I to can trace it back to filer loading it's own version of jquery. From what I have found the problem is with autocomplete light v2, which is no longer supported, where the JS jQuery is not scoped and therefor the yourlabsWidget function of jQuery does not exist on the loaded jQuery because filer override the jQuery object after the autocomplete light is initialized. In my opinion the problem is with the code of autocomplete_light, but things like this only arises because filer as decided to load its own version of jQuery, which is, by my opinion a big design flaw, and will lead to more problems like this in the future. |
@frague59 My fix for now is to simple provide an empty file replacing the filer/js/libs/jquery.min.js, and all works just fine. |
ok. I wonder if we can just piggy-back on the jQuery provided by django admin? Usually @lory87 would tackle this kind of problem. But she is currently tied up in project work. It would be really awesome if someone could put together a pull-request. :-) |
@stefanfoulis I don't have enough insight in the filer JS code to conclude that the django admin privided jQuery 1.11.2 is sufficient, but one solution I can think of is to map the django-filer provided jQuery to a custom variable instead of the standard $-variable, by using the noconflict method, like django.admin does with the django.jQuery variable. I will try to find to time to test this and if it works provide a pull-request, though I still think that the best solution would be to be using the django.jQuery, also to follow the Django guidelines of DRY programming which the current solution is in a bit of a conflict with. ;) |
@stefanfoulis @jokerejoker @frague59 working on this issue. |
@jokerejoker @frague59 I did some fixes and merged them to develop branch. Can you tell me please if this change fixes the issue? |
I'm also trying to integrate filer with mezzanine, since I use django-widgy which uses filer too. |
@gradel We could determine the problem and are working on it. Thanks for your feedback. We will let you know when we merged changes to develop branch. /cc @stefanfoulis |
@gradel Issue is fixed and changes are merged to develop branch. Release is coming soon. Thank you for your feedback. |
Had a first look and you find me deeply impressed :) |
@gradel Do you have any experience or do you know if mezzanine doesn't look on get parameters? Because search doesn't work there But parameter is correct. |
@lory87 Seems to work here, so I can't reproduce the issue so far: |
@gradel Thanks for your feedback. Maybe I missed something in config. |
Hi,
I'm facing a jQuery hell with mezzanine + autocomplete-light.
The constatations :
TypeError: $ is undefined
If I load a jQ before the autocomplete_light/static.html I have another error :
TypeError: $(...).yourlabsWidget is not a function
I've tracked the jQ versions used, and autocomplete is loaded in a version on jQ, but launched (through $(document).ready()) through the filer version of jQ, the one from filer.
I've tried to noConflict the jQ before autocomplete loadings, but for none..
Could you help me with this issue ? Thanks for your help !
How can I
The text was updated successfully, but these errors were encountered: