Closed (fixed)
Project:
PrintFriendly & PDF
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 Aug 2009 at 20:39 UTC
Updated:
13 Sep 2009 at 20:40 UTC
"user warning: Table 'iconra_cms1.drupal_printfriendly_node' doesn't exist query: SELECT printfriendly_override FROM drupal_printfriendly_node WHERE nid = 225 in /home/iconra/public_html/media/drupal/modules/printfriendly/printfriendly.module on line 108."
I'm getting this (or a similar error, but with a different nid) error on admin/build/modules and all my node pages after installing and enabling printfriendly. Has installation not worked properly? Any ideas how I can fix this? Any tables to create or a SQL statement I can run?
Thanks.
Comments
Comment #1
Phil Wolstenholme commentedObviously iconra_cms1.drupal_ is just specific to my server and Drupal table prefix :)
Comment #2
anonIt looks like the script cant find the database table.
If you still have the same error, try running
Comment #3
Phil Wolstenholme commentedI tried that (thank you very much for such a quick response!) but even then the button did not appear, even with permissions set, the 'show on nodes' checkbox checked in printfriendly settings, and printfriendly enabled for the content type...
I think installation might have been aborted, as my admin/modules section sometimes comes up with an error, or takes too long to load so I stop and click the update button again. I'm thinking I might have messed up the installation, so I might try and remove all traces of printfriendly and then reinstall it - unless you can think of anything else I should try? What should I delete? The module files, the printfriendly_node, printfriendly rows in the variables table?
Thanks for your help anon!
Comment #4
anonTry uninstalling it (admin/build/modules/uninstall), the uninstall hook will delete the printfriendly table and all the printfriendly variables in the variable table.
Then try installing it again.
Comment #5
anonComment #6
Phil Wolstenholme commentedHmm, the plot thickens!
There isn't a printfriendly entry in the table of modules with uninstall hooks!
Comment #7
anonOh sorry, forgot to tell you that you have to disable the module first.
When the module is disabled it will apper in the uninstall table.
Comment #8
Phil Wolstenholme commentedThanks for the uninstall tip! Oops...
I get "warning: Invalid argument supplied for foreach() in /home/iconra/public_html/media/drupal/includes/common.inc on line 3216." when enabling the module after reinstalling it, and the button still does not appear in the links section of a node, still, at least there are no database errors this time.
So the module is enabled, permissions set, in printfriendly settings the show on all nodes checkbox is set, just to be safe under my content type printfriendly is also set, but still nothing is being output to the links section :(
Comment #9
Phil Wolstenholme commentedAh, I've just been to a node edit page and found that I have to enable printfriendly per node. Even with creating new nodes by default the 'Show a printfriendly button on this node' is not selected, so no button is added.
Could it be made so that enabling printfriendly adds buttons to all nodes without having to do it manually? Unless I've configured the module incorrectly (which is entirely possible!) it seems a bit off having things set up this way :)
Comment #10
anonThe foreach() error has something todo with the installation of the database table.
Perhaps it was just a one-time-error?
You can enable the 'Show a printfriendly button on this node' for all new content, but not the old right now.
Your suggestion is good :), I'll see what I can do to create a function that will set the "Show a printfriendly button on this node" flag on all old nodes to. Feel free to post a "feature request".
Do you consider this issue as solved?
Comment #11
Phil Wolstenholme commentedYes thanks, I'll raise a feature request later :)