If I try to tick the "Link this field to its term page" box for a filter: "Taxonomy: All terms" or "Taxonomy: Term", then I get this error:
An error occurred at /drupal/admin/build/views/ajax/preview/portfolio_2
and that column will not display in the preview. Unticking the box makes the error go away and the column display properly.
I got the same thing in Safari 3.1.2 and IE 6.

I also got another error when creating a Page display of the same view:
An error occurred at /drupal/admin/build/views/ajax/config-item/portfolio_2/page_1/field/name_1

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

Usually when you get this kind of error, there is an error in your apache/php error log that will give more information about what the actual failure was. I need that information.

dvdsantana’s picture

I have same error and my Apache error.log say:

[Sun Sep 14 14:10:43 2008] [error] [client 127.0.0.1] PHP Fatal error:  Call to a member function options_form() on a non-object in C:\\Archivos de programa\\Apache Software Foundation\\Apache2.2\\htdocs\\d6p\\modules\\views\\includes\\admin.inc on line 1905, referer: http://localhost/d6p/?q=admin/build/views/edit/qwerty

I think problem is around Ajax but i don't find it. I disabled javascript in Tools tab, but nothing. I can't configure Page Display, press button and not work. However, can configure other display like Block, Attachment or Feed.

PD: Sorry for my english!

merlinofchaos’s picture

netrunner: The error you're getting indicates that view somehow has an invalid display, but the test for it isn't catching it. Can you export and paste the view that this happens with? (between PHP tags, please)

dvdsantana’s picture

Hello, merlinofchaos.

Here is the example view. I try with recent rc3 with same results.

$view = new view;
$view->name = 'qweerty';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'field_bae_value' => array(
    'label' => '',
    'link_to_node' => 1,
    'label_type' => 'widget',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_bae_value',
    'table' => 'node_data_field_bae',
    'field' => 'field_bae_value',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
merlinofchaos’s picture

I just realized that the original bug reported here was a known bug that was fixed in rc2. netrunner inadvertantly conflated the issue.

netrunner: I imported that view and it works for me, except for the fact that I don' thave that CCK field. That means the error probably has to do with that particular CCK field. I would try removing it and seeing if that problem goes away. If it does, there may be an error with CCK and if so you should file a new issue in the CCK queue. If the error does not go away then...I'm not sure what to do next.

dvdsantana’s picture

Thanks for your help and interest, I will continue working on it.

I disabled cck module completely, but not be solved so I will continue using drupal version 5 in production site.

marcob’s picture

I have the same in 6-2.1. It occours in archive views too. I Can't post a log because don't access to it. I have not CKK or other views-related modules.

dvdsantana’s picture

With .dev versions of cck and views modules i have not any problem.

linuzboy’s picture

Version: 6.x-2.0-rc1 » 6.x-2.1

I have the same problem in 6-2.1. I use drupal in public server, so I can't access the php and apache log.

The drupal log does not show anything different.

merlinofchaos’s picture

I have the same problem in 6-2.1. I use drupal in public server, so I can't access the php and apache log.

Your inability to access this log is not my problem. If you cannot access this log, there is nothing I can do. Your options are to check the box to disable Javascript, find a different server, or do not use Views. But I can't fix problems without information that I have already explicitly stated I need.

webchick’s picture

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

I can reproduce this pretty consistently by adding a large number of fields to a view. I get:

"An error occurred at /X/trunk/www/admin/build/views/ajax/config-item/athletic_schedule_view/default/field/subject"

/Applications/MAMP/logs/php_error_log says:

"[06-Jan-2009 14:29:12] PHP Fatal error: Call to a member function options_validate() on a non-object in /Users/webchick/Sites/X/trunk/www/sites/default/modules/views/includes/admin.inc on line 2310"

Debugging further...

webchick’s picture

This is fun.

$form_state['handler'] ends up being NULL, which would explain the error.

In debugging this, I tried to do a watchdog('debug', var_export($form_state, 1)) and some other stuff. This didn't work because:

a) var_export() on $form_state causes *another* fatal error due to recursion.
b) Even when I replace var_export() with a print_r(), it exceeds max_allowed_packet_size. :P

So instead I went with error_log() and ended up with 18MB of debugging information. :P

I'm still sifting through it, but my guess is that this has everything to do with PHP hitting some limitation (memory, post size, etc.) which Views doesn't recover from.

webchick’s picture

Status: Postponed (maintainer needs more info) » Active
FileSize
65.96 KB

Actually, I take that back. I can't reproduce this on a "blank" view. I can consistently reproduce it on this one though, and others on this site.

This is a pretty complex view, with several displays, each of which is using arguments, fields, etc. I'll try to get it to do this with a simpler one, but for now this one should hopefully allow others to reproduce.

With that, elevating status back to "active." ;)

webchick’s picture

FileSize
658 KB

Oh, and in case it's helpful (probably won't be due to information overload), here is the debugging info. Rename from .txt to .zip and unzip (as I mentioned, it's HUGE).

webchick’s picture

Ok, as best we (easp and myself) can figure out, it's some sort of complexity problem of displays * fields * filters * arguments + overridden stuff == recipe for disaster. Attachments seem to be especially problematic, for some reason.

It gradually slows dowwwnnn and dooowwwwwnnn and finally when updating some random field you'll end up with this issue.

Also, marked #326378: An error occurred at /admin/build/views/ajax/add-item/profile1/default/field, about to cry but got help :D and #341960: Getting error when trying to create a view a duplicate of this where a bunch more people were having this problem.

webchick’s picture

FileSize
620.77 KB

Here's a dump of the $form array.

webchick’s picture

Update after after a 2.5+ hour debugging session with merlin (thank you, merlin!!), here's the skinny:

While editing a view, there's a table views_object_cache() which stores the new view you're creating as you're building it. This is so that if you accidentally move away from the page, Views has a way to get you back to your working state.

What's happening is the record in that table storing a table once it gets to a certain level of complexity gets truncated, and as a result, it can no longer be unserialized when it's retrieved from the database.

Here's my 'data' column once this error occurs:

"...i:4;a:5:{i:0;s:55:"config-item-athletic_schedule_view-default-field-thread";i:1;s:11:"config-item";i:2;R:"

The length of the data in the column is exactly 65535 bytes, which happens to be exactly the maxlength of a BLOB: http://dev.mysql.com/doc/refman/5.1/en/storage-requirements.html

So the solution is to change views_object_cache.data to a LONGBLOB type. Patch forthcoming.

webchick’s picture

Assigned: Unassigned » webchick

And I'm in this deep, might as well assign to myself. ;)

webchick’s picture

Status: Active » Needs review
FileSize
1.46 KB

Here we go...

easp’s picture

Assigned: webchick » Unassigned
Status: Needs review » Postponed (maintainer needs more info)

I applied the patch to my views 6.x-2.2 and it eliminated the javascript error I was receiving. I have now been able to add more attachments and fields to my views.

Thanks for the patch.

merlinofchaos’s picture

Status: Postponed (maintainer needs more info) » Fixed

Committed. Thanks for the help, webchick!

Status: Fixed » Closed (fixed)

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

candelas’s picture

Version: 6.x-2.2 » 6.x-2.3
Status: Closed (fixed) » Active

hello

i open the issue because i have views 6.x-2.3 and in the server i get that error.
i work by having a drupal 6.10 copy locally and one clone on the server.
i test first locally and then i apply on the server.
views works perfect locally but once on the server i cant edit at all and i get the error

An error occurred at /web/ca/admin/build/views/ajax/add-item/calendar/default/filter

since i am new on views, i used the calendar template that doesnt use ajax on the basic settings.
i followed the video tutorial and the calendar works fine in local and server.
now i wanted to clone the calendar and add taxonomy to be able to view different calendars.
since the module works perfect, i tried to do it in the server, but i get the error.

before trying to use the patch i wanted to report that it keeps happening and also hear your opinion, since i haven't apply a patch before.
thanks for any help :)

xcorex’s picture

same here.

merlinofchaos’s picture

Status: Active » Closed (fixed)

Different problem. The path you indicate contains 'calendar' -- if it only happens for calendar related fields/display/style etc, file against calendar module.

erinbirdy’s picture

Status: Closed (fixed) » Active

Opening this issue back up. This ALSO happens when trying to change the style of the view to Table. Fresh install 6.10 with current modules. Does not have to be a view using calendar. Are others still having this issue also? :0(

bobgeier’s picture

Yes, I believe this is might be the same issue I'm running into that seemed to surface when I went from 2.2 to 2.3. See http://drupal.org/node/370913. I was speculating that it might be related to integration with Content Profile Module, but I think what's going on is just that my views that reference that module's nodes are more complex than the others. Going to try to take a closer look at it this weekend, though like a few others I'm on a shared setup and don't think I can access the apache logs directly.

I can confirm that it's not devel.module related as was speculated on one of the duplicate threads.

GregoryHeller’s picture

we're are having this problem on a relatively simple view, the clincher is that we are trying to display 4 fields, among them 2 are multi value date fields. When we tick the box for "group by" to reduce duplication, we get the error on preview, and we get a WSOD when we look at a page where this view (a block with an argument) should be displayed.

If we do not tick the "group by" box for the multiple value date fields we get the node displayed multiple times.

Trey’s picture

Also having a problem with the 6.x-2.3 version ( see below ). My problem is primarily occurring when trying to add a field that requires a relationship to voting api in a "node" view, but I've also had problems adding relationships to fields in a "user" view. All of the views that I built before the upgrade still work fine. I'm still looking into what might be causing it, but just wanted to reinforce that it isn't a problem with and single contrib module. I've built work arounds for my current issues, but I'll post back if I can figure out anything that seems the likely cause.

error info:

alert:
an error occurred at http://mysite.com/admin/build/views/ajax/add-item/my_view/default/field

------------------------------------

post:
form_build_id : form-d37196638a7fa2561b3d95bc047ece9f

form_id : views_ui_add_item_form

form_token : db9c1d6d810b94dc56323e9fca443d57

group : voting-api-results

name[votingapi_cache.value] : votingapi_cache.value

op : Add

------------------------------------

response:
Fatal error: Call to a member function get_handlers() on a non-object in /drupalInst/sites/all/modules/views/handlers/views_handler_field.inc on line 252

candelas’s picture

i have been looking around and the only solution it was to go to tools and disable javascript.
before, i couldnt edit not only calendar if not any field on a view, neither create a new view.
i cleaned cache but it didnt help.

i dont understand because i have identical copies of drupal, views in local and server and locally i can work and on the server i cant.
if anybody is interested i can put the info.php on both computers.

now i can work but i think it would be nice to find the reasson :)

Tom-182’s picture

subscribing

xcorex’s picture

Same here, candelas.
Locally i can work and on the server i cant.
But, unfornetely, I dont have access to the config settings of the problematic server. Maybe you could help.

Thanks

face736’s picture

After upgrading to 2.5 I couldnt create views with cck field as filter. After downgrading to 2.3 (last backup, I did not try with 2.4), it works again fine.

ogrady’s picture

I'm getting the same error. I was unable to apply the patch to 2.5, 2.4, and 2.3. I reverted to 2.3, and the ajax error is still present when making edits to any view.

An error occurred at /admin/build/views/ajax/add-item/frontpage/default/argument

The error I get when attempting to run the patch is:

patching file views.install
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

ogrady’s picture

Temporary fix: Go to Admin >> Views >> Tools and select Disable javascript with Views. It's not as much fun to use this way, for sure, but it will keep you up and running.

I ended up going back to the most current version (2.5).

najibx’s picture

yes, although it open up all pages/blocks, etc ...but sure it get me going. thanks.

xcorex’s picture

Workaround to the "table style ajax error":

1. Create a new view.
2. First and more important step: set the style to table first (If you change this later you will get an error).
3. Page settings.
4. Sort criteria
5. Filters.
6. Fields.

Save it.

honigferd’s picture

When switching off Javascript I will get this error instead:

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

aniruddhay’s picture

Version: 6.x-2.3 » 6.x-2.5

No matter what I click or choose, I get the error! Disabling the Javascript worked for me. Xcorex's workaround did not work for me. :( Thanks in advance for all your help.

regards,
Aniruddha

Itangalo’s picture

Subscribing.

merlinofchaos’s picture

Remember, if you see that text (a white page that has a bunch of code surrounded by { }) then 99.99999% of the time it is because javascript crashed after rewriting the links but before the AJAX call could be made. If you get that, no value is provided unless you look in your javascript error logs (in firefox ctrl-shift-j will open it up) and figure out what crashed.

So far most of the crashes I've seen have been due to other modules or javascript embedded in themes.

p.morin’s picture

Hi,

I was in the same situation and I can fixed this problem by unabled the zend.ze1_compatibility_mode in the settings.php

michaelcrm’s picture

Newly updated from drupal 6.10 to 6.13, followed by updating the views from 2.2 to 2.6. After the upgrades, several major views did not generate any content in browser. And there is message:
"An error occured at /admin/build/views/ajax/previews/My_View_Name".

As reminded by merlinofchaos, I checked the PHP error log and it said

"PHP Fatal error: Cannot access empty property in E:\www\ORG_6_13\sites\all\modules\views\modules\node.views.inc on line 784"

for both attempting retrieving from a browser and reviewing in edit interface.

I check that .inc file and the lines are below:

/**
 * Template helper for theme_views_view_row_node
 */
function template_preprocess_views_view_row_node(&$vars) {
  $options = $vars['options'];

  // Make sure the variables are defined.
  $vars['node'] = '';
  $vars['comments'] = '';

  $nid = $vars['row']->{$vars['field_alias']}; // THIS IS LINE 784 IN QUESTION
  if (!is_numeric($nid)) {
    return;
  }

  $node = node_load($nid);

  if (empty($node)) {
    return;
  }

  $node->view = $vars['view'];
  $node->build_mode = ($options['build_mode'] == 'teaser' || $options['build_mode'] == 'full') ? NODE_BUILD_NORMAL : $options['build_mode'];
  $vars['node'] = node_view($node, $options['build_mode'] == 'teaser', FALSE, $options['links']);

  if (!empty($options['comments']) && function_exists('comment_render')) {
    $vars['comments'] = comment_render($node);
  }
}

Any clue please?

glennnz’s picture

This issue has appeared for me too.

Views was working fine, but suddenly this bug appeared.

I originally thought it was with my CCK fields, so deleted all my fields, content types, uninstalled CCK, reinstalled and recreated all my content types.

No joy.

Uninstalled Views., reinstalled.

No joy.

Disabled Javascript for Views.

No joy

The problem is only with table style views.

Views 2.6, D 6.13

Glenn

everycom’s picture

Worked!
2. First and more important step: set the style to table first (If you change this later you will get an error).

glennnz’s picture

Not for me...

Setting to table first produced the exact same error.

Glenn

XerraX’s picture

Subscribing

jphelan’s picture

I get the same error in 2.6
An error occurred at /admin/build/views/ajax/preview/...

John Pitcairn’s picture

I've just started getting this error, Drupal 6.13, Views 2.6.

It appears to be if I try to set a row style of "Node" and a filter specifying a particular node-type. I'm trying to figure out exactly what in the node-type is causing the error, but it doesn't seem to be the node size (other large nodes are fine).

rgristroph’s picture

I had this issue with drupal 6 running on PHP 5.3; I downgraded to PHP 5.2 and it went away. Because of some dependencies a lot of stuff changed when I downgraded, so this is not as good information as it could be.

I am installing some more drupal servers in the near future, I hope to be able to investigate this more then. I will try to get two servers as alike as possible, except for PHP 5.2 vs. 5.3, and see if I can replicate the problem on one and not the other.

azsinglguy’s picture

I had the same issue as above with the Ajax error when adding views. I had Coherent Access installed, and the errors went away when I disabled the module. Coincidence - or psychic phenomenon?

glennnz’s picture

Thanks

I don't have that module, but have the problem.....

Glenn

John Pitcairn’s picture

Re #49: My bad. Some custom date-range formatting code was misbehaving when running inside a node list, the resulting invalid/empty view then confuses the js.

clintcar’s picture

I was having the same error. Not sure if it will help in every case, but my solution was deactivating Devel Themer.

mattyoung’s picture

Version: 6.x-2.5 » 6.x-2.6

I get this error when I edit the view and save:

An error occurred at /admin/build/views/ajax/preview/classes.

there is no error messages in php_error.log

The error dialog box comes up immediately when I click save. Dismiss the dialog box and the message area shows "The view has been saved." and the views works fine if I access it by its path.

I'm using 6.x-2.6

XerraX’s picture

Priority: Normal » Critical

I think this is critical now because its 1 month old and i still cant change my views.

mansspams’s picture

new issue needed as this is something else, not original problem

mansspams’s picture

changing theme helped. Must look for some ugly code in template.php or other .tpl.php files.

UPDATE: yes, found bug in template.php, issue resolved here.

I used snippet from here: http://drupal.org/node/337022 and it broke views. If i change $function(&$vars); to $function($vars); it works. Am i doing it right?

XerraX’s picture

i fixed my problem with this:

http://drupal.org/node/452384#comment-2096276

merlinofchaos’s picture

Priority: Critical » Normal
Status: Active » Closed (fixed)

As a workaround you can always disable the Views javascript.

So far, every instance of this that I"ve found that breaks is always due to something external. Either the theme or another module whose javascript is conflicting.

In fact, the original issue that was reported here was fixed, long ago, and people are stomping all over an old issue which creates confusion and helps no one. Return this issue to closed.

arnaudfischer’s picture

For what it's worth ... I was getting error dialog ... An error occurred at /admin/build/views/ajax/config-item ... when trying to change Sort Critera and ... tools/ CLEAR VIEWS CACHE ... fixed it. My apologies if unrelated issue, newbie ... -arnaud

glennnz’s picture

This is fixed for me, it was a theme issue.

I was using a custom Genesis subtheme, just changed to Fresh Media and it works perfectly...

Cheers

Glenn

MatthijsG’s picture

Have the same problem.

Using a different browser solves the problem. Error appears with Chrome, works fine with Opera. Can somebody with the same problem confirm / test it?

Chrome = error
Opera = Fine
Fx =
IE =
...

ronenk’s picture

Component: User interface » Views Data

Had the same problem, and while reading the comments here I began to suspect that the "Theme Developer" I enabled yesterday caused this, disabled -> all is fine now.

odisei’s picture

romenk, your suggestion seems to be right - after disabling "Theme Developer" module everything works fine.

Bertan A.’s picture

This problem is due to php version install php 5.2.9 and the problem goes away (I had 5.3.0 before and it was causing similar issues)

luco’s picture

I'm running Views 6.x-2.7.

I've never had this issue till I moved a job out of its production and into its release host. now I can't edit my views appropriately (ie. using java).

the PHP is 5.2.12 in both hosting environments - mine and my client's.

where - and how - do I get more information? I went to Reports > Recent log entries but there's nothing in that page concerning misbehaving java.

EDIT: well for me I think some files were lost in the transfer. I uploaded a fresh copy of Views - in fact, upgraded to 6.x-2.8 - and ta daaaaa

Vacilando’s picture

Same problem appeared all of a sudden. Devel Theme disabled. No modules enabled recently. In latest FFox. Browser cache cleared. No PHP error in the log.

Happens only when I click the button "Update", not during other operations.

An example error message: /admin/build/views/ajax/config-item/VIEWNAME/default/field/NAMEOFFIELD
There is nothing in the PHP error log, which is most unfortunate!

omgwru’s picture

Version: 6.x-2.6 » 6.x-2.8

Same problem, turning off Devel's Theme Developer module fixed the error.

I still have Devel enabled as well as node access, just theme developer turned off.

Vacilando’s picture

Wow, I've finally fixed my problem by switching from https to http! I am opening a new issue on this, see #746264: Ajax error message on secure pages.

justclint’s picture

Status: Closed (fixed) » Needs review

Hey Guys, I've been looking for solutions on this for a while and just tried #34 of post http://drupal.org/node/417570#comment-2745760 per projectsperminute and it worked. I started noticing that all my sites were having this problem. And I know as a fact when I set the sites up they worked fine.

All my sites get updated to the latest jquery and it seems the jquery 1.4.2 is causing some issues with views in all of my sites.

Also, in addition to views Ive noticed that all drag n drop menu bars and such have lost their ajax functionality as well. For example if I go to admin -> blocks or admin -> content type -> manage fields I can not move/sort the items with drag n drop.

From what I can tell it seems the latest version of jquery (v1.4.2) is causing site wide ajax functionality loss.

Has anyone else tested this to verify?

dawehner’s picture

Status: Needs review » Closed (fixed)

Please open a new issue for compability with jquery 1.4.2

Cristhian’s picture

Does your ajax response look normal and you still get the error? Take a look at #752998: How strong is the filter for strange characters in node title and body?

sunchaser’s picture

none of the above (or posted anywhere else) solutions worked for me.
I'm running Views 6.x 2.11 inside Drupal 6.19 with jQuery 1.2.6 in core.

Since this error is thrown by the "live preview" functionality in Views it is enough that you uncheck the "Automatic live preview" underneath the view UI.

If you do this, I don't get the error popup anymore.

Now , ... to find a way to have this "live preview" unchecked by default. (since I'm not able to work out another solution for this problem)

stkrzysiak’s picture

This is an old issue, and merlinofchaos is right, webchick fixed the original issue, but I read this entire thread yesterday in hopes of some insight to my problem. I unfortunately did not find any help here, but figured it out anyway. First, let me say it seems that people are getting this issue when bad things happen on a preview return. What I mean is it is ajax failing because the returned response is not what views expects. Perhaps views should test & catch this, but for now, if you break your view in any of the seemingly endless ways this can happen, the preview may return this. For me, this is how I broke it, I hope it saves someone some grief.
My view had a php header to it, which I was unaware of as I inherited the view from another dev and didn't really think twice about it. The view worked great, so what did I care? Well, my php header checked if a user had one of two roles, and if they did, it issued a drupal_goto to a respective page. For a long time, my admin role did not have one of these roles. Then when it did, my view started redirecting to a different page. So, for me the problem was the view was not returning what views expected. It was returning another drupal page. This caused the ajax crash.

fyrebear’s picture

I know this is closed. But wanted to report this solution worked for me for my "admin/build/views/ajax/config-item" error problem.

http://drupal.org/node/295246#comment-2126946
Posted by arnaudfischer on October 8, 2009 at 4:23am
For what it's worth ... I was getting error dialog ... An error occurred at /admin/build/views/ajax/config-item ... when trying to change Sort Critera and ... tools/ CLEAR VIEWS CACHE ... fixed it. My apologies if unrelated issue, newbie ... -arnaud

pindaman’s picture

When using 'Group multiple values' I get this error.
So I modified all my views

pindaman’s picture

Is there a fix already.
I tried patching, but did not work.

Really annoying this problem

abdelatifs’s picture

It looks like if you un-check the "automatic live preview" you'll at least be able to make changes to your view.

Edit:
This Above Won't work If you call old versions of jquery in your theme.

gr33nman’s picture

subscribed

jphelan’s picture

For me it has the Hide submit button module, and added admin/build* to the exclude list and that fixed it.

Anonymous’s picture

Try Firefox!

premshankar’s picture

Issue summary: View changes

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