Prevent ImageVault from creating a default XHtmlString settings?

Member since: 2010

How can I prevent ImageVault from adding default XHtmlString settings to DB? 

Whenever there is a nuget restore, I get the following two messages:

"Performing Update of ImageVault properties in EPiServer
No database upgrade is necessary"

Then, the settings is saved to DB and set as default (and overrides my default one, since mine is From code).

Does anyone know if there is a setting for this?

BR,
Marija

#180373 Jul 07, 2017 17:17
  • Hi Marija.

    When you get the message "No database upgrade is necessary", the nugetpackage will not modify anything so I think the problem may be located elsewhere.

    One way Imagevault may affect property settings is if you apply PropertyMediaSettings to properties in your code project.

    A page type example:

            [PageTypeProperty(Type = typeof(PropertyMedia), Tab = typeof(Information), UniqueValuePerLanguage = true, SortOrder = 3880)]
            [PropertyMediaSettings(Height = 240, ResizeMode = ResizeMode.ScaleToFill)]
            public virtual MediaReference ArticleImage{ get; set; }
    

    The PropertyMediaSettings above attribute will force the height of the image to 240 pixels, while the width will depend on the original image's aspect ratio.

    If you make manual changes to this setting from admin mode, it will work just fine until you recompile the project and the settings from code are applied all over again. So if the hardcoded settings aren't good enough, either modify its parameters- or remove the PropertyMediaSettings attribute entierly.

    Best regards

    Richard

    #180470 Jul 12, 2017 10:57
  • Member since: 2010

    Hi, Richard,

    Thx for your answer.

    I don't have any issues with MediaReference (at least I don't see the connection).

    What annoyed me was that I get a new XHtmlString settings that have been recreated and set as Manual default after each build. The mistake I was making was that I kept deleting them from admin mode, but now I just unset them as default and all is fine. I would prefer not to have them at all, but it's not a big deal since they are not used anywhere.

    See: http://prntscr.com/fuogin

    BR,
    Marija

    #180471 Jul 12, 2017 11:08