Copied to clipboard

Flag this post as spam?

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


  • Brent Rittenhouse 7 posts 27 karma points
    Feb 27, 2015 @ 16:49
    Brent Rittenhouse
    0

    Macro 'editing' question in v. 7

    Hello,

    I'm upgrading a clients site from 4.5.2 to 7.2.2. I've got through the entire process for the most part without issue. I noticed after upgrading though that there are pages in the original version that have properties on the document type that are macros and are editable. I'm not really sure of the terminology as I've only briefly used Umbraco before and the site I worked on didn't have anything like this.

    For that reason I'm going to simply include a screenshot to show what I mean.

     

    From what I can tell the content still works. I think the text on the right is the syntax you would use to acutally call the macro with those settings? Is there still an editor and if not is there a suggested way to implement this? They use this sort of thing all over their site.

    Thanks!

    Brent

  • Carlos Mosqueda 244 posts 435 karma points
    Feb 27, 2015 @ 18:44
    Carlos Mosqueda
    0

    Hi Brent,

    I am not quite sure where you are doing this.

    Is this in the Rich Text Editor where you are having issues?  How in 4.5.2 were the Macros being entered?  

    Can you give a wider screenshot with more of the Umbraco backend you are using?  I am having trouble seeing where in Umbraco you are entering the Macros.

     

    Carlos

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Feb 27, 2015 @ 21:01
    Kevin Jump
    1

    this looks like a datatype in v4 that doesn't have a corrisponding type in v7 

    when you upgrade to v7 - the upgrade process will attempt to map the datatypes from an old version of umbraco to the new types in Umbraco 7 - however if there isn't a corrisponding type, you will get a warning during the upgrade, the they type is changed to a label (No.Edit).

    this means you see the contents of the type, but can't change it. (looks like your screenshot).

    It's possible that it's the Macro Container datatype, which is in umbraco 7 - but the format might be diffrent, you can test by locating the datatype used to render this field, and changing it to a Macro Container  - if the format is the same it will work, if it's not you will not see any of your settings. 

     

  • Brent Rittenhouse 7 posts 27 karma points
    Mar 02, 2015 @ 15:26
    Brent Rittenhouse
    0

    I yell at people all the time for not making wider screenshots but I didn't want to give out any client info.

    I've redacted a large majority of the information here but it should give you a better understanding of where this is on their old 4.5.2 site. I have used Umbraco before but have NEVER used macros so the question of how they were being entered in 4.5.2 makes no sense to me unfortunately =(

     

     

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Mar 02, 2015 @ 15:38
    Kevin Jump
    0

    Hi 

    i think you'll need to trace back through umbraco - to understand how the macros are working, 

    Find the Document Type for this content (the name is in the properties tab - the doctype is in settings / document types)

    in the DocType find the Data type for the Case Studies property (in generic properties)

    from there go to the developer tab, and find the DataType in the Data Types lists.

    in the data type - it should tell you the underling datatype for this page. - i suspect it's Macro Container. - which i don't think will automatically upgrade to umbraco 7. but their is an Macro Container type in umbraco 7 - so once in v7 you could see if that works (but the underling storage format has propbibly changed) 

     

    .

  • Brent Rittenhouse 7 posts 27 karma points
    Mar 02, 2015 @ 15:51
    Brent Rittenhouse
    0

    Here is a screenshot of the settings area:

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Mar 02, 2015 @ 15:55
    Kevin Jump
    0

    Can you go to Developer / Data Types and see what type of DataType the "Case Studies Container" is ? 

     

  • Brent Rittenhouse 7 posts 27 karma points
    Mar 02, 2015 @ 16:24
    Brent Rittenhouse
    0

    Yup, as you guys guessed it's a macro container 

    (edit: added image)

  • Brent Rittenhouse 7 posts 27 karma points
    Mar 02, 2015 @ 16:39
    Brent Rittenhouse
    0

    Okay, so I set up the data type the same way as the old 4.5.2 version:

     

     

    After doing this I noticed that the content DID indeed change. It .. looks like this though, heh.

     

     

    It seems the macro still basically works since when I click "Add" I get the options on the right. This would be fine if I could simply see something worthwhile on the left. I can't figure out how to edit the two that are there either. Right clicking seems to do nothing. I guess this is a fairly big concern for me only because it seems that at least half their site is entirely done this way. =/

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Mar 02, 2015 @ 16:40
    Kevin Jump
    0

    Yeah, 

    I would go into the same place on your umbraco 7 install and change the DataType for the Case Study Container from Umbraco.NoEdit to Macro Container - If your lucky then you should start to see the settings in the content nodes. 

    If not - then the format has likely changed between v4 and v7 - and that means either writing some code to go through the site and convert the values from the old to the new format, or re-entering all the settings again.

    hope it works. 

     

     

     

  • Brent Rittenhouse 7 posts 27 karma points
    Mar 02, 2015 @ 16:46
    Brent Rittenhouse
    0

    Kevin, thank you very much!

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Mar 02, 2015 @ 17:15
    Kevin Jump
    0

    The missing title appears to be down to a lower or upper case A ? 

    I've just created a macro container in umbraco 6 - and the data is stored <?UMBRACO_MACRO macroalias="MACRONAME" /> 

    in umbraco 7 - it is stored <?UMBRACO_MACRO macroAlias="MACRONAME" />  

    (you can quickly see this by searching umbraco.config in app_data - but changing it there won't matter - as that file is generated from the DB). 

    So I think the the uppercaseness of the A means that v7 doesn't read the property in the UI and shows blank. there might be more (such as parameter names), 

    I personally would write some code to walk the content tree, and where ever the property is set - change the value, this would fix it, and mean you didn't have to mess about with the database. 

     

     

  • Brent Rittenhouse 7 posts 27 karma points
    Mar 02, 2015 @ 21:12
    Brent Rittenhouse
    0

    I hadn't read your statement yet and just got the data to display independently.

     

     

    It's very strange what the issue was.

     

    While looking at it I naturally removed the double spaces between properties and .. what do you know.. that fixed it. 

    In fact, if I add back double spaces, even between a single property, that macro will no longer appear. I almost can't believe this is the issue but it seems to be.

     (edit: Notice that it still appears even with the lower case a in 'alias')

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Mar 02, 2015 @ 21:16
    Kevin Jump
    0

    yes - when i was playing about with it - i had one entry misteriously disappear and re-appear but as i was messing about with values i thought i had broke it, maybe not. 

Please Sign in or register to post replies

Write your reply to:

Draft