ciao, da quando ho creato un nuovo campo di testo di tipo 'date' per l'inserimento di una data nei nodi di tipo pagina, mi vengono fuori due errori che riguardano mysql. non riesco a capire dove mettere mano per risolvere l'errore.
mi potete dare una mano?
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '8','3','4','7','2') WHERE (term_node.tid IS NOT NULL) AND (term_data.tid IS NOT ' at line 1 query: SELECT node.nid, DATE_FORMAT(FROM_UNIXTIME(node.created), '%Y%m%) AS node_created_orderby, node.title AS node_title, node.changed AS node_changed, node_data_field_data_evento.field_data_evento_value AS node_data_field_data_evento_field_data_evento_value 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 AND term_data.vid IN ('8','3','4','7','2') WHERE (term_node.tid IS NOT NULL) AND (term_data.tid IS NOT NULL) AND (node.status = '1') ORDER BY node_created_orderby DESC LIMIT 0, 6 in /web/htdocs/www.oratoriodiferno.it/home/drupal/includes/database.mysql.inc on line 172.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC LIMIT 0, 1' at line 1 query: SELECT node.nid, field_data_evento_value 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 AND term_data.vid IN ('9') WHERE (term_node.tid IS NOT NULL) AND (term_data.tid IS NOT NULL) AND (node.status = '1') ORDER BY DESC LIMIT 0, 1 in /web/htdocs/www.oratoriodiferno.it/home/drupal/includes/database.mysql.inc on line 172.
buon ferragosto
mmm...
nn so come ma cambiando tema non ho più l'errore!
ottimo direi!
devi chiudere le virgolette per il campo data, quindi:
(FROM_UNIXTIME(node.created), '%Y%m%)
diventa
(FROM_UNIXTIME(node.created), '%Y%m%')
Dove è sta query non lo so, ma se cambiando tema non ti si resenta il problema FORSE è nel file template.php (anche se mi sembra molto strano), o in uno dei file tpl.php del tuo tema.
Ciao
Marco
--
My blog
Working at @agavee
il tema che stavo usando era quello di default: garland.
cmq controllerò. grazie mille
NO, allora il problema non è nel tema ma in qualceh modulo e il motivo che sia scomparso al cambio del tema è che non vedi più qualche blocco che genera l'errore, IMHO ti conviene capire quale è il modulo che produce quell'errore e risolvere, un bel cat con grep in pipe dovrebbe essere sufficiente per capire in quale file c'è il problema.
Ciao
Marco
--
My blog
Working at @agavee
scusa ma... cos'è un "cat con grep in pipe"?
cmq hai ragione..quando ho cambiato tema ho anche levato un paio di moduli..tra cui archive.
se hai una shell una cosa tipo:
cat *.module | grep (FROM_UNIXTIME(node.created), '\%Y\%m\%)
(ovvaimente mettendo a posto i caratteri di escape e impostando per cat la ricorsività nelle ridectory (non mi rocordo ma il paramentro mi sembra sia -r)
Ciao
Marco
--
My blog
Working at @agavee