Code Monkey home page Code Monkey logo

sn-webpages's Introduction

Legacy feature alert

Please note that this is a legacy feature which is no longer supported on the latest (and greatest) sensenet version.

sensenet as a service (SNaaS) - use sensenet from the cloud

For a monthly subscription fee, we store all your content and data, relieving you of all maintenance-related tasks and installation, ensuring easy onboarding, easy updates, and patches.

https://www.sensenet.com/pricing

WebPages for sensenet

Please note that this component builds on the obsolete ASP.NET WebForms technology. There are more modern UI frameworks and technologies to use with sensenet, we recommend that you check out those instead.

UI layer for the sensenet platform built using ASP.NET WebForms pages, portlets (webparts) and controls.

Join the chat at https://gitter.im/SenseNet/sn-webpages

Package Version
SenseNet.Webpages.Install NuGet
SenseNet.Webpages NuGet

Install this component on top of the main sensenet Services layer to get an administrative GUI (called the Content Explorer) for managing content items stored in the Content Repository.

Note that this layer does not contain user-facing interfaces like workspace dashboards or intranet library pages. To take a look at a list of core components we offer and see what you should install, please check this article:

sensenet components

You can also build custom pages for your solution using our built-in building blocks called portlets.

WebPages component

Getting started

Prerequisites

This components requires sensenet Services 7.0 to be installed in your dev environment and database. Please follow the steps in the link above to complete that before proceeding.

Installation

You can install the sensenet WebPages component in Visual Studio as a NuGet package. Please follow the steps in the the following article:

Log in

After installing this component you will be able to log in to the portal on the default site's main page, at this point only accessible through an absolute url (see below the way of removing this limitation):

http://example.com/Root/Sites/Default_Site

Content Explorer

Use the default admin/admin credentials and enter the admin UI by clicking on the Portal Remote Control on the top right corner of the page.

Please follow this link for more details:

Content Explorer

Site main page

After installing this component and entering Content Explorer, you may notice that there is a single default site under the /Root/Sites collection. To register your custom url (e.g. localhost:1234) with this site, please follow these steps:

After this, you will see the predefined sensenet main page (displaying a simple login portlet) when you visit your custom url; you do not have to use the absolute url mentioned above to access the site main page:

http://localhost:1234

MVC views

Note that if you installed sensenet into an ASP.NET application that may contain MVC views and controllers, you can freely use that technology, you do not have to create sensenet-specific pages. That is only an option, made possible by this WebPages component.

Custom pages

If you choose to make use of this technology, please take a look at the following articles about building a site using our pages and smart app model:

sn-webpages's People

Contributors

gallayl avatar herflis avatar huszerlbence avatar kavics avatar orangegrove1955 avatar szigetid-zz avatar tusmester avatar vargajoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sn-webpages's Issues

Create a GUI Layer and Content Explorer NuGet package

Get the remainders of the GUI layer and the Content Explorer out of TFS and create a separate Git repository and NuGet package for them

The name of the component should be: sensenet.webpages

  • Finish documentation
  • Gather feedback from testers

WebPages component installer

Create an SnAdmin package which you can use the installer with.

Acceptance criteria

  • With the installer, choosing the package option in the beginning, I can install the WebPages component on my existing SenseNet instance.
  • In this installed component there is a welcome page with a login portlet on it
  • The installed component has a working content explorer where you can create pages
  • There is a getting started guide which guides through the user the installation of the webpages (and the services) component

nuget install error

start from a empty and clean asp.net project, install this package behind SenseNet.Service.Install 7.1.1
got four exceptions:

03:44:31.1880 ========== Exception:
03:44:31.1960 Path: E:\SourceCodes\SenseNet\demo\Demo1\Demo1\Admin\tools\install-webpages\import\Global\scripts\tinymce\plugins\pagebreak\img\pagebreak.gif
03:44:31.2040 SqlException: Violation of PRIMARY KEY constraint 'PK_Versions'. Cannot insert duplicate key in object 'dbo.Versions'. The duplicate key value is (1382).
The statement has been terminated.
03:44:31.2720 在 SenseNet.ContentRepository.Storage.DataBackingStore.SaveNodeDataTransactional(Node node, NodeSaveSettings settings, IIndexPopulator populator, String originalPath, String newPath)
在 SenseNet.ContentRepository.Storage.DataBackingStore.SaveNodeData(Node node, NodeSaveSettings settings, IIndexPopulator populator, String originalPath, String newPath)
在 SenseNet.ContentRepository.Storage.Node.Save(NodeSaveSettings settings)
在 SenseNet.ContentRepository.GenericContent.Save(NodeSaveSettings settings)
在 SenseNet.ContentRepository.SavingAction.Execute()
在 SenseNet.ContentRepository.GenericContent.Save(SavingMode mode)
在 SenseNet.ContentRepository.Content.SaveSameVersion(Boolean validOnly)
在 SenseNet.ContentRepository.Content.ImportFieldData(ImportContext context, Boolean saveContent)
在 SenseNet.Packaging.Steps.ImportBase.ContentInfo.SetMetadata(Content content, String currentDirectory, Boolean isNewContent, Boolean updateReferences)
在 SenseNet.Packaging.Steps.ImportBase.ImporterClass.TreeWalker(String path, Boolean pathIsFile, Node folder, String indent, Boolean aspects, Boolean settings)
03:44:31.2850 =====================

and

03:47:03.9674 ========== Exception:
03:47:03.9764 Path: E:\SourceCodes\SenseNet\demo\Demo1\Demo1\Admin\tools\install-webpages\import\Global\styles\jqueryui\jquery.ui.theme.css
03:47:03.9833 SqlException: Violation of PRIMARY KEY constraint 'PK_Versions'. Cannot insert duplicate key in object 'dbo.Versions'. The duplicate key value is (2121).
The statement has been terminated.
03:47:03.9934 在 SenseNet.ContentRepository.Storage.DataBackingStore.SaveNodeDataTransactional(Node node, NodeSaveSettings settings, IIndexPopulator populator, String originalPath, String newPath)
在 SenseNet.ContentRepository.Storage.DataBackingStore.SaveNodeData(Node node, NodeSaveSettings settings, IIndexPopulator populator, String originalPath, String newPath)
在 SenseNet.ContentRepository.Storage.Node.Save(NodeSaveSettings settings)
在 SenseNet.ContentRepository.GenericContent.Save(NodeSaveSettings settings)
在 SenseNet.ContentRepository.SavingAction.Execute()
在 SenseNet.ContentRepository.GenericContent.Save(SavingMode mode)
在 SenseNet.ContentRepository.Content.SaveSameVersion(Boolean validOnly)
在 SenseNet.ContentRepository.Content.ImportFieldData(ImportContext context, Boolean saveContent)
在 SenseNet.Packaging.Steps.ImportBase.ContentInfo.SetMetadata(Content content, String currentDirectory, Boolean isNewContent, Boolean updateReferences)
在 SenseNet.Packaging.Steps.ImportBase.ImporterClass.TreeWalker(String path, Boolean pathIsFile, Node folder, String indent, Boolean aspects, Boolean settings)
03:47:04.0074 =====================

and

03:49:02.9856 ========== Exception:
03:49:02.9966 Path: E:\SourceCodes\SenseNet\demo\Demo1\Demo1\Admin\tools\install-webpages\import\Localization\CtdResourcesEF.WebPages.xml.Content
03:49:03.0056 SqlException: Violation of PRIMARY KEY constraint 'PK_Versions'. Cannot insert duplicate key in object 'dbo.Versions'. The duplicate key value is (2442).
The statement has been terminated.
03:49:03.0156 在 SenseNet.ContentRepository.Storage.DataBackingStore.SaveNodeDataTransactional(Node node, NodeSaveSettings settings, IIndexPopulator populator, String originalPath, String newPath)
在 SenseNet.ContentRepository.Storage.DataBackingStore.SaveNodeData(Node node, NodeSaveSettings settings, IIndexPopulator populator, String originalPath, String newPath)
在 SenseNet.ContentRepository.Storage.Node.Save(NodeSaveSettings settings)
在 SenseNet.ContentRepository.GenericContent.Save(NodeSaveSettings settings)
在 SenseNet.ContentRepository.SavingAction.Execute()
在 SenseNet.ContentRepository.GenericContent.Save(SavingMode mode)
在 SenseNet.ContentRepository.Content.SaveSameVersion(Boolean validOnly)
在 SenseNet.ContentRepository.Content.ImportFieldData(ImportContext context, Boolean saveContent)
在 SenseNet.Packaging.Steps.ImportBase.ContentInfo.SetMetadata(Content content, String currentDirectory, Boolean isNewContent, Boolean updateReferences)
在 SenseNet.Packaging.Steps.ImportBase.ImporterClass.TreeWalker(String path, Boolean pathIsFile, Node folder, String indent, Boolean aspects, Boolean settings)
03:49:03.0276 =====================

and

03:50:02.0478 ========== Exception:
03:50:02.0568 Path: E:\SourceCodes\SenseNet\demo\Demo1\Demo1\Admin\tools\install-webpages\import\System\SystemPlugins\Portlets\AdvancedLogin\AdvancedLoginView.ascx
03:50:02.0648 SqlException: Violation of PRIMARY KEY constraint 'PK_FlatProperties_1'. Cannot insert duplicate key in object 'dbo.FlatProperties'. The duplicate key value is (2446).
The statement has been terminated.
03:50:02.0758 在 SenseNet.ContentRepository.Storage.DataBackingStore.SaveNodeDataTransactional(Node node, NodeSaveSettings settings, IIndexPopulator populator, String originalPath, String newPath)
在 SenseNet.ContentRepository.Storage.DataBackingStore.SaveNodeData(Node node, NodeSaveSettings settings, IIndexPopulator populator, String originalPath, String newPath)
在 SenseNet.ContentRepository.Storage.Node.Save(NodeSaveSettings settings)
在 SenseNet.ContentRepository.GenericContent.Save(NodeSaveSettings settings)
在 SenseNet.ContentRepository.SavingAction.Execute()
在 SenseNet.ContentRepository.GenericContent.Save(SavingMode mode)
在 SenseNet.ContentRepository.Content.SaveSameVersion(Boolean validOnly)
在 SenseNet.ContentRepository.Content.ImportFieldData(ImportContext context, Boolean saveContent)
在 SenseNet.Packaging.Steps.ImportBase.ContentInfo.SetMetadata(Content content, String currentDirectory, Boolean isNewContent, Boolean updateReferences)
在 SenseNet.Packaging.Steps.ImportBase.ImporterClass.TreeWalker(String path, Boolean pathIsFile, Node folder, String indent, Boolean aspects, Boolean settings)
03:50:02.0918 =====================

Replace BlobStorageConfiguration call

The BlobStorageConfiguration class does not exist anymore in the Services component (v7.3+), replace usages in ascx files with the new API:

SenseNet.Configuration.BlobStorage

For example in this view (line 80):

/Root/System/SystemPlugins/Portlets/IntraUploadDialog.ascx

ImportFromCSV action is missing

Hi!
I tried to use the ImportFromCSV action under the Root/IMS/ section to import users, but it is not listed in the ActionList.
Is this function still exists in SN7?

Search page is missing

When you enter a search phrase into the search box in the top right corner in any of the workspaces (the one with the placeholder text 'Search site' or 'Search workspace'), you get an error message:

Unknown action. Action: Search

This is because there is no Search app/page in SN7 yet.

The reason this issue is here and not in the sn-workspaces repo is that the error is caused by the ContextSearch portlet (which is here): that is what tries to load the Search action and redirect to it.

The simpliest solution is to port the Search page from the old BP branch (or from SN6) here. We should check that page: what portlets are on it, which page template it uses, etc. If it is ok, we should move it here.

[Indexing] Upgrade WebPages

Make the necessary changes in the webpages component in source code and content files to reflect the search api changes in the Services component.

  • upgrade patch

IMS pager download all of the content, not just one page data

My team members recognized, that the pager function in the ..\IMS\ download all of the contents in the fist time, and just the frontend show it in little packs.
It means, that many thousand of content maybe will kill this function.
Our suggestion is the backend download just little packs, which the frontend needs.

For the testing here you are some testuser import file sample.
testusers.csv.txt

Restoring content works, but with error message

@kultsar commented on Thu Sep 27 2018

When restoring contents (files, folder structures) from Trash, the same error happens, described below. Tested with content deleted from user profile doclib or from workspace doclib under default site.

For example:

An unexpected error occurred, please report the following technical details to your system
Exception type: System.NullReferenceException
Exception message:
Object reference not set to an instance of an object.

NullReferenceException: Object reference not set to an instance of an object.
   at SenseNet.Portal.UI.PortletFramework.ContextBoundPortlet.GetBindingRootPrivate() in E:\BuildAgent\_work\60\s\src\WebPages\PortletFramework\ContextBoundPortlet.cs:line 289
   at SenseNet.Portal.Portlets.BreadCrumbPortlet.GetBindingRoot() in E:\BuildAgent\_work\60\s\src\WebPages\Portlets\BreadCrumbPortlet.cs:line 191
   at SenseNet.Portal.UI.PortletFramework.ContextBoundPortlet.GetContextNodeInternal() in E:\BuildAgent\_work\60\s\src\WebPages\PortletFramework\ContextBoundPortlet.cs:line 189
   at SenseNet.Portal.UI.PortletFramework.ContextBoundPortlet.get_ContextNode() in E:\BuildAgent\_work\60\s\src\WebPages\PortletFramework\ContextBoundPortlet.cs:line 147
   at SenseNet.Portal.Portlets.BreadCrumbPortlet.GetBlacklist() in E:\BuildAgent\_work\60\s\src\WebPages\Portlets\BreadCrumbPortlet.cs:line 212
   at SenseNet.Portal.Portlets.BreadCrumbPortlet.GetParentsNodes() in E:\BuildAgent\_work\60\s\src\WebPages\Portlets\BreadCrumbPortlet.cs:line 216
   at SenseNet.Portal.Portlets.BreadCrumbPortlet.CreateChildControls() in E:\BuildAgent\_work\60\s\src\WebPages\Portlets\BreadCrumbPortlet.cs:line 299

@tusmester commented on Thu Sep 27 2018

Added stack trace to the description. This occurs only on the admin UI (Content Explorer), probably because there is no site context there. no, it does occur on the common UI too.

I think we should move this to the WebPages repo because it is about a portlet context.

Add custom 403 and 404 pages

Currently there is no custom 403/404 page in this component. Simply moving the old ones from TFS is not enough, because they contain info text content with the old demo content type WebContentDemo - that should be converted to something that does not have "demo" in its name...

  • Task1: convert info content in the TFS/... Default_Site/error_pages folder to a different content type and move them to this repo (error_pages.Content too, because it contains additional permission entries for visitors!)
  • Task2: add the system.webServer.httpErrors section from web.config in TFS to the transform file here.

LoginView fails to load

After installing the WebPages package and visiting the main page of the default site, this error shows up instead of the login view:

Couldn't load /Root/System/SystemPlugins/Portlets/AdvancedLogin/LoginView

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.