Hi merlin & others,

I just spend about 3h debugging a problem with views. That is, with the AJAX functionality in the Views module.

I could (1) create the view, then (2) click on the + of any entry and get that selection page. That worked just fine.

Once I selected something, say Node: Type, I'd click Ok. The request was properly sent, but I would get the AJAX output on my screen (you know, the usual JavaScript object.)

Since I am using 3.x-dev, I thought I'd just debug the problem myself and possibly post the solution.

Problem there was, but not directly in the Views. There was an interaction between the theme and the jQuery ajaxSubmit (and probably others.) I have no clue how that happens, but somehow the ajaxSubmit() function could not be found. Reading all the AJAX related issues, I found answers although usually not complete it helped be track down the culprit. Since I had nearly no modules installed, I finally thought the problem should be with the theme (A3 Atlantis, to be precise). This theme adds some JavaScript at the bottom of all the Admin pages (Except the Blocks...)

<script type="text/javascript">
/* <![CDATA[ */
      $("#right-toggle").click( function() {
        $("#content").css("border-right","1px solid #1A4864");
        $("#content").css("border-left","1px solid #1A4864");
        $("#content").css("border-bottom","1px solid #1A4864");
/* ]]> */

As we can see, it uses $(document) which is not correct.

Yet, the main reason why I'm posting this is to ask whether we could have a link to a page explaining potential AJAX problems with the Views and all the things that can be done to circumvent them. In my case, for instance, it was to switch to another theme (I tried with Garland thinking that would certainly be the best choice for a functional version!) In most cases, people would have to determine which of the module they installed that would have an interaction with the views. Once located, either remove it for good, remove it while working on the views, ask the maintainer(s) to fix the problem.

At this time, I have not see any "Known Issues" in your help (although I may have missed it?!). I could start writing such a page, I just would need some pointers on the style and where to put the file, maybe how to hand it to you once ready, so it gets included in the views, etc. I think that a lot of the posts you get are Known Issues and thus having such a file (or maybe a website book as you have on logrus.com).

Thank you.
Alexis Wilke


AlexisWilke’s picture

Actually, the A3 Atlantis bug has an issue labeled with the word "Block," which has the correct fix. The code I pasted before may have some improper side effects, but the culprit is shown in #688890: Javascript error on all Admin pages (and the "A3 Atlantis" theme block page).

Thank you.

dawehner’s picture

This $(document) issue is a general problems of using ajax stuff together with other custom jquery. The behaviours have to be attached to the new html elements. This is especially the case in d7.

Letharion’s picture

Assigned:Unassigned» esmerel

Docs related, assigning to esmerel.

esmerel’s picture

Status:Active» Closed (works as designed)

I think the issue queue is probably the best place for this. It appears to be a problem with one theme that isn't being maintained.