When I try to re-save the attached view, I get the error ...

Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /path/to/drupal/includes/database.mysql.inc on line 349

CommentFileSizeAuthor
resave_error_view.txt1.45 KBRayZ

Comments

merlinofchaos’s picture

Status: Active » Fixed

The good news is that the error is not actually a problem, just a nuisance.

The better news is that I've fixed it in HEAD.

RayZ’s picture

Status: Fixed » Active

Well, the cause of the first error may be fixed, but now I'm getting ...

Warning: Unknown table 'node_field_shorttext_data_field_speaker' in field list query: SELECT DISTINCT(node.nid), node.title AS node_title, node.changed AS node_changed, node_field_shorttext_data_field_speaker.field_shorttext AS node_field_shorttext_data_field_speaker_field_shorttext FROM node node LEFT JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN term_data term_data ON term_node.tid = term_data.tid LEFT JOIN term_node term_node2 ON node.nid = term_node2.nid WHERE ((term_node2.tid = '4')) LIMIT 0, 4 in /path/to/drupal/includes/database.mysql.inc on line 120

merlinofchaos’s picture

That's a pseudo-table provided by CCK. Did something change in CCK, perhaps? I'm not quite sure here.

You might have to remove the field from the view and re-add it, if something changed.

RayZ’s picture

Nothing changed in CCK. But when I tried deleting the Fields to re-add them, I noticed that none of the CCK fields are listed anymore in the Add Fields pop-up menu in the Fields section.

I'm pretty sure the only thing I did was to sync to the latest HEAD of Views and core (both were current at the time of the original post too), and clear cache.

merlinofchaos’s picture

Ok, yea, turns out I broke that. Fixed it in HEAD, and I'm really sorry about this one. Was quite stupid of me.

Permanently Undecided’s picture

I'm commenting here because I have the same problem (re-saving existing view gives error), however it's not the same error message; my error message is:

An illegal choice has been detected. Please contact the site administrator.

and that prevents me from saving my changes.

So far the error occurred for me in two instances:

  1. Realizing I didn't after all want a block for a certain view, I tried to uncheck the block option, only to get the above error when trying to save my changes.
  2. I tried to change the default argument behaviour from 'Return Page not found' to 'Summary, sorted descending' and again I got the error.

I don't know if it helps, but this is the drupal log about the error:

Type form
Date Tuesday, 28 February, 2006 - 22:18
User neobackup08
Location /drupal/admin/views/edit/1
Referrer http://localhost:8888/drupal/admin/views/edit/1
Message Illegal choice in filter element.
Severity notice
Hostname 127.0.0.1

I'm running yesterday's Drupal CVS, and the last version (checkout from CVS) of views module.

RayZ’s picture

Great. That fixed it for me. Thanks Earl.

Permanently Undecided’s picture

Updating to the latest version of Drupal CVS seems to have fixed the error for me so far: I can now save those two views with the aforementioned previously rejected changes.

merlinofchaos’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)