Copied to clipboard

Flag this post as spam?

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


  • Cody Boucher 2 posts 93 karma points c-trib
    24 days ago
    Cody Boucher
    1

    cmsMedia has NULL mediaPath when umbracoMediaPath isn't "~/media"

    <add key="umbracoMediaPath" value="~/relocatemedia" />
    

    Setting this variable to something other than media gets a NULL value in the cmsMedia table in the mediaPath column.

    I'm able to add media but the thumbnails don't work properly. The pathing to the images also works but during the process of picking an image it treats the images as folder paths and blocks the selection.

    I manually updated the cmsMedia table to the path pulled from dataNtext from cmsPropertyData and the thumbnails started working.

    Am I missing something?

    UPDATE media
    SET media.mediaPath = JSON_VALUE(convert(nvarchar(max),d.dataNtext),'$.src') 
    FROM cmsMedia media 
    JOIN cmsPropertyData d ON d.contentNodeId = nodeId AND d.dataNvarchar IS NULL
    

    Running the above query fixes my issue but I'd rather not have to run that in every environment.

  • Alex Skrypnyk 5329 posts 19613 karma points MVP 3x admin c-trib
    21 days ago
    Alex Skrypnyk
    0

    Hi Cody

    Did you solve this issue?

    Thanks, Alex

  • Cody Boucher 2 posts 93 karma points c-trib
    1 week ago
    Cody Boucher
    100

    This issue has been resolved. I submitted a PR to get it fixed and it got included in the 7.15.3 release.

    https://github.com/umbraco/Umbraco-CMS/issues/6202

Please Sign in or register to post replies

Write your reply to:

Draft