After upgrading my drupal instance and views, I begun to get these error messages from Views UI:

An error occurred at /admin/build/views/ajax/add-item/PDF/default/field.
Error Description: { ... }
An error occurred at /admin/build/views/ajax/config-item/PDF/default/field.
Error Description: { ... }

Error description is encoded JSON data. After decoding it I realized it is the HTML list of all available fields I can use with the views. Other than nothing really related with the error message.

Before the upgrade, the instance was Drupal 6.16 with Views 6.x-2.10.
Now it is Drupal 6.17 with Views 6.x-2.11

Along with Drupal core and Views module I updated CCK, Filefield, Imagefield and Link modules too.

I found a similar issue posted last year for version 6.x-2.6 #417570: An error occurred at /admin/build/views/ajax/config-item/view_name/default/field/value comment #16
But since then the code changed and it doesn't apply to this version.
I compared 6.x-2.10 and 6.x-2.11 with WinMerge. check_plain function got my attention due its compatibility with PHP 5.3.

Any ideas, solutions?

Thanks,

CommentFileSizeAuthor
#14 drupal_error.jpg265.52 KBljrweb

Comments

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

This does not really means a lot. If you look at the other issue you should have seen that this error is caused often by php errors.

So i hope you can enable php logging and provide the error message.

osman’s picture

I enabled the PHP error logging, tried again. Nothing in the logs. I believe the php.ini configuration is just fine.

I also tried disabling jQuery and jQueryUI update modules. They didn't effect the problem.

Here is one of the errors I get from the views UI, when javascript is not disabled. Does this make any sense? this is the output of field settings below the UI...

An error occurred at /admin/build/views/ajax/config-item/PDF/default/field/title.

Error Description: { "display": "\x3cform action=\"/admin/build/views/ajax/config-item/PDF/default/field/title\"  accept-charset=\"UTF-8\" method=\"post\" id=\"views-ui-config-item-form\"\x3e\n\x3cdiv\x3e\x3cdiv class=\"form-item\" id=\"edit-options-label-wrapper\"\x3e\n \x3clabel for=\"edit-options-label\"\x3eLabel: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"128\" name=\"options[label]\" id=\"edit-options-label\" size=\"60\" value=\"\" class=\"form-text\" /\x3e\n \x3cdiv class=\"description\"\x3eThe label for this field that will be displayed to end users if the style requires it.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-exclude-wrapper\"\x3e\n \x3clabel class=\"option\" for=\"edit-options-exclude\"\x3e\x3cinput type=\"checkbox\" name=\"options[exclude]\" id=\"edit-options-exclude\" value=\"1\"   class=\"form-checkbox\" /\x3e Exclude from display\x3c/label\x3e\n \x3cdiv class=\"description\"\x3eCheck this box to not display this field, but still load it in the view.  Use this option to not show a grouping field in each record, or when doing advanced theming.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-alter-text-wrapper\"\x3e\n \x3clabel class=\"option\" for=\"edit-options-alter-alter-text\"\x3e\x3cinput type=\"checkbox\" name=\"options[alter][alter_text]\" id=\"edit-options-alter-alter-text\" value=\"1\"   class=\"form-checkbox\" /\x3e Rewrite the output of this field\x3c/label\x3e\n \x3cdiv class=\"description\"\x3eIf checked, you can alter the output of this field by specifying a string of text with replacement tokens that can use any existing field output.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-text-wrapper\"\x3e\n \x3clabel for=\"edit-options-alter-text\"\x3eText: \x3c/label\x3e\n \x3ctextarea cols=\"60\" rows=\"5\" name=\"options[alter][text]\" id=\"edit-options-alter-text\"  class=\"form-textarea resizable\"\x3e\x3c/textarea\x3e\n \x3cdiv class=\"description\"\x3eThe text to display for this field. You may include HTML. You may enter data from this view as per the \"Replacement patterns\" below.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-make-link-wrapper\"\x3e\n \x3clabel class=\"option\" for=\"edit-options-alter-make-link\"\x3e\x3cinput type=\"checkbox\" name=\"options[alter][make_link]\" id=\"edit-options-alter-make-link\" value=\"1\"   class=\"form-checkbox\" /\x3e Output this field as a link\x3c/label\x3e\n \x3cdiv class=\"description\"\x3eIf checked, this field will be made into a link. The destination must be given below.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-path-wrapper\"\x3e\n \x3clabel for=\"edit-options-alter-path\"\x3eLink path: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"255\" name=\"options[alter][path]\" id=\"edit-options-alter-path\" size=\"60\" value=\"\" class=\"form-text\" /\x3e\n \x3cdiv class=\"description\"\x3eThe Drupal path or absolute URL for this link. You may enter data from this view as per the \"Replacement patterns\" below.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-link-class-wrapper\"\x3e\n \x3clabel for=\"edit-options-alter-link-class\"\x3eLink class: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"128\" name=\"options[alter][link_class]\" id=\"edit-options-alter-link-class\" size=\"60\" value=\"\" class=\"form-text\" /\x3e\n \x3cdiv class=\"description\"\x3eThe CSS class to apply to the link.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-alt-wrapper\"\x3e\n \x3clabel for=\"edit-options-alter-alt\"\x3eAlt text: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"128\" name=\"options[alter][alt]\" id=\"edit-options-alter-alt\" size=\"60\" value=\"\" class=\"form-text\" /\x3e\n \x3cdiv class=\"description\"\x3eText to place as \"alt\" text which most browsers display as a tooltip when hovering over the link.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-prefix-wrapper\"\x3e\n \x3clabel for=\"edit-options-alter-prefix\"\x3ePrefix text: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"128\" name=\"options[alter][prefix]\" id=\"edit-options-alter-prefix\" size=\"60\" value=\"\" class=\"form-text\" /\x3e\n \x3cdiv class=\"description\"\x3eAny text to display before this link. You may include HTML.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-suffix-wrapper\"\x3e\n \x3clabel for=\"edit-options-alter-suffix\"\x3eSuffix text: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"128\" name=\"options[alter][suffix]\" id=\"edit-options-alter-suffix\" size=\"60\" value=\"\" class=\"form-text\" /\x3e\n \x3cdiv class=\"description\"\x3eAny text to display after this link. You may include HTML.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-target-wrapper\"\x3e\n \x3clabel for=\"edit-options-alter-target\"\x3eTarget: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"128\" name=\"options[alter][target]\" id=\"edit-options-alter-target\" size=\"60\" value=\"\" class=\"form-text\" /\x3e\n \x3cdiv class=\"description\"\x3eTarget of the link, such as _blank, _parent or an iframe\'s name. This field is rarely used.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv\x3e\x3cfieldset id=\"views-tokens-help\"\x3e\x3clegend\x3eReplacement patterns\x3c/legend\x3e\x3cp\x3eThe following substitution patterns are available for this display. Use the pattern shown on the left to display the value indicated on the right. Note that due to rendering order, you cannot use fields that come after this field; if you need a field not listed here, rearrange your fields.\x3c/p\x3e\x3cdiv class=\"item-list\"\x3e\x3ch3\x3eFields\x3c/h3\x3e\x3cul\x3e\x3cli class=\"first\"\x3e[field_pdf_file_fid_1] == Content: PDF (field_pdf_file)\x3c/li\x3e\n\x3cli\x3e[field_premium_value] == Content: Premium content? (field_premium)\x3c/li\x3e\n\x3cli class=\"last\"\x3e[title] == Node: Title\x3c/li\x3e\n\x3c/ul\x3e\x3c/div\x3e\x3cdiv class=\"item-list\"\x3e\x3ch3\x3eArguments\x3c/h3\x3e\x3cul\x3e\x3cli class=\"first\"\x3e%1 == Content: Category (field_pdf_cat) title\x3c/li\x3e\n\x3cli class=\"last\"\x3e!1 == Content: Category (field_pdf_cat) input\x3c/li\x3e\n\x3c/ul\x3e\x3c/div\x3e\x3c/fieldset\x3e\x3c/div\x3e\x3cinput type=\"hidden\" name=\"options[alter][help]\" id=\"views-tokens-help\" value=\"\"  /\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-trim-wrapper\"\x3e\n \x3clabel class=\"option\" for=\"edit-options-alter-trim\"\x3e\x3cinput type=\"checkbox\" name=\"options[alter][trim]\" id=\"edit-options-alter-trim\" value=\"1\"   class=\"form-checkbox\" /\x3e Trim this field to a maximum length\x3c/label\x3e\n \x3cdiv class=\"description\"\x3eIf checked, this field be trimmed to a maximum length in characters.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-max-length-wrapper\"\x3e\n \x3clabel for=\"edit-options-alter-max-length\"\x3eMaximum length: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"128\" name=\"options[alter][max_length]\" id=\"edit-options-alter-max-length\" size=\"60\" value=\"\" class=\"form-text\" /\x3e\n \x3cdiv class=\"description\"\x3eThe maximum number of characters this field can be.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-word-boundary-wrapper\"\x3e\n \x3clabel class=\"option\" for=\"edit-options-alter-word-boundary\"\x3e\x3cinput type=\"checkbox\" name=\"options[alter][word_boundary]\" id=\"edit-options-alter-word-boundary\" value=\"1\"  checked=\"checked\"  class=\"form-checkbox\" /\x3e Trim only on a word boundary\x3c/label\x3e\n \x3cdiv class=\"description\"\x3eIf checked, this field be trimmed only on a word boundary. This is guaranteed to be the maximum characters stated or less. If there are no word boundaries this could trim a field to nothing.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-ellipsis-wrapper\"\x3e\n \x3clabel class=\"option\" for=\"edit-options-alter-ellipsis\"\x3e\x3cinput type=\"checkbox\" name=\"options[alter][ellipsis]\" id=\"edit-options-alter-ellipsis\" value=\"1\"  checked=\"checked\"  class=\"form-checkbox\" /\x3e Add an ellipsis\x3c/label\x3e\n \x3cdiv class=\"description\"\x3eIf checked, a \"...\" will be added if a field was trimmed.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-html-wrapper\"\x3e\n \x3clabel class=\"option\" for=\"edit-options-alter-html\"\x3e\x3cinput type=\"checkbox\" name=\"options[alter][html]\" id=\"edit-options-alter-html\" value=\"1\"   class=\"form-checkbox\" /\x3e Field can contain HTML\x3c/label\x3e\n \x3cdiv class=\"description\"\x3eIf checked, HTML corrector will be run to ensure tags are properly closed after trimming.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-alter-strip-tags-wrapper\"\x3e\n \x3clabel class=\"option\" for=\"edit-options-alter-strip-tags\"\x3e\x3cinput type=\"checkbox\" name=\"options[alter][strip_tags]\" id=\"edit-options-alter-strip-tags\" value=\"1\"   class=\"form-checkbox\" /\x3e Strip HTML tags\x3c/label\x3e\n \x3cdiv class=\"description\"\x3eIf checked, all HTML tags will be stripped.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-empty-wrapper\"\x3e\n \x3clabel for=\"edit-options-empty\"\x3eEmpty text: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"128\" name=\"options[empty]\" id=\"edit-options-empty\" size=\"60\" value=\"\" class=\"form-text\" /\x3e\n \x3cdiv class=\"description\"\x3eIf the field is empty, display this text instead.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-empty-zero-wrapper\"\x3e\n \x3clabel class=\"option\" for=\"edit-options-empty-zero\"\x3e\x3cinput type=\"checkbox\" name=\"options[empty_zero]\" id=\"edit-options-empty-zero\" value=\"1\"   class=\"form-checkbox\" /\x3e Count the number 0 as empty\x3c/label\x3e\n \x3cdiv class=\"description\"\x3eIf the field contains the number zero, display the empty text instead\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-hide-empty-wrapper\"\x3e\n \x3clabel class=\"option\" for=\"edit-options-hide-empty\"\x3e\x3cinput type=\"checkbox\" name=\"options[hide_empty]\" id=\"edit-options-hide-empty\" value=\"1\"   class=\"form-checkbox\" /\x3e Hide if empty\x3c/label\x3e\n \x3cdiv class=\"description\"\x3eDo not display anything for this field if it is empty. Note that the field label may still be displayed. Check style or row style settings to hide labels for empty fields.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-options-link-to-node-wrapper\"\x3e\n \x3clabel class=\"option\" for=\"edit-options-link-to-node\"\x3e\x3cinput type=\"checkbox\" name=\"options[link_to_node]\" id=\"edit-options-link-to-node\" value=\"1\"   class=\"form-checkbox\" /\x3e Link this field to its node\x3c/label\x3e\n \x3cdiv class=\"description\"\x3eThis will override any other link you have set.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"clear-block\"\x3e\x3cdiv class=\"form-buttons\"\x3e\x3cinput type=\"submit\" name=\"op\" id=\"edit-submit\" value=\"Update\"  class=\"form-submit\" /\x3e\n\x3cinput type=\"submit\" name=\"op\" id=\"edit-cancel\" value=\"Cancel\"  class=\"form-submit\" /\x3e\n\x3cinput type=\"submit\" name=\"op\" id=\"edit-remove\" value=\"Remove\"  class=\"form-submit\" /\x3e\n\x3c/div\x3e\x3c/div\x3e\x3cinput type=\"hidden\" name=\"form_build_id\" id=\"form-4e675c42c2c7114129f8013ec4c55409\" value=\"form-4e675c42c2c7114129f8013ec4c55409\"  /\x3e\n\x3cinput type=\"hidden\" name=\"form_token\" id=\"edit-views-ui-config-item-form-form-token\" value=\"85ab4ac473a2c47746befffaeefd0581\"  /\x3e\n\x3cinput type=\"hidden\" name=\"form_id\" id=\"edit-views-ui-config-item-form\" value=\"views_ui_config_item_form\"  /\x3e\n\n\x3c/div\x3e\x3c/form\x3e\n", "title": "Defaults: Configure field \x3cem\x3eNode: Title\x3c/em\x3e", "url": "http://10.162.118.13/admin/build/views/ajax/config-item/PDF/default/field/title", "js": { "viewsAjax": { "formRelationships": { "edit-options-alter-text": { "num": 1, "values": { "edit-options-alter-alter-text": [ 1 ] } }, "edit-options-alter-path": { "num": 1, "values": { "edit-options-alter-make-link": [ 1 ] } }, "edit-options-alter-link-class": { "num": 1, "values": { "edit-options-alter-make-link": [ 1 ] } }, "edit-options-alter-alt": { "num": 1, "values": { "edit-options-alter-make-link": [ 1 ] } }, "edit-options-alter-prefix": { "num": 1, "values": { "edit-options-alter-make-link": [ 1 ] } }, "edit-options-alter-suffix": { "num": 1, "values": { "edit-options-alter-make-link": [ 1 ] } }, "edit-options-alter-target": { "num": 1, "values": { "edit-options-alter-make-link": [ 1 ] } }, "views-tokens-help": { "num": 1, "values": { "edit-options-alter-make-link": [ 1 ], "edit-options-alter-alter-text": [ 1 ] } }, "edit-options-alter-max-length": { "num": 1, "values": { "edit-options-alter-trim": [ 1 ] } }, "edit-options-alter-word-boundary": { "num": 1, "values": { "edit-options-alter-trim": [ 1 ] } }, "edit-options-alter-ellipsis": { "num": 1, "values": { "edit-options-alter-trim": [ 1 ] } }, "edit-options-alter-html": { "num": 1, "values": { "edit-options-alter-trim": [ 1 ] } } } } }, "hilite": ".views-item-default-field-title" }
merlinofchaos’s picture

That's weird. It looks like a proper response that may've gotten mangled somehow.

osman’s picture

Hi Earl, would you have any suggestions to check up on?
All i can think about is related with the last update, as I mentioned above. Since, it was working perfectly before.
But still doesn't make much sense.

merlinofchaos’s picture

Maybe look at http://drupal.org/node/752290 -- a possibly valid response like above not getting read could may be affected by that item that was discovered?

osman’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

thanks for the tip Earl.

This works for now (Drupal 6.17 & Views 2.11):

      return '"'. str_replace(array("\r", "\n", "<", ">", "&"),
                              array('\r', '\n', '\u003c', '\u003e', '\u0026'),
                              str_replace("\'","'", addslashes($var))) .'"';

This is not an ideal way to fix this issue, but as a temporary solution it works.

I'll re-open and update this ticket if I find a better solution.

EDIT: I guess I just rushed it without properly testing it. This patch turned Views UI completely unusable. I wouldn't recommend using it for the given versions.

osman’s picture

Status: Closed (fixed) » Active
WAKeaney’s picture

This is also present in Views-6.x-3.x-dev. I tried the suggested fix from #752290: Reason for lots of users seeing "An error occurred at /admin/build/views/ajax/(field)/(view)/default/field/(name)" as well, and didn't notice any change.
I'm disabling javascript with Views for now.

likewhoa’s picture

subscribing

WAKeaney’s picture

Just a quick note while I continue researching - disabling SSL on my apache server seems to make this error go away. Can anyone else comment on that?

WAKeaney’s picture

seutje on IRC pointed out that the async call is probably being made over http, which is considered crossdomain by javascript. Setting my base_url to specify https:// for the whole site did the trick perfectly, without modifying one line of code.
$base_url = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 'https://' : 'http://') . 'mysite.com';

liamaloma’s picture

To offset the $base_url, should this line be put at the template.php?

WAKeaney’s picture

I replaced the $base_url line in sites/default/settings.php with it, on line 126.

ljrweb’s picture

StatusFileSize
new265.52 KB

I tried the fix suggested by changing the $base_url but im still getting the output in the javascript popup :(

see the attached screenshot..

any other ideas? or can anyone confirm this for sure works?

merlinofchaos’s picture

Are you somehow using jquery 1.4?

ljrweb’s picture

in my

/sites/all/modules/jquery_ui/jquery.ui/version.txt

it says: 1.6

also using this version of jquery_update:

version = "6.x-2.x-dev"

I'll check the theme templates though and make sure nothing is contradicting

thanks

ljrweb’s picture

MY THEME was hardcoding the include of an old version of jQuery :(

thanks very much

dawehner’s picture

So this is fixed?

ljrweb’s picture

no! And i just realized i got ahead of my self..

i was using jquery 1.4.2 which is the current release..

and jquery-ui-1.8.4.custom.min.js - which i believe was an implementation of a date picker..

I tried to downgrade to 1.3.2 (the previous release of jQuery)

but now the javascript actions arent really working when i try to edit views :(

Im not exactly sure what to do next..

merlinofchaos’s picture

Status: Active » Closed (duplicate)

Drupal core has a bug that kills JSON responses when using jquery 1.4 see http://drupal.org/node/263445

ljrweb’s picture

Status: Closed (duplicate) » Active

the patch i see there was committed in 2008?? Im using the most current version of all modules and drupal core..

merlinofchaos’s picture

Status: Active » Closed (duplicate)

Whoops. Sorry, wrong link: http://drupal.org/node/479368

ljrweb’s picture

Status: Closed (duplicate) » Active

after clearing caches and testing, it seems like downgrading to

jQuery 1.3.2

is working for now..

merlinofchaos’s picture

Status: Active » Closed (duplicate)

Resetting status (I assume active because of crosspost)

HydroZ’s picture

This worked for me:

MySQL database 5.0.51a
PHP 5.2.14-0.dotdeb.0
Drupal 6.19
- Ubercart

Thanx a lot for your solution and enlightening explanations ;)

scottm316’s picture

Found this page on google and #11 worked for me! Thanks WAKeaney!

ihomam’s picture

hi
i faced the same problem in my website
and then i figured it out
-----------------------------------
it was because the jQuery ui that i embedded directly in my page.tpl.php "not using the jQuery ui module".