the buttons of the interface dont works (eg addfilter, add argument or order , ...)
An error occurred at /admin/build/views/ajax/display

Comments

edjay’s picture

Title: An error occurred at /admin/build/views/ajax/display » An error occurred at /admin/build/views/ajax/add-item/profile1/default/field
edjay’s picture

ok i've find . it is when i active devel module.

edjay’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

drjonez’s picture

I'm having this probelm too. Turned off devel and everything.

Eek!

drjonez’s picture

Never did get it solved. I turned off "Javascript" in TOOLS to edit my views though.

Thanks

jo1ene’s picture

Status: Closed (fixed) » Active

I am experiencing this as well. I have CCK, Date, Calendar and Views installed. All fresh versions from yesterday. I have tried editing the calendar views a well as the front page view with the same result described above.

domidc’s picture

Same problem. I want to build a simple view to display all users. I have some other sites where I only used node views and I am not experiencing problems with them.
My version $Id: views.module,v 1.317 2008/10/16 17:21:36 merlinofchaos Exp $

domidc’s picture

I found the problem, for me. I left a print_r while I was debugging phptemplate_preprocess_views_view(&$vars) function. This gave a false response. Perhaps you should check all theme functions you ve written that involve views so you dont print anything. Cause it will show up in the ajax response and give an error.

ron williams’s picture

I am having this same issue. I have a fresh install of drupal running with date/calendar/event/views installed. I am using garland for the theme. This error still occurs. I do have drupal installed in a subdirectory.

Greggus’s picture

And I have the same problem too.
But... it only apears in Firefox (3.0.4). While using Opera everything seems to be working properly.

jo1ene’s picture

I suddenly stopped having this problem and I think #9 might have been the reason for me as well.

ndrarora’s picture

I am having the same problem when i am working on hosting.
Strangely for the same version of drupal 6.6 and view 6.2.1 I don't have any problem on my laptop.

gullbyrd’s picture

I'm having the same problem and I haven't written any code at all; just installed 6.7 and various modules. Almost everything I do that involves editing or creating a view yields one of these errors.

pbeakley’s picture

Yup, same problem here. If I click on ANY add-item or rearrange buttons, I get an error and the little spinny icon starts and won't stop.

Running Drupal 6.8, just downloaded Views yesterday.

p.

gullbyrd’s picture

I did verify that turning off javascript (under Tools) "solves" the problem except for the autocomplete widget. planning to dig into it more this weekend. It also works (with javascript) on another, older machine that I have; must be some pc-specific setting.

gullbyrd’s picture

I traced into the code a little and found that the data being returned from ajax request was prepended with some bad data (an irrelevant php header). This happened every time until I commented out this line in PHP.ini:

;auto_prepend_file = c:\wamp\www\php.ini.prepend

The problem disappeared immediately after that.

myka’s picture

commenting out the prepend line didn't work for me. Cannot for the life of me figure out why Javascript is broken.

holgerhubbs’s picture

Any solution, besides turning off javascript?

holgerhubbs’s picture

jensvoigt’s picture

In my local MAMP-installation (Drupal 6.8, Views 6.x-2.2), the problem first occurred when I reached about 50 (exposed) filters. If I remove some of the filters, AJAX works again. Other and smaller views in the same Drupalinstall works without problems.

Increasing the MAMP memory did not help.

pfaocle’s picture

Version: 6.x-2.1 » 6.x-2.2

Hit this today with D6.8, Views 2,2 and a site upgrade from D5.13 (currently thinking something in the aging theme could be to blame).

Tried converting old Views 1 views, re-creating them from scratch, deleting the Views 1 data then re-creating them, same problem. Will post back if I find anything.

easp’s picture

I ran into the same problem when I reached some limit with fields added. If I remove some of my fields from views it will allow me to add more fields until I hit the limit again. The problem appears to be some limitation in the number of fields and filters that can be added to views.

hedac’s picture

fresh instalation of everything today and same problem. Very strange in other server with different hosting works.

Charlie Sibbach’s picture

This stopped working for me on my iPower webhosting account today. Same sites still work with a different host. I have several Drupal 6 sites hosted there with different codebases, and the views UI has broken on all of them. It's not spitting out anything into Firefox's error console, and the error is the same on Linux and OSX, in Firefox and Safari. No changes to the theme or code, so no hanging prints; I'm using Garland for my admin theme anyway. Very strange; I forgot how nice the javascript makes editing views until it's not there!

webchick’s picture

Status: Active » Closed (duplicate)

Marking this as a duplicate of #295246: An error occurred at /drupal/admin/build/views/ajax/preview/, which was around first.

dbeall’s picture

New Install, D6.9, everything up to date. [old xp box/ firefox] same issue.almost any adjustment in views provokes the error. I have another D6.9 site on a different host(hotdrupal) that works fine. I really thought i messed something up big time till i found this thread. The problem is important, but having this great Drupal community makes it better somehow.

leahecooper’s picture

Similiar error when trying to add a CCK computed field to a view as a filter. I used the Tools tab in Views to turn off JavaScript in Views and tried again. Then received this error:

Fatal error: Class 'views_handler_filter_float' not found in .../sites/all/modules/cck/includes/views/handlers/content_handler_filter_float.inc on line 9

Did find a definition of view_handler_filter_float in sites/all/modules/views/includes/handlers.inc though.

tristanmatthews’s picture

Same problem, turning off Devel fixed it.

I had the same problem, on a site I haven't been working on for a couple weeks, so I had to install a cck and views updata, neither of which helped.

I then tried turning off Devel, which made it go away.

hambers’s picture

Just got this error with views UI (with Drupal 6.14 and Views 6.x-2.6).

For anyone still getting this problem, check your php version. This article (http://drupal.org/node/307956) suggests that Drupal has issues with php 5.3

Downgrading XAMPP (1.7.2 on windows) back to 1.7.1 which uses php 5.2.9 resolved the problem.

henrijs.seso’s picture

php 5.2.9 - same problem

maomaohuhu’s picture

I have this problem on a new install of Drupal 6.14 with Views 6.x-2.7 and php 5.3.0 .

Javascript error mentionned aboved , in all browsers ( FF, Chrome, ie ).

Downgraded php to 5.2.11 on WAMP ( via here: http://www.wampserver.com/en/addons_php.php ) and it fixed it for me !

Apparently, php 5.3 is either buggy, or not quite entirely supported yet.

leoleoleo17’s picture

I have the fucking solution!

Check this out:
http://mmbee888.wordpress.com/2009/11/06/drupal-views-module-ajax-error/

There is an extra “&” in the function parameter. Removing it fixes the problem :D

views/includes/admin.inc

on line 1559:
function views_ui_ajax_form($js, $key, &$view, $display_id) {

to:
function views_ui_ajax_form($js, $key, $view, $display_id) {

merlinofchaos’s picture

Also search the Views queue for php 5.3 -- the bug has been found and fixed. Try the -dev version.

clarky’s picture

#33
Worked for me!

Chobber’s picture

#33

Worked for me too! Thanks!

computer_jin’s picture

#33 is not working for me . I downloaded a latest views module and its line no 1559 is already set to this
function views_ui_ajax_form($js, $key, $view, $display_id) but its not working for me any suggestion?

jasonabc’s picture

same as Computer_Jin said above. I am running the latest official release of Views (6.x-2.8). Line 1559 in admin.inc has already been fixed in this release. I am still getting "An error occurred in /admin/build/views/ajax/ any time I update or edit anything in a View. Basically this is stopping Views from working on my site (as changes/edits to Views are not being saved).

computer_jin’s picture

jasonabc have you solved this issue. As i am still having this issue ... And i think this is coming because of our theme, there might be some problem in our theme.Because when i try this views on garland theme its working fine .

joshuautley’s picture

Any help on this would be appreciated.

jasonabc’s picture

yeah I reverted to an older version of Views and UberCart Views and that fixed it. No idea what the problem was/is - sorry.....

vacilando’s picture

@jasonabc - to what version of Views have you reverted? I am desperate to fix this.. thanks.

vne’s picture

I confirm that the problem exists on Drupal 6.16 and Views 2.8. It seems to appear after upgrading from Drupal 6.15, hence I have edited many views before and everything was OK. Line 1559 in views/includes/admin.inc is already set to its correct value.

Turning off javascript in Tools solves the problem, but probably it is not the best solution :)

jasonabc’s picture

@vacilando - reverted to 6.x-2.6

ligius’s picture

Same problem here with Drupal 6.16 and Views 2.8, only works if Java is turned off.

ikarusweb’s picture

Version: 6.x-2.2 » 6.x-2.10
Priority: Normal » Critical

Drupal 6.16, views 6.x-2.10, same problem... how to fix that?

mobcdi’s picture

Having the same problem with Views 6.x-2.7 Drupal 6.14

I've tried it on a number of systems with different browsers and also disabled javascript in Views -> tools but that just gives me a blank page when I try to edit any field in the view no matter if its IE or FF

Is anyone also got an incompatibility error in the Text field tags module of CCK in-case this is a common problem with this error?

mobcdi’s picture

Would this also be solution?
http://drupal.org/node/752290

obironkenobi’s picture

I'm confused because I've been working with Views and Drupal 6.16 for the past 3 days with ZERO problems until I confronted this problem for the first time like an hour ago. Why would this problem SUDDENLY spring up?

The only change I made significantly was adding encryption/SSL. I made sure that the admin/* directory is ignored by the Secure Pages module. I'm still getting this error and not sure if I need to make these changes to the core to fix the Views module.

Can someone weigh in?

enils’s picture

Issue tags: +views, +Ajax

Having the same problem with Views 6.x-2.6 Drupal 6.16 on my XAMPP 1.7.3
But the problem dissapear and ran well when i reinstall with the same modules and settings on XAMPP 1.7.0

somehow, it works for me :)

nicanorflavier’s picture

Have the same problem here.

arua13l’s picture

subscribing

amariotti’s picture

Check to make sure that any custom jquery.js files aren't causing the problem. I turned mine off since I didn't need it of anything but home page and the error is gone now.

This was the jquery file that was causing me problems: jquery.tools.min.js

bisonbleu’s picture

Almost the same problem.

The error I get is

An error occurred at /en/admin/build/views/ajax/preview/name_of_display.

One way I can generate this error is to simply click the Preview button. The error occurs wether I preview the Default settings or Content pane displays. But the Feed display does not generate this error !? Use Ajax is set to NO. Row style to Nodes.

The nodes are from a custom content type which holds multiples dates (course dates). Could this be the source of the problem? I've created course nodes with a ".docx" file someone sent me. I've omitted the Body field and created a CCK description field. I noticed afterwards that the file contained curly apostrophes. I've read somewhere that this could be a problem. True or not? Hard to find a definitive answer.

Of course, when I disable Javascript for Wiews (in Tools) all works well and I get no errors. I've created another View that filters different node types. Again, no errors! And last but not least (I'm experimenting as I write this comment) not excluding my CCK description field from the Feed (admin/content/node-type/course/display/rss) generates the same error!

I guess I should seriously start looking at my custom content type, especially the description field (which replaces the omitted Body field).

- First I'll check the content of this field and see if i can get rid of the error by pasting in some Lorem ipsum...
- Second, i'll scrap the field for either the default Body or a new one

I'll be back...

- Views 6.x-2.11
- Views attach 6.x-1.2
- Views Bonus Pack 6.x-1.1
- Views Bulk Operations (VBO) 6.x-1.9
- Chaos tool suite 6.x-1.6
- jQuery UI 6.x-1.x-dev (2010-Jul-11)

aerodub’s picture

#53 following his advice also solved my javascript error with views,
please double check your jquery files as they might be conflicts with views.

peterjaap’s picture

Thanks, this fixed it!

I included jquery through the Google API service because at first I didn't need jquery_ui. Lateron I did, and forgot to remove the jquery line in my template.

jpsalter’s picture

Our $base_url was defined without `www` but we were accessing the view's admin page with the `www`. We noticed the AJAX response was using the $base_url defined URL.

We solved this problem by commenting out the $base_url definition in the settings.php file. Alternatively, just make sure you're accessing your site with the proper full URL that matches the URL of the AJAX error.

Sheafraidh’s picture

Thanks a lot, amariotti - your solution #53 was the one - I remembered that I've upgraded my jquery.js from 1.2.6 (comes with Drupal 6.19) to the latest one (1.4.2) due to using some it's new functions and trusted (it seems by mistake) in backward compatibility (or something like that) :-)

boldart’s picture

jpsalter - thanks - your comment put me on the right track. I had secure pages enabled for admin/*. As soon as I disabled secure pages for my admin pages everything was hunky dory! Which is good as trying to use Views 2 with the js disabled is really really annoying ;)

Edward Clement Lee’s picture

I second boldart's finding -- my site was using Secure Pages for admin pages and I guess the https was messing up AJAX in Views. I added "admin/build/views*" to the paths that Secure Pages ignores, and it seems to be working fine now. And the other admin pages still use https.

jphelan’s picture

bodlart fixed mine too, https was causing the error added "admin/build*" to the paths that Secure Pages ignores and it fixed it.

holeepassion’s picture

Title: An error occurred at /admin/build/views/ajax/add-item/profile1/default/field » An error occurred at /admin/build/views/ajax/add-item/profile1/default/field, about to cry but got help :D

Number 57 works for me. Thanks Jpsalter

Our $base_url was defined without `www` but we were accessing the view's admin page with the `www`. We noticed the AJAX response was using the $base_url defined URL.

We solved this problem by commenting out the $base_url definition in the settings.php file. Alternatively, just make sure you're accessing your site with the proper full URL that matches the URL of the AJAX error.

T1ckL35’s picture

I had the same problem and figured out a solution that worked for me, others mileage may vary:
http://drupal.org/node/752290#comment-4078556

guges’s picture

Another one here who got the problem.

Mine happened because of jQuery. The base jQuery included in /misc causes problems if it is over 1.3.2. Before I knew this, I just overwrote the jquery.js file with a newer 1.4 script and problems happened with Views.

I am not sure whether or not the Views docs have this warning, but it needs it.

tl;dr: Do NOT use any version of jQuery > 1.3.2. It will break Views UI.

dready2011’s picture

I had the problem after activating the devel theme_developer module and calling dpm( get_defined_vars() ); somewhere.
Deactivating theme_developer module fixed it for me.

mist’s picture

Our $base_url was defined without `www` but we were accessing the view's admin page with the `www`. We noticed the AJAX response was using the $base_url defined URL.

We solved this problem by commenting out the $base_url definition in the settings.php file. Alternatively, just make sure you're accessing your site with the proper full URL that matches the URL of the AJAX error.

For me it worked !

AviadG’s picture

I am using the Domain module and found that I get this issue only on one of the installed sites.

TWD’s picture

subscribing

I got Views to work but only by disabling JavaScript in the Views Tools options.

I had to install jQuery 1.4 in order to get another piece of custom code to work
so that may well relate to what other people have discovered about this bug.

Strange though, that I was happily using Views on the same site for some time
before this issue reared its ugly head.

kevinorin’s picture

I have the same problem: I simply edit my VIEWS in a different browser than the one I am working in and disable Javascript for the browser.

A work-around not a FIX but it gets the job done.

attheshow’s picture

I had a problem with this on my localhost. I had to disable jquery update and jquery UI to get it working again.

pierrepaul’s picture

In my case, I had some fields with accentued characters as keys in some of the fields.
Let's say I had a checkbox cck field, I had some options like :
Privé|Privé
OBNL|OBNL

Looks like the accentuated character in the key isn't escaped before going through the ajax call, so Views is completely lost. Pretty easy to fix, hard to find. I had to use accentuated characters because I was mass importing nodes from csv file.

Camario39’s picture

works in chrome but not in firefox 6...

mcfilms’s picture

#62 provided the hint I needed to edit and save my view without having to hack anything or turn off javascript. I was having an error message on the views page accessed through http://site.com, but no such problem saving the view when visiting it on http://www.site.com. Maybe my settings php specifies www as the root?

In any case, using WWW worked.

travisimo’s picture

adding */admin/build* to secure pages ignore fixed mine also. This needs to be DOCUMENTED in secure pages as well as Views!

webguy2000’s picture

Version: 6.x-2.10 » 6.x-2.16
Priority: Critical » Normal

The solution for me was to remove a later version I was using of jQuery than the one that comes with Drupal. Got rid of it and now Views UI works great!

couloir007’s picture

#62 lead me in the right direction. Our base url had http, not https. Secure issues.

edill3484’s picture

It looks like it is a generic error that can be caused by just about anything.

Mine was caused by including multiple JQuery versions (one with a plug-in, one with a theme).

Just a suggestion for others experiencing similar issues to look at.

Good luck.

Ranas’s picture

Agreed with edill3484. Having Ubercart running on our Drupal 6.25 with one of the Site5 themes, for an e-commerce solution, this problem had been persistent with us until a few minutes ago. We tried enabling PHP 5.2 FastCGI option, later to be followed by removing the subjected '&' from views/includes/admin.inc between line#1541 and line#1559, this '&' was present at couple of places in the function.

Tried disabling few modules, switching back to 'Garland' theme, running cron few a times, tried clearing the cache. Things did not seem working, although any of above options may work for some and may not work for others.

Finally, disabling the jQuery along with Nivo Slider (which remained unused, and the same needed the jQuery update) as suggested by amariotti in #53 worked. The error has gone and things are working fine now. Thank you amariotti and thanks everybody for taking time and help.

Good luck!

projectalpha’s picture

#53 solved the problem for me. Thanks!

AviadG’s picture

I was actually missing the file jquery.tools.min.js from the installation, so I just downloaded it and the error was gone.

thumbslinger’s picture

I just had this issue. The site is a little more than 2 years old and the view in question had NEVER been changed so it was actually a "all of sudden."

What I did was:
Made the change to Arguments. Clicked Updated waited for a good few seconds for the update to stop. Then, clicked saved and started searching this topic. When I noticed the window in the back changed, voila, the 'view has been saved' and all was well.

I was clicking too fast and double-clicking the save in frustration!

So, give it a try. I'm using Drupal 6.26

hvasconcelos’s picture

#33 worked for me.

This error started happening after the php 5.3 upgrade (which complains a lot about functions being called by reference) so that makes sense as to why we'd have to change the function argument from reference to value. Thanks!

interdruper’s picture

In my case, this error arises after setting JQuery version > 1.5 in JQuery_update Module. Keeping JQuery version = 1.5 and error is gone.

Hop it helps

drumming_cat’s picture

We ran into this issue after we moved to a new PHP server with different PHP settings than the old one.
In particular relevant in our case: short_open_tag setting is switched OFF on the new server.
As a result, the AJAX error message in Views displayed the plain text content of 2 php files that are included through a custom module, in addition to the actual error message. These php files started with <? instead of <?php, but the new server didn't allow for that. After changing the opening tags in these 2 files to <?php the AJAX error messages are gone (I assume alternatively switching on the short_open_tag on the PHP server would have worked as well).

schwa’s picture

interduper, just wanted to send you a big kiss. After hours of troubleshooting your tip to set the jquery version back to 1.5 from 1.8 was what worked beautifully for me. Thank you, good sir or madam!

lestu’s picture

For me it was 404 page not found error, whenever I tried to edit something on a view.
Disabling Javascript in Tools didn't help, the 404 stayed.
After I disabled the site cache and emptied it, the problem was resolved, although I'm afraid only temporarily.

emilypriddy’s picture

Big THANKS to interdruper!!! Changing jQuery version from 1.8 to 1.5 fixed it immediately!!

adamdash’s picture

I was having the same error when trying to edit views, and it turned out it was memcache logs being displayed at the bottom of each page that was causing the problem. Turning them off in the memcache settings fixed the problem for me.

plato1123’s picture

Sub'd

amedjones’s picture

for those having this problem, it has to do with the latest version of jquery.
I started having this problem when i installed bx slider which required jquery 1.8.2 but I guess view requires an earlier version

amedjones’s picture

Issue summary: View changes

i too have the same problem, running latest drupal with jquery 1.2.6
when i use a different browser for the first time, it works so must be some caching issue as well

premshankar’s picture

Status: Closed (duplicate) » Needs review

Dear folks,

The issue was because of .htaccess file. Check your file if it is correct. Or create a new one and give 644 permissions

mustanggb’s picture

Status: Needs review » Closed (duplicate)

Restoring status.