Copied to clipboard

Flag this post as spam?

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


  • Nick 101 posts 122 karma points
    Jul 26, 2013 @ 17:20
    Nick
    0

    Bug with content pickers in Courier's latest version

    Hi,

    I've been using the latest nightly build Courier_2.7.8.15.v6.zip and it seems to have a bug in it.

    When publishing a node with content pickers, it assigns on the target server the content using Id's instead of folder structure so if the Id's aren't the same all the content gets messed up.

    For example if we have

    Node1 (Id 1) 
    Node2 (Id 5)
    Node3 (Id 2)
    → Node 3.1 (Id 3)
    → Node 3.2 (Id 4)

    and on ther server we have the same thing but:

    Node1 (Id 3) 
    Node2 (Id 5)
    Node3 (Id 4)
    → Node 3.1 (Id 2)
    → Node 3.2 (Id 1)

    Then if on the first server Node 3 has two content pickers for 3.1 and 3.2, then after publishing what will happen is, Node 3 on the target server will have Node 1 and Node 3 in the place of the selected content instead of Node 3.1 and Node 3.2

    Is that a known problem and is there a way to circumvent it?
    Is there a way to force courier to assign content using structure/page title instead of Ids?

    Furthermore is there a way to seek a more advanced solution, perhaps write a custom resolver that might fix this?

    Any suggestion and help is very much appreciated.
    Many thanks

  • Martin Griffiths 801 posts 1212 karma points c-trib
    Jul 26, 2013 @ 17:33
    Martin Griffiths
    0

    Nick

    I'm not entirely with you on your problem..

    Are you saying that as a consequence of Courier picking different node Id's on the target, content is getting mixed up/damaged? Does the content look ok on the target, despite the Id's changing?

    M.

  • Nick 101 posts 122 karma points
    Jul 26, 2013 @ 17:37
    Nick
    0

    Nothing breaks but the content picker on the target is not the selected page on the source.

    So you select a page called "Page1" on the source and publish, and on the target you have "Page 34".
    The reason is that the Id of Page1 on the source is that same as the id of the Page34.
     
    This means that Courier assigns the content picker selections using page Ids instead of structure/page names and if your pages have different Ids on those two servers, you'll run into a bit of trouble with Courier.

  • Nick 101 posts 122 karma points
    Jul 29, 2013 @ 13:22
    Nick
    0

    Any idea about this?

    Is it possible to override the default behaviour and add a custom resolver? 

  • Martin Griffiths 801 posts 1212 karma points c-trib
    Jul 29, 2013 @ 13:26
    Martin Griffiths
    0

    Hi Nick

    Courier all the way from v1.3 should resolve node Id's between the source and target. Content pickers shouldnt get mixed up at all, your problem seems quite unusual.

    It's virtually impossible to guarantee the same Id's will remain on transfer and you should never assume the same Id's will remain.

    M.

     

  • Nick 101 posts 122 karma points
    Jul 29, 2013 @ 13:29
    Nick
    0

    It doesn't resolve the Ids at all in my case.

    Is there a way to force it to work properly? Maybe some config setting?
    I tried older versions as well and there are other problems with the older versions.

    I am keen to use the latest version and somehow make that work.
    Maybe write a custom resolver and make sure the Ids are assigned properly programmatically?

    Is there an example of that? 

  • Martin Griffiths 801 posts 1212 karma points c-trib
    Jul 29, 2013 @ 13:47
    Martin Griffiths
    0

    It would be nuts to write a custom resolver for something that is part of the product, and in any case likely to cause conflict with the way Courier resolves Id's internally.

    M.

  • Nick 101 posts 122 karma points
    Jul 29, 2013 @ 14:46
    Nick
    0

    Okay so I'm looking for ways to get this working.

    It's evident that courier does have a critical bug that surfaces under certain conditions.

    I can try to give you as much information as you want to reproduce it but I can't see how I would fix this myself

  • Nick 101 posts 122 karma points
    Jul 29, 2013 @ 15:00
    Nick
    0

    Okay the idea I have is to create a custom content picker and then write a resolver for that.

    Unless you guys come up with a fix first of course 

  • Martin Griffiths 801 posts 1212 karma points c-trib
    Jul 29, 2013 @ 15:29
    Martin Griffiths
    0

    No I dont i'm afraid, but i'm right in the middle of testing Courier 2.7.8 b16 so give me some time and i'll see if I can replicate the issue myself.

    I've got a feeling you might need to tweak the courier.config file.

    Martin.

  • Nick 101 posts 122 karma points
    Jul 29, 2013 @ 16:30
    Nick
    0

    I just created to umbraco instances running them side by side locally and running the latest version of courier.

    I am doing tests with my document types and so far only half of the data types seem to be working. In detail:

     Textboxes and Textareas work fine. The content gets published accross

    A single checkbox works

    A dropdown list datatype works

    A checkbox list datatype with same options doesn't get copied at all. Is courier not made to handle those? Do I need a custom resolver?

    A custom datatype  of type usercontol wrapper doesn't work, I am guessing this definitely needs its own handler

    Content pickers work but Id's getting mixed up

  • Nick 101 posts 122 karma points
    Jul 29, 2013 @ 17:41
    Nick
    0

    I wrote a custom PropertyDataResolverProvider for the checkbox list and I discovered that the "PackagingProperty" is called twice.

    The first time, the "propertyData.Value" is a list of all the selected checkboxes and it appears correct.
    The second time it's empty.

    That would explain why it publishes an empty list.
    Any idea why it's called twice? 

    Update:

    Okay I just found out it is calling two different checkbox lists. So the values are correct during packaging.. something else makes them turn to null during publish.
    How is this not a serious bug? 

  • Nick 101 posts 122 karma points
    Jul 29, 2013 @ 18:22
    Nick
    0

    ERrr!!!

    Okay I found one of the problems!

    In   ExtractingProperty the propertyData has a garbage character in the beginning. This one -> ¤

    Overriding the ExtractingProperty with this solves the problem with the CheckBox lists. 

     

     public override void ExtractingProperty(Item item, ContentProperty propertyData)

            {

                if (propertyData.Value.ToString().Contains("¤"))

                {

                    propertyData.Value = propertyData.Value.ToString().Replace("¤", "");

                }

                base.ExtractingProperty(item, propertyData);

            }

     

    What sort of bug is this? How does the "¤" get there?

  • Martin Griffiths 801 posts 1212 karma points c-trib
    Jul 30, 2013 @ 10:27
    Martin Griffiths
    0

    Morning Nick

    So you're saying a checkbox list contains a garbage character at the end of each property value? I'll have to check this out, myself!

    BTW I pretty much completed my tests yesterday of Courier 2.7.8 b16, and I was not impressed. The UI constantly returns 500 error codes to the browser and doesnt always complete/close down, the UI windows just goes blank. In the background it sometimes completes the tasks though.

    I've noticed that the Ultimate Picker doesnt get its NodeId's translated on the target, instead it shoves in GUIDs instead!

    The dependency checking is still a total mystery to me, I can go as little as one level (out of the three) and it will sit there trawling through literally hundreds of vague links to the content, resulting in an enormous package and a very long wait! 

    As you're clearly having issues with other datatypes i'm going to check them all where/when possible.

    M.

  • Nick 101 posts 122 karma points
    Jul 30, 2013 @ 11:03
    Nick
    0

    From the debugging I've done I've found out that the checkboxlist inserts that "¤" garbage character at the beginning of every list.

    Removing it, fixes the problem.


    By debugging the content picker I found out that the value passed from one server to another is simply just the Id of the content node, which is of course different pages in each server and that is the root of all my problems.


    However, finding out how to fix this is still a mystery to me. I can only debug the target site for some reason, so I can't find a way to change the Ids manually before they get sent.

    I'll have another go at it today though. At this point any tips are really appreciated 

  • Nick 101 posts 122 karma points
    Jul 30, 2013 @ 12:41
    Nick
    0

    So far I've created two local instances of my umbraco site and I have two databases.
    I created one project called Courier.Addons and I added it on both projects.
    I have one repository in the courier config pointing to the target site.
    So far I can only debug all the courier addon events on the target site. Even when the event "Packaging" is hit, it is quering the target DB.
    I cannot get it to capture any event from the source DB, so I cannot find a way to fix the Ids before sending them over.
    What I wanted to do is make the content picker use Names and structure instead of Ids.
    Then on the target I can use the Names and structure to pick out the correct Id.
    I can do the second half but not the first half.
    Is there anyone here who knows about this stuff? 

  • Nick 101 posts 122 karma points
    Jul 30, 2013 @ 13:43
    Nick
    0

    I got my custom ContentPicker DataResolver to work and I can now debug internal logic.

    So, what it does is, it takes the Id of the node and replaces it with the Unique Id o fthe node (using the target DB).

    I guess my only conclusion here is that courier can ONLY work if the unique Ids of target and source are a match.

    How do we solve this if the unique Ids are different?
    Republishing the whole projects doesn't change the Ids (or Unique Ids).

    What a mess.... 

  • Martin Griffiths 801 posts 1212 karma points c-trib
    Jul 30, 2013 @ 15:25
    Martin Griffiths
    0

    Hi Nick

    As explained before if you read the marketing, you should never need worry about source/target node id's AND Courier should handle ALL core datatypes and uComponents/Contour OOTB. Well it should....but it doesn't.

    Anyway I've concluded my testing of Courier 2.7.8 build 16 today....and all I can say is don't waste any more time on it...It's still a sack of crap!

    I tested the content picker, checkboxlist and ultimate pickers, my results are...

    Content picker -> empty on target,

    Checkboxlist -> empty on target and Courier amazingly empties any checked boxes on the source document - amazing and utter shite

    Ultimate picker node Id -> inserts GUIDs on target for some reason!

    Add to that a UI that's still very ropey...today I noticed if I select target on the first UI screen and then go into advanced settings and select no dependencies, it ignores me and packages all dependencies anyway! Holy Cow!

    I've also experienced the UI not always completing background tasks and going blank along with 500 errors being returned to the browser! Why? It was fine in previous builds.

    I suggest you read my post http://our.umbraco.org/forum/umbraco-pro/courier/41759-LOBBY-THE-UMBRACO-TEAM!!!-COURIER-IS-LETTING-UMBRACO-DOWN!!

    Niels has been very apologetic about the situation and you'll see how bad things are...

    Anyway I've had enough of this debacle, I wont be using a staging/live platform again on new projects. We'll stick to editor/writer notifications on a single installation (No licences and less money for the team).

    I'm also furious that v4 wont get any further updates other than security fixes. Which means i'm now stuck at v4.11.10 for my projects that use Courier 1.3 and there are some really useful fixes in the latest build of v6 that could go into v4. v4 should be fully supported until Courier 2 is stable, in my view.

    I feel gutted and let down...

    Martin.

  • Nick 101 posts 122 karma points
    Jul 31, 2013 @ 11:25
    Nick
    0

    I EVENTUALLY managed to get Content Picker working.

    It was internally an NHibernate exception with the "GetUniqueId" method. The mySql provider couldn't cast to a Guid object which means the UniqueId was an empty Guid, so the content picker resolver was using the Node Id instead of the Unique Id. 

    By upgrading the mySql provider the content picker works.

    There's still a few issues with it but they're less important.

    This has been a frustrating and also learning experience.  
    Hope this helps someone in the future 

  • Martin Griffiths 801 posts 1212 karma points c-trib
    Jul 31, 2013 @ 11:42
    Martin Griffiths
    0

    Hi Nick

    We use SQL Server, and ours come through empty.

    M.

  • Nick 101 posts 122 karma points
    Jul 31, 2013 @ 12:44
    Nick
    0

    Upgrading the provider might help, or alternatively you need to override the GetUniqueId method to return a string which you can then convert into a Guid.

    It's frustrating but worth it. My Courrier now is stable and works well. 

Please Sign in or register to post replies

Write your reply to:

Draft