Copied to clipboard

Flag this post as spam?

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


  • Mark Bowser 259 posts 844 karma points c-trib
    27 days ago
    Mark Bowser
    0

    Macro GUIDs are not sync'd

    When usync exports and imports macros, it doesn't sync the Guids. This is causing problems where when we try to courier content that is dependent on any macros, Courier believes the two macros to be different macros because their Guids are different.

    I have reproduced this problem on two sites so far

    site 1:

    • Umbraco: 7.7.9
    • Courier 3.1.6
    • uSync: 4.0.2
    • uSync.Core: 6.0.2

    site 2:

    • Umbraco: 7.13.1
    • Courier 3.1.5
    • uSync: 4.0.10
    • uSync.Core: 6.0.10

    This is an example of some of the xml that uSync is exporting for a macro called "Test Macro" with this guid: 24191f38-0134-440c-8eef-3d7b2e17eea8

    <?xml version="1.0" encoding="utf-8"?>
    <macro Key="00000000-0000-0000-0000-000000000152">
      <name>Test Macro</name>
      <alias>TestMacro</alias>
      <scriptType></scriptType>
      <scriptAssembly></scriptAssembly>
      <scriptingFile>~/Views/MacroPartials/TestMacro.cshtml</scriptingFile>
      <xslt></xslt>
      <useInEditor>True</useInEditor>
      <dontRender>False</dontRender>
      <refreshRate>0</refreshRate>
      <cacheByMember>False</cacheByMember>
      <cacheByPage>False</cacheByPage>
      <properties />
    </macro>
    

    In the above xml, the macro Key does not have the correct Guid. When we import this macro into the site in a different environment, the macro will have a different guid in each environment (ex. 66567bc5-7710-47e5-a8ca-ad2c0d660422). If we put any of these macros into a rich text editor, Courier will pick up the macro as a dependency, attempt to deploy it, and run into naming collisions.

    This has definitely been working for us for quite a while. I am only now noticing the problem. Did something change in the way that macros are handled recently? Are we misconfiguring something?

    Thanks. Let me know if you need more details.

  • Mark Bowser 259 posts 844 karma points c-trib
    27 days ago
    Mark Bowser
    0

    This same problem also happens with the macro parameters. Each of those records in the database has its own uniqueId column (not associated with an umbracoNode record). My guess is actually that Umbraco's api doesn't expose a way to set these GUIDs and that these GUIDs are completely unimportant for macros and macro parameters. When a macro is embedded in an RTE, it is referenced by alias and not by GUID or id, so this is probably a problem that usync cannot solve and that courier should be handling on its end.

    Am I right? Or is there a way for usync to keep sync these guids? If I have time, I'll try to check on it and respond to this thread.

  • Kevin Jump 1348 posts 8385 karma points MVP 2x c-trib
    26 days ago
    Kevin Jump
    0

    from memory that's broadly right - I think you can't set them (in older versions of Umbraco anyway).

    I need to do the occasional revisit with a newer version just to confirm it hasn't changed

Please Sign in or register to post replies

Write your reply to:

Draft