When I try to add a field to a view, I get this error pop-up:
An error occurred at http://localhost/drupal-cvs-image/?q=admin/build/views/ajax/add-item/ima...
The Firebug console shows the response to the POST is:
<b>Fatal error</b>: Cannot break/continue 1 level in <b>D:\xampp\htdocs\drupal-cvs-image\sites\all\modules
\views\includes\admin.inc</b> on line <b>2145</b>
Looking at that line of code, there's a break statement and I can't see what control statement it refers to. It's nested in a few 'ifs', but nothing that can take a break. The rest of the function, apart from a call to views_ui_standard_form_buttons() and the return statement is wrapped in an else.
Should it be a return instead, or nothing at all?
I'm getting this intermittently. I think the first field I try to add works and it breaks after that.
Comments
Comment #1
joachim commentedThe problem appears to be partly caused by a patch I'm trying for image.module that provides a field. Views doesn't seem to have found the handler for the field.
The problem is compounded in that after I've tried to add this bad field, I can't add any other field that has previously worked.
Incidentally, each time I get the error, a field gets added anyway, and shows on the field list (after the view is saved) like this:
It looks like Views is still searching for the same missing handler.
And the field rearrange list shows entries like this:
Broken field nid_1
Comment #2
merlinofchaos commentedThe break simply needs to be removed, which I've done in CVS. With that removed it should then at least not crash when you add the field, and you'll go directly to having to deal with the field not working.
The rest of the handling is correct; the field is broken, and Views isn't actually aware of when it became broken. In this case itw as broken when it was added, but as far as Views knows, it may have worked once and then became broken when a module was removed. What it does know is that the field doesn't work, and lets you know it.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.