If you have a content type that has a space or underscore in the name then the default view mode for that type does not save correctly.

For example, I have a type called "Section landing" with a machine named call "section_landing". I can enable/disable contextual view modes for that type, but I cannot save a view mode to use.

Looking in the database you can see the setting got saved in this manner:

s:7:"section";a:1:{s:14:"landing_mobile";s:14:"mobile_display";}

Possibly related to something mentioned in a comment under #1887908: Error when trying to set global settings

Comments

beatnikdude’s picture

I just verified this issue in 7.x-1.x-dev on a clean install.

victoriachan’s picture

Hi,
I have this same problem too. I tried with a content types blog and news_item.

And when I checked the cvm_global_content_type_modes variable that gets saved, it says:

    [blog] => Array
        (
            [test_view_mode] => test_full_content
        )

    [news] => Array
        (
            [item_test_view_mode] => test_full_content
        )
victoriachan’s picture

Status: Active » Fixed

Hi,

I've discovered that this has been fixed in the 1.x-dev version. As mentioned in #1887908, a bandaid solution has been applied to us triple underscore as delimiter instead of single underscore.

Will mark this issue as fixed.

Thanks,
Victoria

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.