Try our conversational search powered by Generative AI!

Custom Plugins not working in 7.5

Vote:
 

Hi, 

we have a number of custom plugins, that are ascx files decorated with the GuiPlugIn attributes. 

WHat's the quickest and most painless way of transferring these into 7.5? 

[GuiPlugIn(DisplayName = "Associate",
Description = "Show businessline associator",
Area = PlugInArea.EditPanel,
UrlFromUi = "/plugins/edit/associatebusinessline.ascx",
RequiredAccess = AccessLevel.Edit)]
public partial class AssociateBusinessLine : UserControlBase, ICustomPlugInLoader

For example, the plugin above has functionality to associate two types with each other and it's not sufficient to just allow the user to select links using the standard editor control for linkItemCollection. 

Thank you! 

Gabor

#132902
Aug 20, 2015 14:24
Vote:
 

The GuiPlugIn-support for content was removed with the new UI in EPiServer CMS 7. The best match is probably to create a custom view for one or more content types. I've blogged about how that can be done here:

http://world.episerver.com/blogs/Linus-Ekstrom/Dates/2014/4/Adding-custom-views-to-your-content/

You can find the source code here along with lots of other samples on how to extend the EPiServer user interface:

https://github.com/episerver/cms-ui-extension-samples

#132909
Aug 20, 2015 15:42
Vote:
 

Thank you Linus, I've started going down this route, but I cannot get the view loading, despite following the instructions. The view type gets added to the editor drop-down, but it does not load my simple page type. Here is what I have: 

I have added a Test.aspx under ##site root##/Plugins/Edit/Test.aspx

I have also added the following class to the project:

 [ServiceConfiguration(typeof (EPiServer.Shell.ViewConfiguration))]
    public class SampleView : ViewConfiguration<Profile>
    {
        public SampleView()
        {
            Key = "associateBusinessLine";
            Name = "Associate";
            Description = "Associate Profiles";
            ControllerType = "epi-cms/widget/IFrameController";
            ViewType = VirtualPathUtility.ToAbsolute("~/Plugins/Edit/Test.aspx");
            IconClass = "epi-iconForms";
        }
    }

Am I doing something wrong? 

The view stays on the On Page Editing mode after switching, and my test form does not load. 

Thank you,

Gabor

#132943
Aug 21, 2015 11:19
Vote:
 

When I copy your code, associate it to the start page type it works for me. The web forms page /plugins/edit/test.aspx is loaded when I select it in the drop down. Not sure why it's not working for you. The only thing that I can think of is if you have a bug in the current version of EPiServer. Have you updated to the latest Nuget packages?

#132961
Aug 21, 2015 14:06
Vote:
 

WHen I try to navigate to the aspx page, I get the following error: 

Content controls have to be top-level controls in a content page or a nested master page that references a master page.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Web.HttpException: Content controls have to be top-level controls in a content page or a nested master page that references a master page.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace: 

[HttpException (0x80004005): Content controls have to be top-level controls in a content page or a nested master page that references a master page.]
   System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +615
   System.Web.UI.Page.ApplyMasterPage() +75
   System.Web.UI.Page.PerformPreInit() +211
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1844

We cannot at this point upgrade to the latest nuget packages, but do you think it's a bug with the current episerver libraries? i.e: 7.5.394.2?

It's also happening when we try to add a web form component elsewhere in the admin panel. 

#132971
Aug 21, 2015 16:23
Vote:
 

apparently, the above is due to me having the wrong content in the aspx form. I didn't have a contentPanel in the markup... 

The issue that the view does not load remains however...

#132983
Edited, Aug 21, 2015 17:17
* 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.