There is a disconnect in the UI between what you see on the Date Time Formats admin page and when you go to Manage Display for a date-time field.

The Formats page is only listing (with Standard install profile), 3 formats. Apparently, locked formats are excluded from listing, which is inconsistent with other admin pages. Gabor points out that also this means the locked formats have no entry point for translating.

Also, if you then go to Manage Display for a content type (or other entity) where you have a Date Time field, and want to choose a format, you see the unlocked and locked formats both, in some apparently random order, and the names do not match what you see on the Formats admin page.

This is very confusing. We were trying to write hook_help() for this module and it came up ... how would you explain this to a novice user? It really just needs to be fixed.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Priority: Normal » Major

This is blocking a critical issue so probably it should be at least major.

Gábor Hojtsy’s picture

The same is true for languages, you cannot see the locked languages on the listing page but you can translate them and they are locked entities in the config system. The config translation module itself has overview screens (for those not having access to edit the original config) and *that* screen lists all regardless of locked-ness. I think this is mostly a UX question to answer to figure out the best way to do this.

vijaycs85’s picture

Status: Active » Needs review
FileSize
67.14 KB

I guess, there might be some reason for hiding, but this patch shows the locked datetime formats without any operations.

vijaycs85’s picture

FileSize
745 bytes

Here is the patch...

Gábor Hojtsy’s picture

Looking at the patch this sounds like it would display the translate operation if config translation is enabled? :)

jhodgdon’s picture

That screen shot looks promising, and the patch is nice and easy to understand!

Could you also patch the Manage Display list so it is ordered the same way (alphabetical)? See screen shot posted at https://drupal.org/files/issues/Menu_161.png on the Help issue.

jhodgdon’s picture

I also think that it would be helpful for people to know why they don't have Edit operations for the locked formats. Maybe just putting "Locked" in the Operations column, or having a Status column?

vijaycs85’s picture

#7: you mean like attached?

vijaycs85’s picture

#6: like attached?

Gábor Hojtsy’s picture

Displaying "Locked" in place of operations would not work because there may be operations on locked items, such as when enabling config translation module (as said above), which would already add the translation operation there, so locked ones would get operations but no edit/delete.

jhodgdon’s picture

RE #8/9: Yes and Yes.

If a status column is not added, I'm just wondering if people would be confused about why there are no operations on some of the formats. I actually have no idea why some are locked anyway -- ???

And what are those "HTML" formats anyway? They look more like ISO formats than HTML formats?

vijaycs85’s picture

FileSize
2.23 KB

#11: thanks for confirming. Here is the patch...

vijaycs85’s picture

Priority: Major » Critical

Making it is critical as this is blocking the critical #2091397: Create hook_help for Datetime module

vijaycs85’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#2119903: Show locked date formats in the UI

Ok, closing this as duplicate of #2119903: Show locked date formats in the UI

jhodgdon’s picture

Status: Closed (duplicate) » Needs review

Sorry, but that other issue and this one are not the same at all?

catch’s picture

Status: Needs review » Closed (duplicate)

I thought the same initially but I think the title of the other issue is misleading in terms of how it relates to this. All it's doing there is adding the uneditable system formats to the admin list - it doesn't change the validation at all which is what the title looks like.

Moving back to duplicate, but if you really think these are completely unrelated please re-open again, but would be good to have more details on why.

jhodgdon’s picture

Oh, you're right. I'll fix the other issue title.