Comments (20)
One would have thought that the DAJAXICE_DEBUG setting looks promising, though it doesn't really hold for its description. To achieve such an effect, and thus to find out more information on what's going under the hood, you need to put logging.basicConfig(level=logging.DEBUG)
(or even the ERROR level should suffice for those "Something goes wrong" alerts) in somewhere, your settings file, say.
from django-dajaxice.
@andrejtokarcik Thanks for the response :D
@johngilbrough Have you found the error?
from django-dajaxice.
@jorgebastida Up until now I have simply commented out the //alert('Something goes wrong:', data); in dajaxice.core.js, after finding that data always contains nothing. Everything is still working.
How can I change the logging for just djajaxice to find out what causing these errors?
from django-dajaxice.
Now I know what "Close" means :)
from django-dajaxice.
I'm having the same problem. I'm getting a 403 error when POSTing to the URL for my function
POST /dajaxice/MySite.myexample/ HTTP/1.1 403
from django-dajaxice.
Whoa, strangely, insanely, it works from Chromium but not Firefox.
from django-dajaxice.
Okay, looking in to it farther it has to do with the fact that Chromium is sending an X-CSRFToken in its header, and Firefox is not. The error firefox is getting back has to do with lack of CSRF validation. This is likely because I have authentication enabled on my site but not set up entirely properly.
from django-dajaxice.
I am having a similar problem. Have you found a solution yet? This page works fine for me in Chromium, but I get the error in FF6 when you make a selection. http://www.dajaxproject.com/forms/
from django-dajaxice.
My solution was to dump Ajaxice. That wasn't my first choice, but after playing around for a while the problem appeared to be something that I couldn't easily fix, and since I wasn't using ajaxice much, it was easy to take out.
from django-dajaxice.
@Ender27182818 have you switched to something else, or doing things more manually? @jorgebastida unfortunately, it seems that none of the demos on http://www.dajaxproject.com/ no longer work with FireFox, at least with FF6. I have also tested with Chromium 6.x, and it seems to work. This is going to be a pile of rework on my part if this can't be fixed. :-(
from django-dajaxice.
I'm doing things more manually now - I found that I wasn't using dajaxice as much as I thought, and a little bit of url.py/javascript glue was all that I needed to get the same functions working
from django-dajaxice.
@bmeyer71 atm http://www.dajaxproject.com/forms/ is working for me using FF 6.0.2. I've also used Chrome 13 and works in the same way.
You've the "Something went wrong" message true? Is your CSRF correctly configured? What version of dajaxice do you have? 0.2 ? Have you already followed this instructions http://docs.dajaxproject.com/dajaxice/csrftoken-issues.html?
from django-dajaxice.
@jorgebastida that's strange. I get the "Something goes wrong" alert when I try changing the country from the drop down in FF 6.0.2, but it works fine in Chromium.
As for my own project, currently I am getting that alert message when I run Dajaxice.the_projects.clearsearch(Dajax.process);
and it doesn't matter what I have in that function for code.
Am I calling it wrong?
Oddly enough, this works, so far: onchange="Dajaxice.the_projects.citytown(Dajax.process,{'option':this.value})"
Yes, I have both the load statement and that js import statement in my parent template.
I just did a pull on the repo yesterday and installed from the latest commit.
from django-dajaxice.
@jorgebastida my project seems to be working ok now. I'll keep an eye on it. Not sure what the problem was exactly. Seems this code chunk document.location.href='{% url the_projects.search.all %}';
in the same function was causing some problems if it was placed after the Dajaxice calls.
from django-dajaxice.
@jorgebastida Sorry to keep bringing this up. I Think I've managed to get FF working. However Chomium/Chrome gives me the Something goes wrong
message but still seems to carry out the task. This happens when I call document.location.href='{% url the_projects.search.all %}';
at the same time as my two Dajaxice calls. The error that comes up in the developer panel for chromium is Failed to load resource
and points to my two ajax functions the_projects.sessionreset
and the_projects.clearsearch
. Any ideas as to why this is happening?
from django-dajaxice.
I think I may have a work around for the problem. I am trying your redirect
api option. I didn't notice this until I looked closer.
from django-dajaxice.
@bmeyer71 I'm having the same problem now. How did you get FF working? Is there anything different between ff and chrome?
from django-dajaxice.
@everpcpc I'm in the process of reworking that section of the project. However, at that time, my solution was to use page_redirect.
from django-dajaxice.
Not sure if related, but probably... yes.
I'm working on a BIG update for both django-dajaxice and django-dajax. The branch I'm working on is develop (https://github.com/jorgebastida/django-dajaxice/tree/develop) here you have the diff (master...develop) I you can test your app with this 0.5 version, that'll be really interesting. I'll release it soon.
from django-dajaxice.
FYI, on the general question in the original issue about how to tell what exactly has gone wrong when you get the "Some goes wrong" alert, what you need to do is configure Django's LOGGING in settings.py to do something useful with the exception messages dajaxice is creating. Specifically, you need to add a handler for 'dajaxice' -- the logging name dajaxice uses for its messages.
For instance, to print exceptions etc. to the console, in your settings.py use:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler'
}
},
'loggers': {
'dajaxice': {
'handlers': ['console'],
'level': 'ERROR',
'propagate': True,
},
}
from django-dajaxice.
Related Issues (20)
- No error reporting when DEBUG=False
- Dajaxice generated url does not take WSGIScriptAlias into account HOT 1
- Forked and maintained django-dajaxice HOT 1
- DeprecationWarning HOT 1
- Running a django project in a folder
- Pull request #75 /issue #69 back in version 0.6
- Dajaxice only registers one function
- Is there a way to split ajax.py into a few smaller files? HOT 2
- error after django 1.7 upgrade: __init__() got an unexpected keyword argument 'mimetype' HOT 1
- XMLHttpRequest emits onreadystatechange but not onload event HOT 1
- content-type application/octet-stream Problem if nosniff active on webserver
- Incompatibility with django-debug-toolbar
- Unable to find dajaxice/dajaxice.core.js under Windows.
- RemovedInDjango19Warning
- Django server in one computer, client in other computer Problem
- "No module named 'Dajaxice'" with python 3
- dajaxice.core.js:606 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.
- Modify GitHub blurb
- safe_dict(d) has same error as old dajaxice project
- Error in new version of Django in urlpatterns
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-dajaxice.