Copied to clipboard

Flag this post as spam?

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


  • Benjamin Howarth 300 posts 766 karma points c-trib
    Sep 01, 2015 @ 15:17
    Benjamin Howarth
    0

    Courier doesn't copy media with relation

    We have Courier 2.50.1 installed on two test environments (with only a change in subdomain). We can successfully Courier content items over, however media items are copied but without the corresponding file items. We are using an Amazon S3 file system provider (Umbraco.Storage.S3 package by Elijah Glover). The UmbracoTraceLog shows us nothing with regards to any issues, but the Courier log shows us this repeated over and over:

    2015-09-01 15:52:19,409 [9] ERROR Umbraco.Courier.Core.ItemCrudProvider - [Thread 85] An error occurred in RetrieveItem<T>
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Umbraco.Courier.Persistence.V6.NHibernate.Persisters.TagRelationsItem.RetrieveItem(ItemIdentifier itemId)
       at Umbraco.Courier.Core.ItemCrud`1.RetrieveItem[T1](ItemIdentifier itemId)
       at Umbraco.Courier.Core.ItemCrudProvider.RetrieveItem[T](ItemIdentifier itemId)
    2015-09-01 15:52:19,690 [9] ERROR Umbraco.Courier.Core.Diagnostics.Logging.RevisionLog - [Thread 85] [Error]; Item Id: a5591e0c-70db-4c56-afd4-53f3e5deb9f6; Caller: Umbraco.Courier.Persistence.V6.NHibernate.NHibernateProvider; Process: PersistenceManager; Msg: Could not retrieve item: 
    
     System.NullReferenceException: Object reference not set to an instance of an object.
       at Umbraco.Courier.Persistence.V6.NHibernate.Persisters.TagRelationsItem.RetrieveItem(ItemIdentifier itemId)
       at Umbraco.Courier.Core.ItemCrud`1.RetrieveItem[T1](ItemIdentifier itemId)
       at Umbraco.Courier.Core.ItemCrudProvider.RetrieveItem[T](ItemIdentifier itemId);
    System.Exception: Error logged
    

    The media is related using a parent-child relationship (which is setup on both source and destination).

    I can't log an official ticket as the person who has the credentials to log into the account is on sick leave today. Any help from HQ/core would be appreciated.

    Thanks,

    Benjamin

  • Paul Sterling 714 posts 1479 karma points MVP 4x admin c-trib
    Sep 01, 2015 @ 20:32
    Paul Sterling
    0

    @Benjamin

    As you probably already guessed the suspect is the S3 provider. This is not an issue with the Standard or Azure provider so we'd first look at the differences in how the S3 and the Azure provider store the media - have you done that already?

    Of course, any details you can provide as to how the provider works and your specific configuration will help us in pointing you in the right direction.

  • Per Ploug 865 posts 3476 karma points MVP admin
    Sep 02, 2015 @ 10:42
    Per Ploug
    0

    Also, a quick thought on the posted error, that is not actually related to a relation, but tags - in the latest 2.51 nightly builds there's been several fixes to this, so you could try that as well.

    normally the resolver responsible for uploaded files ignore files not actually in the /media/ folder, so normally these providers are not issue

  • Benjamin Howarth 300 posts 766 karma points c-trib
    Sep 02, 2015 @ 16:05
    Benjamin Howarth
    0

    Thanks guys - I wasn't sure where to begin on this one. We've decided to give the nightly a try and see if that works - otherwise I'll be source-diving into the S3 provider to try and catch the error there.

  • Benjamin Howarth 300 posts 766 karma points c-trib
    Sep 07, 2015 @ 12:00
    Benjamin Howarth
    0

    Ok, so this gets more interesting. The bug with TagProviderItem appears to be no longer cropping up - I discovered that in the courier.config, the relation is called relateOnCopy whereas in the DB the relation is relateDocumentOnCopy.

    Now, the media is getting copied, but only to physical file system, not to virtual one. Is there an event I can hook into to try and force the file to be uploaded to S3?

  • Paul Sterling 714 posts 1479 karma points MVP 4x admin c-trib
    Sep 07, 2015 @ 15:21
    Paul Sterling
    0

    @Benjamin

    Courier "creates" media on the target so the configured filesystem provider should just create the media wherever it is set to. If that's not the case perhaps the S3 provider isn't using the correct approach. Could I suggest you have a look at the source for the Azure Blob provider to see how that's done? That provider works as expected with Courier media deployments without any additional configuration.

    If that doesn't help, could you let us know your specific config and repro steps?

  • Benjamin Howarth 300 posts 766 karma points c-trib
    Sep 07, 2015 @ 16:46
    Benjamin Howarth
    0

    Hey Paul - which Azure provider, this one?

  • Paul Sterling 714 posts 1479 karma points MVP 4x admin c-trib
    Sep 07, 2015 @ 17:44
    Paul Sterling
    0

    Yes, that's the one.

Please Sign in or register to post replies

Write your reply to:

Draft