Closed (works as designed)
Project:
Domain
Version:
7.x-3.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2011 at 19:23 UTC
Updated:
25 Jul 2012 at 19:15 UTC
I have 17,000 nodes and want to batch change all the content to be only assigned to one domain. Is there a quick way to do this?
Comments
Comment #1
blasto333 commentedI tried:
DELETE FROM domain_access WHERE realm = 'site_all' and then rebuilding the nodeaccess cache, but that shows the correct number of 0 nodes assigned to all affiliates, but when I click it, I see all the content.
Comment #2
scuba_flyYou can do this by using the module "Domain Content"
Not sure for version 7.x-2.16 but in version 7.x-3.x-dev this module is included.
if you go to admin/content you now have a new option "SHOWAFFILIATE PUBLISHING OPTIONS" to batch update all or any checked content.
for still seeing all content make sure you have the checkbox checked for administrators so content of other domains will not show up admins. or log out and see if it's still there. Not sure where this checkbox is hidden, but i saw it somewhere :)
Comment #3
summit commentedHi,
set this to active if that's ok. With the option shown in #2 you can change affilliate setting for the nodes which are shown...but I have 110 pages of nodes..
How can I alter all nodes at once for not showing on all domains, but only on the primary domain.
When this means a MYSQL query. thats ok by me. Better of course a setting for it.
Thans a lot advance for your reply
Greeting, Martijn
Comment #4
summit commentedForgot to set this to active. Greetings, Martijn
Comment #5
agentrickardWrite an update hook.
After running this update, you will be prompted to rebuild node access.
Comment #6
summit commentedHi,
Sorry to ask, but how do I get this update hook to "run". Do I need to add it to my Domain.install and than run update.php?
Thanks for your reply in advance!
Greetings, Martijn
Comment #7
summit commentedHi,
I added this peace of code temporarily to domain.install
This worked.
After doing this update I deleted this peace of code again from domain.install.
Greetings,
Martijn
Comment #8
agentrickardThat may cause a problem if you have to upgrade the module later. Drupal increments the update count in the {system}.schema column.
The next release will have an update 7309 or so, which will fail to run since your schema version is now set to 7599.
Update hooks like yours need to go in a custom module, Now you need to update your {system} table.
Comment #9
summit commentedHi, oeps sorry, which variable do I need to update please in the {system} table?
greetings, Martijn
Comment #10
agentrickard{system}.schema
Comment #11
summit commentedHi I changed back
Thanks for telling!
Greetings, Martijn