Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled vs Enabled For Site is not very intuitive #2899

Closed
codyjames opened this issue May 17, 2018 · 26 comments
Closed

Enabled vs Enabled For Site is not very intuitive #2899

codyjames opened this issue May 17, 2018 · 26 comments
Labels
authoring ✍️ features related to author experience enhancement improvements to existing features

Comments

@codyjames
Copy link
Contributor

Description

In Craft 3, the "Enabled" vs "Enabled for Site" settings on an entry are quite confusing and not very intuitive.

Here are some examples:

  1. When editing a single entry, if setting "Enabled" to false and "Enabled for Site" to true I don't have a clear idea of what the outcome would be.
  2. In the entry list view, the "Set Status" bulk update dropdown just says "Enable" and "Disable" and I'm unsure which setting that would be toggling. It's also unclear if that is scoped to the current Site or not.

Additional info

  • Craft version: 3.0.7
@brandonkelly brandonkelly added enhancement improvements to existing features authoring ✍️ features related to author experience labels May 22, 2018
@brandonkelly
Copy link
Member

Agree, that should be made more clear. Thanks for pointing it out!

@codyjames
Copy link
Contributor Author

This bit me again just now. Is this not an issue others are having? Am I just not understanding something that others are?

@codyjames
Copy link
Contributor Author

Ooops!

@brandonkelly
Copy link
Member

Sorry I thought you were asking rhetorical questions in the original post.

  • Enabled is the global status of the entry. If this is disabled, the entry won’t be accessible anywhere. When you change this value, it is changed across all sites.
  • Enabled for site is the site-specific status of the entry. If this is disabled, the entry won’t be accessible from the currently-selected site only, but will still be accessible from other sites (assuming other sites still have it enabled).

@codyjames
Copy link
Contributor Author

Nope, not your fault. My original post wasn't asking any specific questions, just pointing out some confusing wording/behavior.

My current thinking is this should go back to the previous UI which I think showed the status of every site. I assume there were reasons for moving away from that though.

@codyjames
Copy link
Contributor Author

Ran into this again. This is really not intuitive. Folks think they are "Disabling for site" when they are actually globally bulk-disabling entries. This is not a small issue.

@brandonkelly
Copy link
Member

Just made some changes for the next release that should reduce the confusion.

First, on the Entries index page, “Disabled” has been relabeled to “Disabled Globally”, and a new “Disabled for Site” option has been added.

screen shot 2018-11-03 at 4 25 24 am

Second, within Edit Entry pages, “Enabled” has been relabeled to “Enabled Globally”, and “Enabled for site” has been relabeled to include the site name.

screen shot 2018-11-03 at 4 27 11 am

And if “Enabled Globally” is unchecked, then the site-specific status doesn’t even show up.

screen shot 2018-11-03 at 4 28 02 am

@bertheyman
Copy link

I see all of the above changes (really useful!), but can't see the global / site specific disable option on the overview. Just the regular enable / disable. Am I missing something here @brandonkelly ?

Using Craft 3.1.30 (latest edition)

@brandonkelly
Copy link
Member

@bertheyman The “Disabled for Site” option will only show up if a multi-site section is selected.

@bertheyman
Copy link

Oh I see, thanks for the clarification!
I was looking at a multi site single, which confused me.

@amityweb
Copy link

How does one "Enabled for Site" only now? So the entry is only enabled for this site and then all other sites its disabled (unless they have it selected)?

If I disable "Enabled Globally" the setting for "Enabled for Site" scrolls up and disappears, and the entry is not accessible on the front end anymore. So I cannot diasable "Enabled Globally" but keep "Enabled for Site"

At the moment it looks like I have to "Enabled Globally" then disable "Enabled for Site" on all the sites I dont want it on. So say its 15 sites, we create an entry, then edit 14 other pages to disable it?

Sorry if I misunderstand, but thats how it looks to me. If this is the case, how does on "Enabled for Site" only?

@brandonkelly
Copy link
Member

At the moment it looks like I have to "Enabled Globally" then disable "Enabled for Site" on all the sites I dont want it on. So say its 15 sites, we create an entry, then edit 14 other pages to disable it?

That’s correct. But I can see how the “Enabled Globally” wording can be confusing now. Will have to think of a better way to phrase that.

@amityweb
Copy link

amityweb commented Jul 11, 2019

OK but any reason why its backwards, its a bit of a long winded process to have an entry on a single site. I have not ever come across a situation where you may have a page on all sites except one. Its quite common on multi-language sites that a single country would have a page just for that country.

What are the options in the meantime? I was going to create a separate section which is saving entries only in that site, but I notice Commerce Products does not have this option. Its not only pages that need to be individual to just a single country, but we would have some products only sold in a single country.

Desired setting here!

Screenshot at Jul 11 19-29-01

@brandonkelly
Copy link
Member

So to be clear, for an entry to be enabled somewhere, it has to be both Enabled Globally and Enabled for . In the above screenshot, that entry isn’t going to show up on any sites, until “Enabled Globally” becomes ticked on. Then and only then, it will start showing up for whichever sites have the site-specific status ticked on as well.

It works this way because it does. There’s not good reason it can’t be improved. And we will improve it.

@engram-design
Copy link
Contributor

@brandonkelly Might only be a slight niggling thing, but when an entry has “Enabled Globally” disabled, the site dropdown shows all entries as being enabled. I suppose they technically are, but its also confusing for users because it doesn't convey the correct status. You'd have to go through each entry and set enabledForSite to be false.

@brandonkelly
Copy link
Member

@engram-design thanks for pointing that out, fixed for the next release (7fc874f).

brandonkelly added a commit that referenced this issue Jan 11, 2020
@brandonkelly brandonkelly added this to the 3.4 milestone Jan 11, 2020
@brandonkelly
Copy link
Member

I’ve just made some big improvements to multi-site entry status management for Craft 3.4. I realized that for multi-site entries, there’s really no point in managing the entry’s “global” status, besides as a minor UI convenience when you need to batch-enable/disable an entry everywhere, which was probably not worth all the added confusion. (And in hindsight (it’s 2020 after all), “Enabled globally” sure does seem like something that would take precedence over the “Enabled for site” setting.) And then there’s the fact that it gave users a way to disable/enable entries on sites that they didn’t have permission to view in the first place (#2817) 😱

So here’s what’s changed…

First, the “Set Status” action no longer lists separate “Disabled Globally” and “Disabled for Site” options for multi-site sections; just “Disabled”. When “Disabled” is selected, all single-site entries will get disabled globally, and all multi-site entries will get disabled only for the current site.

An expanded “Set Status” element action menu with “Enabled” and “Disabled” options

Second, the status settings for multi-site entries has been redesigned. Now only the current site will be shown by default:

An entry’s status setting, showing that the entry is enabled for “Site A”

If you click that ellipsis button button, it will expand to show all the sites your user account has permission to edit:

An entry’s status setting, showing that the entry is enabled for “Site” and “Site B”

From there you can toggle the entry’s status across each of those sites individually, or batch set them using the “Enabled everywhere” lightswitch. (Note that is not a direct replacement of the old “Enabled Globally” setting though; just a convenience for batch-enabling/disabling the entry across all of the editable sites.)

@brandonkelly
Copy link
Member

Here’s a gif of the status setting in action:

An animated GIF of an entry’s status settings being interacted with

@engram-design
Copy link
Contributor

This seems pretty neat (and nice one on the half-on lightswitch). The biggest gripe with multi-site authoring is the fact users have to create the entry, which is enabled in all sites (or controlled by the sections default status), after which they need to switch to each site and disable. They'd much prefer managing it's status across all sites from on central, and immediate location, as you've done here.

This seems like a much better solution - I'm guessing reserved for 3.4?

@amityweb
Copy link

Absolutely brilliant. Thanks a lot.
Would it be on Commerce also for products? Sometimes my retail customers sell a product in one country not others for example. Although its a great move to have it for entries for now, thanks a lot.

@brandonkelly
Copy link
Member

@amityweb We do plan to bring it to Commerce, but probably not in time for 3.0.0, which is planned for the end of the month.

@vnali
Copy link
Contributor

vnali commented Jan 25, 2020

this new improvement is excellent @brandonkelly
but i have two questions

  • i noticed that when a section has multiple sites, enable column value in element table is always 1, even if entry is disabled for every sites. am i right? is that ok?
  • for a custom element type, i tried to add this new functionality to my element edit page. i copied new added lines from _layouts/element.html to my edit.twig, and at the end i assigned settings to Craft.drafteditor -i don't need draft and revision for my element type though-.
    it seems if i copy enabledForSiteValue() function from BaseEntriesController.php to my controller i can have this functionality for my custom element type.
    my question is does this functionality planned to be reuseable or is it written only for entries support?

@brandonkelly
Copy link
Member

i noticed that when a section has multiple sites, enable column value in element table is always 1, even if entry is disabled for every sites. am i right? is that ok?

Correct, and yes it’s ok, as we’re basically delegating entry enabled status to the site-specific status now.

does this functionality planned to be reuseable or is it written only for entries support?

Yeah it can be reusable. Main thing is that you must tell the element what all of its site-specific statuses should be when setting enabledForSite.

// Only enables/disables the element for the current site:
$element->enabledForSite = true;

// Enables/disables the element across multiple sites  by their IDs:
$element->enabledForSite = [
    1 => true,
    2 => false,
];

@ArtDepartmentMJ
Copy link

@brandonkelly is there any follow-up on this for Commerce?

@santanu-adak-2019
Copy link

santanu-adak-2019 commented Nov 17, 2021

Just made some changes for the next release that should reduce the confusion.

First, on the Entries index page, “Disabled” has been relabeled to “Disabled Globally”, and a new “Disabled for Site” option has been added.

screen shot 2018-11-03 at 4 25 24 am

Second, within Edit Entry pages, “Enabled” has been relabeled to “Enabled Globally”, and “Enabled for site” has been relabeled to include the site name.

screen shot 2018-11-03 at 4 27 11 am

And if “Enabled Globally” is unchecked, then the site-specific status doesn’t even show up.

screen shot 2018-11-03 at 4 28 02 am

I want to add "Enabled Globally" option in each entry page?

I have posted on this topic Can you please explain me, See the link below

https://craftcms.stackexchange.com/questions/38640/how-to-add-enabled-globally-in-each-entry-page

@brandonkelly
Copy link
Member

@santanu-adak-2019 I responded to your Stack Exchange post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authoring ✍️ features related to author experience enhancement improvements to existing features
Projects
None yet
Development

No branches or pull requests

8 participants