Copied to clipboard

Flag this post as spam?

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


  • Rick van der Meij 35 posts 135 karma points
    Feb 24, 2015 @ 14:14
    Rick van der Meij
    0

    Image cropper relative path?

    Hi,

    on our first try we get the following message.

    The relative virtual path '{ "src": "/media/1025/logo.png", "crops": [ { "width": 293, "height": 94, "alias": "homenews" }, { "alias": "special", "width": 1600, "height": 329 } ], "focalPoint": { "left": 0.5, "top": 0.5 } }' is not allowed here.

    all image media items property umbracoFile are changed to image cropper.

  • Jan Skovgaard 11241 posts 23387 karma points MVP 6x admin c-trib
    Feb 24, 2015 @ 14:22
    Jan Skovgaard
    0

    Hi Rick

    How are you rendering the images?

    /Jan

  • Rick van der Meij 35 posts 135 karma points
    Feb 24, 2015 @ 14:26
    Rick van der Meij
    0

    Using the propertyvalueconverter.

    homepage logo example

    @Model.Content.AncestorOrSelf(1).GetPropertyValue<IPublishedContent>("logo").Url
    

    Rick

  • Ali Sheikh Taheri 459 posts 1604 karma points c-trib
    Feb 24, 2015 @ 14:29
    Ali Sheikh Taheri
    0

    Hi Rick,

    I would highly recommend to watch the Conveyor in uHangout which I explained everything in details. and then do let me know if you have any other questions.

    Cheers

    Ali

  • Jan Skovgaard 11241 posts 23387 karma points MVP 6x admin c-trib
    Feb 24, 2015 @ 14:29
    Jan Skovgaard
    0

    Hmm, if you're using the cropper I think you should use the GetCropUrl function - Please see the documentation here https://our.umbraco.org/documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Image-Cropper :)

    /Jan

  • Jan Skovgaard 11241 posts 23387 karma points MVP 6x admin c-trib
    Feb 24, 2015 @ 14:30
    Jan Skovgaard
    0

    Aaah, sorry - Did not realize that this was posted in the Conveyor forum :)

    /Jan

  • Rick van der Meij 35 posts 135 karma points
    Feb 24, 2015 @ 14:32
    Rick van der Meij
    0

    @ali

    I will :)

    @Jan

    I do, when i want to render an image which uses a crop. When i don't want to use a crop I use the Url.

    example with crop

    @child.GetPropertyValue<IPublishedContent>("image").GetCropUrl("List"))?width=144
    
  • Ali Sheikh Taheri 459 posts 1604 karma points c-trib
    Feb 24, 2015 @ 14:44
    Ali Sheikh Taheri
    0

    @Rick, I am a little bit confused why have you posted this on Conveyor?

    Have you used Conveyor to transfer content?

  • Rick van der Meij 35 posts 135 karma points
    Feb 24, 2015 @ 14:52
    Rick van der Meij
    0

    I tried to export the content and this is the error i get.

    enter image description here

  • Ali Sheikh Taheri 459 posts 1604 karma points c-trib
    Feb 24, 2015 @ 15:04
    Ali Sheikh Taheri
    0

    what I can say is that you are using a data type that is not built-in and it tries to store that JSON object.

    The export is trying to store that Value in the XML however that is not allowed.

    So what you need to do is to write a custom converter and plug that in, in ContentConveyor.Config file.

    Conveyor only supports built-in Data Types. and I am not sure what data type you are using that stores that value.

    In order to get an idea of how the converters work have a look at here

  • Rick van der Meij 35 posts 135 karma points
    Feb 24, 2015 @ 15:20
    Rick van der Meij
    0

    But this one is just a built in data type (image cropper)

    However it is used after a field which contains an Archetype.

    Do you think the error is from the archetypes instead of the image cropper?

    UPDATE:

    That's not it, I tried it with a single item only containing some textstring, and an media picker.

    The media picker gives back the JSON, which the image cropper datatype generates.

  • Ali Sheikh Taheri 459 posts 1604 karma points c-trib
    Feb 24, 2015 @ 15:29
    Ali Sheikh Taheri
    0

    Conveyor only supports the following special data types by default:

    1. Media Picker
    2. Content Picker
    3. Multi Node Tree Picker
    4. Drop Down List

    To be honest I have not tried it with Image Cropper or ArcheType and I am sure you need to write a converter for each of those .

  • Mark Bowser 261 posts 846 karma points c-trib
    Mar 25, 2015 @ 01:07
    Mark Bowser
    0

    Hmmmm. I am experiencing the same problem. I have an umbraco 7.1.8 site and just installed Conveyor 2.0_beta. This is my ContentConveyor.config file that came with the installation:

    <?xml version="1.0" encoding="utf-8"?>
    <DataTypes>
    
      <SpecialDataTypes>
    
        <DataType guid="ead69342-f06d-4253-83ac-28000225583b" type="AST.ContentConveyor7.DataTypeConverters.MediaPickerDataTypeConverter, AST.ContentConveyor7" />
        <DataType guid="7e062c13-7c41-4ad9-b389-41d88aeef87c" type="AST.ContentConveyor7.DataTypeConverters.MultiNodeTreePickerDataTypeConverter, AST.ContentConveyor7" />
        <DataType guid="cdbf0b5d-5cb2-445f-bc12-fcaaec07cf2c" type="AST.ContentConveyor7.DataTypeConverters.ContentPickerDataTypeConverter, AST.ContentConveyor7" />
        <DataType guid="a74ea9c9-8e18-4d2a-8cf6-73c6206c5da6" type="AST.ContentConveyor7.DataTypeConverters.DropdownListDataTypeConverter, AST.ContentConveyor7" />
        <DataType guid="5e9b75ae-face-41c8-b47e-5f4b0fd82f83" type="AST.ContentConveyor7.DataTypeConverters.RichTextEditorDataTypeConverter, AST.ContentConveyor7" /> 
    
      </SpecialDataTypes>
    
      <!--Used to determine compatibility - not particularly functional-->
      <OtherDataTypes>
    
        <DataType guid="f8d60f68-ec59-4974-b43b-c46eb5677985" name="Approved Color"/>
        <DataType guid="b6fb1622-afa5-4bbf-a3cc-d9672a442222" name="Date Picker with time"/>
        <DataType guid="23e93522-3200-44e2-9f29-e61a6fcbb79a" name="Date Picker"/>
        <DataType guid="7a2d436c-34c2-410f-898f-4a23b3d79f54" name="Image Cropper"/>
        <DataType guid="ec15c1e5-9d90-422a-aa52-4f7622c63bea" name="Textbox"/>
        <DataType guid="67db8357-ef57-493e-91ac-936d305e0f2a" name="Textbox multiple"/>
        <DataType guid="5359ad0b-06cc-4182-92bd-0a9117448d3f" name="Multiple Textstring"/>
        <DataType guid="38b352c1-e9f8-4fd8-9324-9a2eab06d97a" name="True/False (Ja/Nej)"/>
        <DataType guid="d15e1281-e456-4b24-aa86-1dda3e4299d5" name="Umbraco Usercontrol Wrapper"/>
    
      </OtherDataTypes>
    
    </DataTypes>
    

    I see the Image Cropper listed in the OtherDataTypes area, but the Image Cropper stores JSON. The JSON doesn't appear to have any node ids, but something in Conveyor is upset about the relative file paths.

    I agree. It looks like I need to move the Image Cropper into the SpecialDataTypes, but I'm not sure that will solve the problem. I fear that the problem is that Conveyor expects the umbracoFile field to store the path to the media file on disk. In our cases, we changed the umbracoFile property into an Image Cropper that stores JSON. What are your thoughts?

    Thanks!

  • Ali Sheikh Taheri 459 posts 1604 karma points c-trib
    Apr 23, 2015 @ 16:01
    Ali Sheikh Taheri
    1

    Hi Mark,

    I have played around with the Conveyor a while back and your assumption is right, Conveyor expects the umbracoFile property.

    what I need to do is to take it out from code and make it more flexible like any other datatype.

    I've never used a media items without umbracoFile property that's why that is the case at the moment.

    when I get a chance I will refactor it and release a new version or you could have a look at the source code and help me on that if you would like to :)

    Cheers

    Ali

Please Sign in or register to post replies

Write your reply to:

Draft