1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MG 1.1 media_cache field contains old URLs - how to edit/change them?

Discussion in 'Media Gallery Support' started by CyclingTribe, Jun 9, 2016.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    I previously served images through a secondary .co.uk domain (to speed up page loading) but stopped doing this a week ago when I repointed the primary domain at Cloudflare.

    I've just discovered that my sitemap.xml still contains reference to the old ".co.uk" domains, specifically in the media_cache blob field in the xengallery_album table [snippet]:
    Code:
    ... s:32:"56c36bde1a4e3c5f9da9192bb94f4dd7";s:12:"thumbnailUrl";s:88:"http://img.cyclechat.co.uk/data/xengallery/69/69997-56c36bde1a4e3c5f9da9192bb94f4dd7.jpg";}i:7648;a:10: ...
    
    Is there any way I can update these (without manually re-saving every album)?

    Thanks,
    Shaun :D
     
  2. CyclingTribe

    CyclingTribe Well-Known Member

    Sorted. (y) Used an SQL replace query:
    Code:
    UPDATE xengallery_album SET media_cache = replace(media_cache, 'img.cyclechat.co.uk', 'www.cyclechat.net');
     
  3. Mike

    Mike XenForo Developer Staff Member

    Eek, don't run that query! That will break the field. You're changing the lengths of things so there are knock on effects in that.
     
  4. Mike

    Mike XenForo Developer Staff Member

  5. CyclingTribe

    CyclingTribe Well-Known Member

    So it does ... http://www.cyclechat.net/media/albums?page=2 :eek:
    Erm ... nope - v1.1.5 !:eek:

    Would simply upgrading to 1.1.6 negate the query/change/need for the cached URL? (I can do this tonight to resolve it if that is the case ;)).
     
  6. CyclingTribe

    CyclingTribe Well-Known Member

    Okay, I've reversed the query and the album covers are all back ... and I'll upgrade XFMG tonight.

    Will upgrading remove the album thumbnail URLs from sitemap.xml?
     
  7. Mike

    Mike XenForo Developer Staff Member

    The URLs are built from the internally stored information in 1.1.6, so it should resolve it automatically (when the sitemap is rebuilt).
     
    CyclingTribe likes this.
  8. CyclingTribe

    CyclingTribe Well-Known Member

    Excellent - thanks Mike. (y)
     

Share This Page