Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

Umbraco V8 Support #105

Open
cleversolutions opened this issue Jan 10, 2019 · 49 comments
Open

Umbraco V8 Support #105

cleversolutions opened this issue Jan 10, 2019 · 49 comments

Comments

@cleversolutions
Copy link

Umbraco V8 is coming soon. This plugin doesn't show up in the packages section on v8, and installing via Nuget blows up a v8 site with an awesome message.

Boot failed: Umbraco cannot run. Sad. See Umbraco's log file for more details.

-> Umbraco.Core.Exceptions.BootFailedException: Boot failed.

-> System.Reflection.ReflectionTypeLoadException: Could not load all types from "Lecoati.LeBlender.Extension, Version=1.0.9.0, Culture=neutral, PublicKeyToken=null" due to LoaderExceptions, skipping:
. System.TypeLoadException on Umbraco.Core.ApplicationEventHandler: Could not load type 'Umbraco.Core.ApplicationEventHandler' from assembly 'Umbraco.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'.
. System.IO.FileNotFoundException: Could not load file or assembly 'umbraco, Version=1.0.5820.25379, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
. System.IO.FileNotFoundException: Could not load file or assembly 'umbraco, Version=1.0.5820.25379, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
. System.IO.FileNotFoundException: Could not load file or assembly 'umbraco, Version=1.0.5820.25379, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
. System.IO.FileNotFoundException: Could not load file or assembly 'umbraco, Version=1.0.5820.25379, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
. System.IO.FileNotFoundException: Could not load file or assembly 'umbraco, Version=1.0.5820.25379, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Maybe this is a v8 bug, but thought I would start a conversation here.

@PSinke
Copy link

PSinke commented Feb 4, 2019

I've asked this question in the general discussion section of the Umbraco package, but it seems that the package is not compatible in it's current form, and needs to be adjusted to work with v8.
https://our.umbraco.com/packages/backoffice-extensions/leblender/general-discussion/95577-anyone-have-any-success-with-umbraco-8

@mirkomaty
Copy link

The error messages appear, because LeBlender is compiled against the old V7 DLLs.

At least the tree integration has to be changed, because

  • There is no trees.config file anymore
  • There is no Developer Section, the tree has to be integrated in the Settings section.

There is some work to do. Question @ the project owners: Are you interested in porting the package? If this is the case, our company is ready to help.

@soreng
Copy link
Contributor

soreng commented Feb 7, 2019

Hi guys,

thank you very much for the interest in LeBlender on v8.

The future of the grid is already moving towards a "v2" where editors like LeBlender and DocTypeGridEditor are no longer needed. Because of this, we haven't really looked that much into how/when and even if, we should make LeBlender work on v8.

Have a look at this thread for some background info on the v8 grid:
https://our.umbraco.com/forum/umbraco-8/94082-grid-v2

@mirkomaty
Copy link

We know about Grid "v2", but

  • it won't be ready with the v8 release
  • Grid v2 isn't a convincing concept in our eyes.
  • we have to convert an existing project with quite some LeBlender editors to v8 in the next few months.

So we decided to port LeBlender to v8. I managed to get it compiled today, but I guess it will need some debugging in the days to come.

@PSinke
Copy link

PSinke commented Feb 7, 2019

Nice @mirkomaty. Would you be able to share your fork when it's working? I'm also stuck with a large library of Leblender editors and would love to see it working on v8.

@cleversolutions
Copy link
Author

cleversolutions commented Feb 7, 2019 via email

@mirkomaty
Copy link

@soreng : I have a first version running. Are you interested in a pull request or should I create a fork under my ownership?

@AndersBrohus
Copy link

I guess a pull request could be great @mirkomaty :)

But a fork would be great now so we can start test it :)

@mirkomaty
Copy link

You can find the fork at https://github.com/mirkomaty/LeBlender,
Note:

  • The Nuget package won't be generated.
  • The Lecoati.LeBlender.Web project hasn't been touched at all. It contains the old code.

Installation:

  1. Compile the Extensions project. Copy the Lecoati.LeBlender.Extension.dll to the /bin folder of your Umbraco v8 installation. For debugging copy the .pdb file, too. After a restart the GridEditors tree will be integrated under settings below the DataTypes.
  2. Copy the complete App_Plugins/LeBlender folder to the /App_Plugins folder of your Umbraco v8 application.

It would be grateful if somebody could take care for the Nuget package.

@mirkomaty
Copy link

One more hint: Checkout the umbraco-v8 branch ;-)

@soreng
Copy link
Contributor

soreng commented Mar 6, 2019

@mirkomaty that looks like a lot of hard work -- very nice

We can't just update the nuget package, since people will then get a version for v8 that is not compatible with their v7 installs ;)

That whole "are we doing a new package, or maintain one" is, as you must know after doing the work, a bit hard to do.

Again, we really don't have a solid plan yet on what the (v8) future of this package is

@mirkomaty
Copy link

@cleversolutions, @PSinke, @AndersBrohus
please try the code at https://github.com/mirkomaty/LeBlender and let me know, if it works for you.

@soreng: Take your time to decide. I think, a good idea will be to publish a new package like Umbraco.v8.LeBlender. I will publish it as soon as we did some testing. This allows your package to develop independent from my fork. We can join our work anytime, if necessary.

@AndersBrohus
Copy link

I'm gonna try it out! :)

@bjarnef
Copy link
Contributor

bjarnef commented Mar 8, 2019

@soreng if LeBlender is going to support Umbraco v8 the new/updated package can set minimum target version in Umbraco package file and require Umbraco >= 8.0.0 in NuGet package dependencies.

@mirkomaty how does it register the component (maybe also rename this to something else than UmbracoEvents)? https://github.com/mirkomaty/LeBlender/blob/umbraco-v8/Src/Lecoati.LeBlender.Extension/Events/UmbracoEvents.cs#L18

I think you need to create a composer to register it.

public class MyComposer : IUserComposer
{
    public void Compose(Composition composition)
    {
        composition.Components().Append<MyComponent>();
    }
}
public class MyComponent : IComponent
{
    private readonly IUserService _userService;
    private readonly ILogger _logger;

    public MyComponent(IUserService userService, ILogger logger)
    {
        _userService = userService;
        _logger = logger;
    }

    // Initialize: runs once when Umbraco starts
    public void Initialize()
    {
        
    }

    // Terminate: runs once when Umbraco stops
    public void Terminate()
    {
    }
}

@soreng
Copy link
Contributor

soreng commented Mar 8, 2019

@mirkomaty I would like to discuss more in-depth on how we should move on with this.
Are you on the Umbraco Slack - if not join @ http://umbracians.chat/

@soreng: Take your time to decide. I think...

Well yes ;)

As @bjarnef also points out, there are ways to do this, but I want to make sure we do it right, and in a way that works for us on going forward.

I / We really appreciate the work done. You are more than welcome to do pull request, and then we can review it for futher development. I really wanted the v8 to use v8 features, so maybe this should be a seen as a beta of sorts.

@bjarnef
Copy link
Contributor

bjarnef commented Mar 8, 2019

@soreng it would be great if LeBlender in v8 use e.g. editorService to open overlays and benefits from infinite editing.

@soreng
Copy link
Contributor

soreng commented Mar 8, 2019

@bjarnef yes and yes :-)

And also use doc types (elements) like nested content (or some other grid editor)

No need to reinvent all of this :-)

@mirkomaty
Copy link

mirkomaty commented Mar 8, 2019

@bjarnef I used IComponent (see UmbracoEvents.cs). There was no need for IXxxxComposer. EDIT: Yes, the file should definitely be renamed. I didn't touch the name, so that finding the changes is more easy.

Further development: My intention was to get a running version of LeBlender with minimum effort. The result can be seen in the fork. It may have some bugs, but the main work is done. I see it as a provisionary solution to get our Umbraco based platform ported to Umbraco 8. It saves me from porting the grid editors immediately, but I don't think that that's the future.

As far as I understand, Grid2 will use Element doc types and therefore it may make LeBlender obsolete in the future. If somebode doesn't know about Grid2: Have a look at the branch temp8-grid2.

@soreng: I just created an account as "Mirko Matytschak".

@bjarnef
Copy link
Contributor

bjarnef commented Mar 8, 2019

@mirkomaty based on this comment in Our from Sebastiaan it seems it need a composer. Not sure how it register the component if it works without the composer at the moment (maybe via assembly scanning like dashboards, where there is a PR which a think remove that and it instead need to be registered).

https://our.umbraco.com/forum/umbraco-8/95981-how-do-you-get-content-compositionaliases-in-icomponent#comment-303587

@mirkomaty
Copy link

@bjarnef: You're right. We need a Composer. I added the necessary code and renamed UmbracoEvents into ApplicationInitializer, which fits the purpose of the class better.

@PSinke
Copy link

PSinke commented Mar 13, 2019

@mirkomaty Great work so far. I was able to install the plugin and see the grid editors section under Settings, but every action after that (Edit or create a grid editor) results in a 404 error. Any idea what I'm missing?

@PSinke
Copy link

PSinke commented Mar 13, 2019

@mirkomaty Great work so far. I was able to install the plugin and see the grid editors section under Settings, but every action after that (Edit or create a grid editor) results in a 404 error. Any idea what I'm missing?

Found it. There is a 'web.config' file in the /App_plugins/LeBlender folder. After removing that, all works fine.

@PSinke
Copy link

PSinke commented Mar 14, 2019

Has anyone tried to add a Multinode Treepicker with this port? I'm unable to pick more then one item, even thought the settings should allow me to pick 10.

@mirkomaty
Copy link

@PSinke: I managed to add multiple Nodes. But you have to select them one after another.
Add, Pick, Submit
Add, Pick, Submit

BUT: At the end the value array is empty. I don't understand, why. With other editors I can see a value in parameterconfig.controller.js in $scope.save. If I look at $scope.model.value[0].multiurl.value I get an empty array instead of what I selected in the MultiUrlPicker.

@ALL: Please note, that I pushed some bugfixes into the fork. Removed the web.config file which caused trouble and changed the Base.cshtml/LeBlender.cshtml to be inherited from WebViewPage

@parachute-dev
Copy link

How are you all building this/including in your project? Only ever installed via nuget before :( Apologies if it's a bargain basement question.

@mirkomaty
Copy link

@parachute-dev:

See #105 (comment)

  1. Compile the Extensions project. Copy the Lecoati.LeBlender.Extension.dll to the /bin folder of your Umbraco v8 installation. For debugging copy the .pdb file, too. After a restart the GridEditors tree will be integrated under settings below the DataTypes.
  2. Copy the complete App_Plugins/LeBlender folder to the /App_Plugins folder of your Umbraco v8 application.

@ConstroUmbraco
Copy link

Hello @mirkomaty
you have to create an installation package of LeBlender then Please provide to us because it will help us in our Umbraco version 8.

@mirkomaty
Copy link

you have to create an installation package of LeBlender then Please provide to us because it will help us in our Umbraco version 8.

I'm sorry, I'm currently not able to do that. I recommend doing the following:

  • check out the project and compile the extension like shown above.
  • go to the directory /build in the repository and change the file build.bat. Remove the line which pushes the package to nuget.
  • execute build.bat and you get a Nuget package file in the same directory.
  • copy the package file to a directory or shared directory on a file server. Add the directory or file share as package source in the Nuget Package Manger in Visual Studio. Now you can use it as a package in your projects.

@ConstroUmbraco
Copy link

Hello @mirkomaty
Ok let me check your given step and if I face any issue then I will get back to you with detail.

@parachute-dev
Copy link

Thanks for your help @mirkomaty

We got it installed just fine, and we were exploring ways to create content in the PageGrid.

Have you used Nested Content in a Grid Editor?

Using a simple one on a doctype with text, a link and a content picker, the pickers won't show.

In the console we get this error:

Error: [$compile:ctreq] Controller 'valFormManager', required by directive 'valPropertyMsg', can't be found!

Any idea what might be going wrong?

@mirkomaty
Copy link

@parachute-dev
Both Nested Content and LeBlender Grid Editors are containers for properties. I guess, that they disturb each other. If you aim at document variations I'd recommend to check out, if you can place a grid into Nested Content.

valFormManager and valPropertyMsg are not part of LeBlender.

If you take a look at the umbraco source code, you'll find valPropertyMsg in umbraco.directives.js (line 15332 in v8.0.1). At the beginning of the directive you see, that it declares the need of valFormManager. You see the according method in umbraco.directives.js at ~ line 15084. Note that both directives are part of the umbraco.directives.validation module. Try to debug valFormManager. It should be called by Umbraco, otherwise the directive is missing.

See: https://docs.angularjs.org/guide/directive:

The myPane directive has a require option with value ^^myTabs. When a directive uses this option, $compile will throw an error unless the specified controller is found. The ^^ prefix means that this directive searches for the controller on its parents.

@cleversolutions
Copy link
Author

@agiraud or @soreng is there any interest among the LeBlender maintainers to publish @mirkomaty's hard work in a new package name such as Lecoati.LeBlenderV8? It's a silly thing I guess, but pulling a package down from Nuget feels much more production ready than grabbing the source from git. I think there is a viable use case for LeBlender in V8 for years to come. When (if) Grid2 comes out, I doubt it will automatically convert content from Grid1. Existing sites with a lot of content will likely still use Grid1 in V8 for years to come.

@soreng
Copy link
Contributor

soreng commented Apr 17, 2019

@agiraud or @soreng is there any interest among the LeBlender maintainers to publish @mirkomaty's hard work in a new package name such as Lecoati.LeBlenderV8?

Yes and no. He hasn’t made a pull request yet - that would be a first step.

@mirkomaty
Copy link

Tried to open a PR only to see that somebody was faster:
#106

@soreng
Copy link
Contributor

soreng commented Apr 17, 2019

@mirkomaty Well, I would rather that you did it, and that the issues on it was resolved :-)

@jacklawry
Copy link

I would also love to see Le blender working on V8... I haven't seem any other alternative that offers the same great editor experience.

@cleversolutions
Copy link
Author

cleversolutions commented Jun 13, 2019

DocType Grid Editor is almost ready for V8 and provides the same editor experience as LeBlender if you use Single Editor Mode. I’ve been using the alpha for V8 sites and it works very well. Check out https://github.com/umco/umbraco-doc-type-grid-editor/pull/137

@bernardojbot
Copy link

I'm having an issue getting LeBlender to work on v8.1.1.
For some reason after adding the Grid Editor to my Grid and filling in the properties the UI freezes and I can't either save my settings or close the window.
I haven't used LeBlender with other versions of Umbraco v8 yet, so I don't know if this is a known issue, but everyone commenting here seems to have it working just fine, and I couldn't find anyone mentioning having a similar issue.
I've attached a screenshot showing where the UI freezes. At that point the only way to leave that screen is refreshing.
I've tested different LeBlender editors with different properties and all of them seem to have the same issue.
Any help would be appreciated. Thanks a lot.

LeBlender_issue

@bjarnef
Copy link
Contributor

bjarnef commented Aug 7, 2019

@bernardojbot I don't think it is an issue in LeBlender, but it seems to be an issue in core with overlays.
umbraco/Umbraco-CMS#6053

@bernardojbot
Copy link

@bjarnef thanks for your help. I'll keep an eye out on that issue to see if it gets solved.

@mirkomaty
Copy link

@bernardojbot: It might be my fault. I didn't merge Bjarnes fix into the umbraco-v8 branch until today. Note, that the v8 port resides here:
https://github.com/mirkomaty/LeBlender/tree/umbraco-v8
Since I fixed some other issues, I recommend using the version of today.

@pragneshmpatel
Copy link

is there any update on V8 support?

@mirkomaty
Copy link

As far as I understand, here at Lecoati will be no further development. Check the following link:
https://github.com/mirkomaty/LeBlender/tree/umbraco-v8

Read the installation procedure over there and post a comment, if you get problems using it. Note, that the version 2.1 converts your LeBlender grid property definitions into Element Document Types, which will be reusable in Umbraco.

@davit20
Copy link

davit20 commented May 4, 2020

Hi guys, I'm want to use nested-content into Leblender grid editor but when I'm adding item getting an error.
image
image
has anyone had the same issue?
Thank you @mirkomaty very much for Leblender update.

@mirkomaty
Copy link

Are you sure, you need NestedContent? LeBlender has the possibility to create multiple items of the property set you have designed in your element property type.

@davit20
Copy link

davit20 commented May 4, 2020

Yes. I need multiple items for only Carousel Slides. Other properties no need multiple items.
image
this is U7 example it's using archetype editor.

@mirkomaty
Copy link

@davit20: I gave NestedContent a try and can confirm the issue. The directive val-form-manager is defined in the LeBlender forms, but isn't recognized by the NestedContent code. I don't believe, that somebody will fix this soon.

My suggestion for a workaround is the way we do it: Define a specific Media Type for your slides. The Media Type can be inherited from Image. This allows you to add additional information to your slide images. (If you don't need additional information for your slides, you can use plain images instead.) Put the slides of a slideshow into a specific media folder. Instead of picking each slide in the Nested Content in the LeBlender dialog, just pick the whole folder with a MediaPicker. Your rendering code must determine all slides in the folder and can use them to render the elements of your slideshow.

Another variant of this approach is to place your slides in the content tree. Create a parent document of an appropriate content type and place your slides under this parent document. After that use a ContentPicker to pick that parent document.

I hope, that helps.

@davit20
Copy link

davit20 commented May 8, 2020

Thank you @mirkomaty for your very good suggestion but I have already fixed my problem using with
Doc Type Grid Editor.

@mirkomaty
Copy link

@davit20: Glad to hear, that you found a solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests