Hola Joao, I posted before about customizing print.tpl to change the cck fields.
I managed to do it by using code retrieved by contemplates, but after the upgrade to 3.5, it does no longer work.
My custom print.tpl doesn't display the cck fields anymore, and I get an error in watchdog: 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 '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /var/www/vhosts/artblueprint.org/httpdocs/includes/database.mysql.inc on line 172.
Any ideas of what could it be, and what to do?
Desde ya muchas gracias
Tomas
Comments
Comment #1
jcnventuraI have no idea what might be the problem..
Try uninstalling the module and installing it again. Disable it in admin/build/modules, uninstall it in admin/build/modules/uninstall.
You will lose all your current print module settings, so if there's anything important, note it down before.
João
Comment #2
jcnventuraI have no idea what might be the problem..
Try uninstalling the module and installing it again. Disable it in admin/build/modules, uninstall it in admin/build/modules/uninstall.
You will lose all your current print module settings, so if there's anything important, note it down before.
João
Comment #3
tclusellas commentedThank you João, but it doesn't show up in uninstall, why could it be?
(Thanx for the prompt reply)
Comment #4
jcnventuraHi,
Your reply wasn't very clear..
So you uninstalled the module, and the problem no longer shows up? Or does it still occur?
João
Comment #5
jcnventuraAnother thing, after I reviewed the changes between 3.4 and 3.5..
Do you use $print["url"] anywhere in your template? I removed, but I am having second thoughts if that was wise..
João
Comment #6
tclusellas commentedHi João, sorry for taking so long in replying, I was away for some days.
No I don't use $print["url"]anywhere in my template. I was using mostly print $node and print $item, but they seem to have stopped working in 3.5
I borrowed the code from the content template, of the node page,
I also tried uninstalling an reinstalling but still didn't work, so I went back to the previous version.
Tomás
Comment #7
jcnventuraHi,
Thanks for the info. It has helped considerably in finding out what your problem was.. As 3.5 is actually a backport of a lot of the changes in the Drupal 6 version, I changed the code on how I call the template.
So, now (and in the future), you no longer have access in the template to the working variables that were used by the function that created the printer-friendly page.
I don't know whether $item ever worked for you (it's not one of the vars that I use), but $node worked because of that. I have committed a patch to the 5.x branch where you can get access to the contents of $node, but you have to replace all your refences to $node by $print["node"].. Or simply include a
$node = $print["node"]early in the template.The dev version should be compiled by the system in a few hours..
Comment #8
tclusellas commentedThank you very much for this changes, I'll try the new dev ASAP and will let you know of the result.
Tomás
Comment #9
jcnventuraNo further info received in two weeks.
João