I just installed the module on my website and am getting the following error:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'protected_node_is_protected' in 'field list': SELECT protected_node_is_protected, protected_node_passwd, protected_node_passwd_changed, protected_node_show_title, protected_node_hint FROM {protected_nodes} WHERE nid = :nid; Array ( [:nid] => 1 ) in protected_node_load() (line 752 of /home/bluesky/public_html/sites/all/modules/protected_node/protected_node.module).
I ran update.php, but no updates were found.
Comments
Comment #1
AlexisWilke commentedThere shouldn't be any updates yet, the module is pretty much brand new! 8-)
I checked just in case, I only maintain 6.x, but was wondering whether the field would have been removed.
The .install script includes the field in the schema. Not too sure why it wouldn't work...
Comment #2
keith_k commentedSorry I wasn't clear at first. The problem is that nothing happens when I run update.php. The message I get is "Installation tasks: No pending updates." Sorry for the confusion around the word "updates."
Comment #3
AlexisWilke commentedkeith_k,
Did you do an upgrade from 6.x to 7.x or just a new install in 7.x?
In the first case, it would be a transition problem, although I think that the table hasn't changed. If it's a new install, then you never get an update.php on new installs anyway.
Thank you.
Alexis
Comment #4
keith_k commentedI had an existing 7.X website and tried to install the module using the normal proceedure (download the module, enable it, go to update.php). As soon as the module was enabled, I started getting the error message (on any page with 1 or more nodes).
Comment #5
zilverdistel commentedkeith_k,
I tried to reproduce the error by installing the module on a vanilla drupal 7 install and adding some nodes, but I didn't experience any problems.
Maybe something went wrong during installation. Could you try disabling, uninstalling (explicitly!) and then re-installing the module? Did you find any related messages in the watchdog log?
thanx,
zilverdistel
Comment #6
keith_k commentedI uninstalled completely and then reenabled the module. I then got this error message at the top of my home page.
these errors were in the log:
- Warning: Illegal offset type in isset or empty in drupal_lookup_path() (line 158 of /home/bluesky/public_html/includes/path.inc).
- Notice: Array to string conversion in DatabaseStatementBase->execute() (line 2135 of /home/bluesky/public_html/includes/database/database.inc).
- Notice: Array to string conversion in DatabaseStatementBase->execute() (line 2135 of /home/bluesky/public_html/includes/database/database.inc).
- Notice: Array to string conversion in DatabaseStatementBase->execute() (line 2135 of /home/bluesky/public_html/includes/database/database.inc).
Comment #7
keith_k commentedJust realized the errors go away if I disable Boost.
Comment #8
AlexisWilke commentedIn D6 there was a function to "support" boost (avoid the cache on protected nodes) with this function:
It probably changed in D7!
At this point, commenting out that function may help, although if a node is "de-protected" by an anonymous user and boost caches it... it becomes public.
Thank you.
Alexis
Comment #9
patrickroma commentedIs there an updated version for 7.x to support boost?
Comment #10
izus commentedComment #11
grimreaperHello,
Here is a patch that prevents the site from crashing when boost and protected_node are enabled simultaneously.
As I discover how to use boost module with this issue, I don't know if it's ok or not.
I just check that if an anonymous user access a protected node, another anonymous user (I test using another web browser) can't access this node without entering the password.
Thanks for the review and the test.
Comment #12
grimreaperI have remade the patch because the last one was no more applyable.
Comment #13
malberts commented#12 seems to work with the latest dev so far.
Comment #14
izus commentedOk thanks for testing and for the patch
this is now merged
Comment #16
grimreaper