Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro and Macro Paramter guids not sync'd #218

Open
bowserm opened this issue May 17, 2019 · 0 comments
Open

Macro and Macro Paramter guids not sync'd #218

bowserm opened this issue May 17, 2019 · 0 comments

Comments

@bowserm
Copy link

bowserm commented May 17, 2019

I originally discussed this issue in Our.Umbraco here:
https://our.umbraco.com/packages/developer-tools/usync/usync/96487-macro-guids-are-not-syncd

I have reproduced the problem on two sites:

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

uSync does not store a guid when it writes out Macros to disk. This means that when macros are imported, the macro guids are not kept in sync. This will break courier if the macros are ever embedded in RTEs.

This is an example of what uSync is outputting for a macro called Test Macro with a guid on authoring of 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>
    <property name="Test Param" alias="testParam" sortOrder="0" propertyType="Umbraco.Integer" />
  </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. The same problem happens with macro parameters. Their guids are also out of sync, but I'll bet that part would work itself out if the macro itself was able to have its guid sync'd.

I am pretty sure that this has not been a problem for us in the past. Did something change in the way that macros are handled recently?

marcemarc pushed a commit to marcemarc/uSync-Legacy that referenced this issue Aug 4, 2023
marcemarc pushed a commit to marcemarc/uSync-Legacy that referenced this issue Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant