Composer - PTB

Vote:
 

Hi, I'm currently building a site based on PageTypeBuilder and also Composer.

Everything works like charm except that every time i rebuild the solution all properties when editing a page using the composertab is gone, the Content tab is empty. http://i.imgur.com/3nbTF.jpg

If I go inteo adminmode and then to the composer block type, I can see the properties there, and if i chose to edit them, and then save them they will be accessable in edit mode.

The code for the composer function.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using PageTypeBuilder;
using EPiServer.Core;
using EPiServer.SpecializedProperties;

namespace PageTypes.Composer
{
    [PageType(
        "4271667E-E3C0-48b1-80E4-0E914B4B0620",
        Name = "[ExtensionSys] Puff",
        Description = "Displays a single puff",
        SortOrder = 60,
        Filename = "/UserControls/Composer/PuffFunction.ascx")]
    public class PuffFunctionType : ComposerFunctionPageTypeBase
    {
        [PageTypeProperty(
            EditCaption = "Header",
            HelpText = "Sets the puffs header",
            UniqueValuePerLanguage = true,
            Searchable = true,
            SortOrder = 50,
            DisplayInEditMode = true,
            Type = typeof(PropertyString),
            Tab = typeof(ComposerTab))]
        public virtual string Header { get; set; }

        [PageTypeProperty(
            EditCaption = "Bodytext",
            HelpText = "Sets the puff body text",
            UniqueValuePerLanguage = true,
            DisplayInEditMode = true,
            Searchable = true,
            SortOrder = 125,
            Type = typeof(PropertyXhtmlString),
            Tab = typeof(ComposerTab))]
        public virtual string MainBody { get; set; }

        [PageTypeProperty(
            EditCaption = "Image",
            HelpText = "Sets the puffs image",
            DisplayInEditMode = true,
            Searchable = false,
            Type = typeof(PropertyImageUrl),
            Tab = typeof(ComposerTab))]
        public virtual string Image { get; set; }

        [PageTypeProperty(
            EditCaption = "Link",
            HelpText = "Sets the link for the puff",
            UniqueValuePerLanguage = true,
            DisplayInEditMode = true,
            Searchable = false,
            Type = typeof(PropertyUrl),
            Tab = typeof(ComposerTab))]
        public virtual string Link { get; set; }
    }
}

    

Any idea why this might happen?

#60170
Jul 23, 2012 15:52
Vote:
 

It looks fine, does ComposerFunctionPageTypeBase have the ExtensionContentFunctionProperty and the NeverUsedProperty properties? Also you should set AvailableInEditMode to false, since this is not a regular page type, but a composer page type.

Frederik

#60171
Jul 23, 2012 16:53
Vote:
 

ComposerFunctionPageTypeBase does have those two properties. I tried to change the AvailableInEditMode to false, but that didnt solve the problem either. So I'm still stuck.

Any other ideas?

#60173
Jul 23, 2012 17:02
Vote:
 

Hmm I would turn on logging and see what happens when your application starts up. You're using CMS 6 R2 and Composer 4 R2? Also specify a sort order for each property, that way PTB shouldn't have a reason to update anything in the DB when it starts up for that page type.

Frederik

#60174
Jul 23, 2012 17:09
Vote:
 

Hi again, and i really appreciate Your help Frederik.

Yeah I'm using CMS 6 R2 and Composer 4 R2. I'm not sure what difference it would make if PTB didnt change anything when it starts up since i still have to edit EVERY property in Composer before it is available in edit mode. Well, at least I would'nt have to do it every time. Anything else you could think of?

#60176
Jul 24, 2012 8:57
Vote:
 

Ok, so I've turned on logging, only problem now is I'm not sure what to look for.

#60180
Jul 24, 2012 9:48
Vote:
 

Well, one step forward at least.

The class I made for the ComposerTab used "Composer" instead of "Extension" as name, now the properties appear in editmode, exept when I name the property in certain ways, like MainBody. If I name the property for example iMainBody it works. My guess its because of some problem with translations? Any ideas?

 

#60184
Jul 24, 2012 11:00
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.