2

A client asked me to temporarily disabled all of its entries of one of its Site in a specific language. This entries should not be accessible anymore from their URL.

The quickest and cleanest way to hide them would be to delete this Site version, but this would result in deleting all related entries.

As far as I know, the only way to hide them temporarily is to visit each Entry, then disabled the Enabled for site option, and after that make some changes in menu template to hide this Site version.

As there's a very large number of Entries, this will be very time consuming. Is there any cleaner or faster way to do that?

2 Answers 2

0
  1. from the entry section of the control panel, select the site on which you want to disable all entries
  2. select the entries you'd like to disable
  3. use the set status dropdown and select "Disabled" enter image description here
3
  • This disables all versions within a same site group. This is not what I want, as in each site group I have multiple languages versions.
    – Romain P.
    Commented Sep 15, 2020 at 7:41
  • Strange, I just tested again and it only disables entries in the currently selected site, even if my 2 sites are in the same site group.
    – nstCactus
    Commented Sep 15, 2020 at 9:35
  • 1
    Thanks! This website is running an old Craft Pro 3.0.22 version: maybe there were a related issue in this one. I tried on a brand new Craft Pro 3.5.9, and entries were disabled as explained in your answer. That said, the SQL query would probably be a quickest choice in a case of hundreds of entries to disable.
    – Romain P.
    Commented Sep 15, 2020 at 10:08
2

I finally ended up with this SQL query, which result to disable all Entries of a site version:

UPDATE `craft_elements_sites` SET `enabled` = '0' WHERE `craft_elements_sites`.`siteId` = 2;

Where 2 is the siteId. After that, don't forget to clear the templates caches.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.