Closed (fixed)
Project:
Protected Node
Version:
6.x-1.5
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
17 Jun 2010 at 07:51 UTC
Updated:
28 Apr 2011 at 23:01 UTC
Jump to comment: Most recent file
tolmi,
The test to know whether a node is protected uses db_affected_rows() which always returns 0 on a SELECT. (which makes sense since SELECT does not affect anything... and of course, MySQL has the opposite problem which is at times it returns 0 when you do an UPDATE which does not affect a row because the values are the same...)
Anyway, there are many different solutions, the one I propose is in the attached patch. Without that patch, the module is not functional in PostgreSQL (i.e. it looks like the node is not protected even though there is a row there and when updating you get an SQL error saying that the row already exists and thus you cannot INSERT INTO.)
Thank you.
Alexis Wilke
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | protected_node-postgresql-6.x.patch | 547 bytes | AlexisWilke |
Comments
Comment #1
claar commentedAm I blind, or did you forget to attach the patch? I'm seeing the same behavior here.
Comment #2
AlexisWilke commentedNo no... it's here, look:
Comment #3
AlexisWilke commentedOkay, this is now checked in.
http://drupalcode.org/project/protected_node.git/commit/e94ae30
Thank you.
Alexis