Closed (won't fix)
Project:
Taxonomy Access Control Lite
Version:
5.x-1.1
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2008 at 23:15 UTC
Updated:
26 Jun 2013 at 02:24 UTC
I'm having an urgent problem stemming from TAC-Lite. (I'm 99% sure it's TAC Lite related, anyway.) I installed TAC Lite and then decided I didn't want to use it, so I unchecked the box in admin > modules. Now, all content that I edit, or any new content that I create becomes inaccessible to anonymous users. This is really bad. Does anyone know how I can fix this? It seems like the opposite to the problem described here, but I'm sure it's related to the same thing: http://drupal.org/node/66509.
Comments
Comment #1
Dave Cohen commentedThe solution is to rebuild permissions, which an administrator can do at q=admin/content/node-settings
Possibly, the module should do this automatically when uninstalled, or at least provide a message to help.
Comment #2
moshe weitzman commentedog does this on hook_uninstall and it works quite well. without this, you really leave sites in a bad state. they can't rebuild when there are no node access modules present.
Comment #3
Dave Cohen commentedIt bothers me that the "rebuild permissions" button disappears like that. I've spent a while looking for it in the past. But it will appear if there are rows in node_access, even after tac_lite has been disabled.
Do you have any concerns regarding permissions? That is, someone could disable the module without "administer nodes" privilege, and that is usually required to rebuild the permissions. Also, the rebuild could take so long, should it really be done on uninstall without any confirmation? (I think the answer is yes, but not sure).
Comment #4
gpk commentedOr you could use http://api.drupal.org/api/function/hook_disable/5 - it's after disabling the module that I often needed to do this rather than after uninstall. Presumably the best you could do with this would be to output a dsm, since rebuilding the permissions while tac_lite is still enabled would presumably not have the desired effect (well, I imagine it would be slightly harder to get this to work)?
Yes, the button rebuild permissions button *should* be there (and is, at least usually!) after disabling tac_lite.
Comment #5
nancydruActually if TAC_lite is your only access control module and you disable it, the rebuild button probably WILL disappear.
From node.module:
Comment #6
Leeteq commentedThere should be information about this in the text describing the module on the module page.
Comment #7
nancydruThere are many posts in the forums about this. "Experimenting" with access control modules is a recipe for disaster. One should not be installing modules unless one has a documentable need for them. Uninstall procedures are getting better, but this is an area that many contrib developers just don't spend much time at.
Comment #8
gpk commentedAFAICS the Rebuild Permission button is normally available immediately after disabling TAC_lite since in most cases you won't have just 1 row in {node_access}. After rebuilding then the button does disappear. The main problem I can see is on test/experimental sites when the module has only inserted one row in {node_access} and then the button won't appear after the module is disabled. This is a separate core bug I suggest.
@Dave Cohen (#3): I think that if someone has sufficient permissions to enable/disable the module and thereby "leave the site in a really bad state" then they should be allowed to rebuild the permissions. The problem with how long the rebuild takes could be handled in D6 via Batch API.
In D5 maybe therefore a convenient way forward is just to implement something like:
You could even link directly to the admin/content/node-settings/rebuild page, but that might be counter-productive given that that's not the usual way of getting there.
Although node_access_rebuild() is not called in tac_lite_install() - which is fair enough since in order to get the module to do anything the user has to visit the tac_lite settings page (after which the permissions *are* rebuilt), a rebuild can be necessary after re-enabling the module (e.g. disable it, rebuild permissions, then re-enable: the {node_access} table will now have just the default row). Therefore IMO it would be useful if a similar message were output via hook_enable().
@DanielTheViking: maybe you could suggest some updated texts to Dave which emphasise the point about Rebuilding permissions, for him to use on the module's Project page, in the README.txt and on the Help page the module provides.
Hope this is helpful,
gpk
Update:
(See http://api.drupal.org/api/function/node_access_rebuild/6.) Although I should say it looks as though the rebuild *only* happens automatically if you have just disabled a node access module and none remain enabled. In all other cases, a flag "node_access_needs_rebuild" is set, which will cause an appropriate warning/error message to be displayed prominently.
Comment #9
Leeteq commentedOn the module page, add this text:
"PS. You may need to rebuild the nodes permissions table when disabling/uninstalling this module (ref. readme.txt)."
And under "Notes" in Readme.txt, change this:
"If behavior of this or any other access control module seems to be incorrect, try rebuilding the node access table. This may be done under administer >> content management >> post settings. There is a button there labelled "rebuild permissions"."
To this:
"Either if experiencing problems, or when disabling/uninstaling this module, you may need to rebuild the node access table (permissions). For that, you need the "administer nodes" permission. A rebuild button can be found at administer >> content management >> post settings."
Add an "Uninstall" section with this text:
- see "notes".
Comment #10
tinker commented5.x version no longer supported.