function _private_upload_migrate_private()
reports following problem...
user warning: Unknown column 'f.nid' in 'where clause' query: SELECT f.* FROM files f, node_access na WHERE f.nid = na.nid AND na.gid != 0 AND f.filepath NOT REGEXP "^uploads/private" GROUP BY f.fid in /users/home/progfrog/domains/photoremake.com/web/public/sites/all/modules/private_upload/private_upload.module on line 586.
... on the admin/user page.
The private upload configuration page at admin/settings/private_upload
reported: "There are 3 public files attached to private nodes. Click here to make them all private."
I clicked on the link, but the migration never went through. Instead the above error turned up.
I am not familiar with the code, but apparently there is no nid field in the file table; nid field that is used in the where clause.
Comment | File | Size | Author |
---|---|---|---|
#9 | private_upload-migrate_private-310722-9.patch | 877 bytes | jromine |
#3 | private_upload_migrate_patch.patch | 4.36 KB | alexharries |
Comments
Comment #1
jvieille CreditAttribution: jvieille commentedProbably the same problem for me, though somewhat different behaviour
I went to enabling Private Upload after installing this module for the first time while upgrading to D6.6
The process went successfully
I was happy seing several green notices and reading the following:
"There are 98 public files attached to private nodes. Click here to make them all private."
I clicked but only got a white page (no warning at this time). Nothing changed on the server, the files/private directory contains only 2 iles ".htaccess" and "privacy_test.txt"
Going back to the admin/settings/private_upload page, I got this warning:
"user warning: Unknown column 'f.nid' in 'where clause' query: SELECT f.* FROM files f, node_access na WHERE f.nid = na.nid AND na.gid != 0 AND f.filepath NOT REGEXP "^sites/default/files/private" GROUP BY f.fid in /home/psynapse/public_html/controlchaingroup/sites/all/modules/private_upload-6.x-1.0-rc2/private_upload/private_upload.module on line 586."
Refreshing the page makes the warning wanished
Hope this helps
Comment #2
rimu CreditAttribution: rimu commentedaround line 585, in the function called _private_upload_migrate_private, change this
to this
Comment #3
alexharries CreditAttribution: alexharries commented** EEP: don't apply this patch - I haven't tested it fully - see my next post instead please! **
Attached is a patch which should hopefully fix this issue (see http://drupal.org/patch/apply to find out how to apply this patch to an existing install, if you want to try it, but I wouldn't recommend using this on a live system! ;o).
/al
Comment #4
ñull CreditAttribution: ñull commentedI applied the patch and run the migration and got this error:
After removing the unexpected ')', I got the following message:
Comment #5
Lloyd CreditAttribution: Lloyd commentedAny update on this. I'm also getting a white screen when trying to migrate the public files attached to private nodes.
Comment #6
span CreditAttribution: span commentedMe too actually, anyone with a clue?
Comment #7
jvieille CreditAttribution: jvieille commentedI abandoned Drupal core file handling for File Framework.
This module offers total privacy and extensive flexibility in file management.
Comment #8
caw67 CreditAttribution: caw67 commentedthe patches are not in the new version!
Comment #9
jromine CreditAttribution: jromine commentedConfirm the change in #2 by rimu works. Current patch file attached.