6

I'm using Drupal v7.22 and whenever I try to Modify the Display on views, and press the 'Add and configure' button on adding a field, or any button that sends data to the server, the page reloads and I just get a long JSON String returned in Chrome, or IE will try to download the return... Sometimes it'll accept my change, but more often than not, it won't.

It was doing this on 7.21 and then I updated to 7.22 and it stopped for a day or two, now it's doing it again. I am extremely new to Drupal, but I am a quick learner and most things are going smoothly.

What did I break and how can I fix it?

  • I've definitely seen this before, but never on a production site or a real project for that matter (always when I'm testing something out in a sandbox). So I've never taken the time to see if I could reproduce it or troubleshoot it. Looking forward to finding out if it is something obvious. – Adam Balsam May 15 '13 at 20:37
  • 2
    Do you have jQuery update installed? if so it might be related to this – Clive May 15 '13 at 21:26
  • 2
    @clive I believe I did have jquery update installed. And now I see this issue which I imagine you are alluding to. Thanks. – Adam Balsam May 15 '13 at 21:37
  • @Clive That seems to have been the problem, thanks! I searched both the web and on here in particular and didn't find any answers, guess I need to work on my search terms! Thanks for pointing me in the right direction! – eidsonator May 16 '13 at 12:41
7

Based on @Clive's suggestion in the comments, I found this issue:
JQuery Update breaks Views UI

So Views UI is not compatible with jQuery 1.8, and the OP has already confirmed that this was the problem.

This problem isn't limited to Views though. Other contrib modules depend on the default core version of jQuery (including Rules). An issue exists in the jQuery Update queue to Allow different version for administrative pages. And a patch was applied to dev on 20 MAR 2013.

The dev version of jQuery Update provides a update to the Configuration Form that allows you to select a different version of jQuery on administrative pages.

Before
jQuery Update Configuration Page Before

After
jQuery Update Configuration Page After

I can confirm that setting the "Alternate jQuery version for administrative pages" select list to "1.5" after upgrading to the dev version of jQuery Update fixes the issue with Views.

3

I have had this problem before, usually on reallly big queries too big for the default mysql sql packet size. Rather than mucking with that -- try turning off Javascript/AJAX in the Views in the views administration settings.

It's not as neat without ajax views admin pages -- but this usually fixes it.

EDIT:

Login as administrator goto /admin/structure/views/settings/advanced and check Disable JavaScript with Views. Then Save that configuration page.

  • Thanks, I doubt it is a big query, the view in question is to show a single field. However, I'm willing to try anything to fix this, if I could only find the place to turn off the Javascript/AJAX... There is no Views "configuration" and the Settings on the ViewsUi doesn't have this option. – eidsonator May 15 '13 at 21:06
  • thanks, but as Clive pointed out in the comments above. The problem wasn't so much with JavaScript in general, but a bug in Jquery 1.8, I've rolled back to 1.7, but if I find that that breaks anything else on the site, I'll use your suggestion! – eidsonator May 16 '13 at 12:45
  • yup no problem -- there are usually many solutions to any given problem :) – tenken May 16 '13 at 14:40
1

In my case it was due to domain name conflict while configuring Secure pages module. make sure that the http and https url are same and also check firebug if there's anything not loading due to change in protocol, like js libraries and other third party libraries.

0

The most common reason behind JSON dump on the screen are:

  • your JSON could contain some unexpected errors or debug dumps, validate its code first
  • your web site has some Javascript errors, so check JS Console for more details and fix them first (in Chrome: Developer Tools)
  • there is some conflict with some development modules, so disable the most suspicious one to test (drush -y dis devel navbar)
  • if you're using jQuery Update, change the version to the recent one at /admin/config/development/jquery_update (or the one provided by Drupal)
  • make sure you don't use any fishy extensions on your browser, so test on another browser,
  • clear caches and restart memcached after some of the changes described above,
  • disable JS aggregation and Drupal caches (in Performance) and debug JS code,
  • try to test it on different instance or in the clean environment.
0

I just experienced this issue today. The issue in my case was that I was accessing the website with "www", but the base_url in my settings.php file had the domain name without "www". Once I added "www" to the base_url, the issue was immediately resolved. The error message in Chrome's Dev Tools Console was "Uncaught Error: The callback URL is not local and not trusted"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.