Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Paul 184 posts 646 karma points
    Sep 30, 2020 @ 12:38
    Paul
    0

    Can't protect member groups when total length of protected groups exceeds 255 chars

    Hi Richard,

    We used Media Protect on various sites, we hit an issue today for the first time (Umb 7.15.3 with Media Protect 2.1.1 FYI)

    We have a site with lots of member groups, we were getting an issue with save api call when trying to add additional member groups to the protected list. This is message in the back office:

    https://mysite.com/umbraco/backoffice/mediaprotect/mediaprotectdialogapi/save 500 (Internal Server Error)

    The error in the logs was as follows:

    ERROR MediaProtect.Access.MediaAccess - Mediaprotect Error protecting media : System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.

    On investigation it appears the "Roles" column in the "MediaProtectAccess" tbl is limited to 255 chars.

    I've updated this on my dev platform to be 1000 chars and that seems to have resolved the issue; we're actually using just under 700 chars for them all.

    ALTER TABLE [MediaProtectAccess] ALTER COLUMN [Roles] nvarchar(1000) NULL

    Knowing the package as you obviously do, can you foresee any issue with us updating this to give us the headroom to accommodate more member groups?

    Thanks!

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Sep 30, 2020 @ 12:43
    Richard Soeteman
    0

    Hi Paul,

    255 was the default so you should be good I think. Quite a few groups you are using,....

    Best,

    Richard

  • Paul 184 posts 646 karma points
    Sep 30, 2020 @ 13:15
    Paul
    0

    Ok thanks Richard, just checking that was ok to do - it seemed to work fine etc.

    Thanks for the speedy response :-)

Please Sign in or register to post replies

Write your reply to:

Draft