Tips on analyzing the logs, having a look at the configuration and finding configuration problems.



Generation of a workspace using a standard workspace structure, resource replace variants, workspace templates and user workspaces.

Introduction

More comprehensive modifications to the standard workspace structure require a number of changes in a variety of locations. If a workspace doesn't have the desired configuration in some areas, it isn't always immediately clear which of the changes are responsible for that. You have changed the workspace configuration but the changes aren't visible. In this article we'll tell you how to solve problems like that. For example, maybe you created a resource replace variant, but the system doesn't use it when creating the workspace.

censhare offers a variety of tools for configuring the standard workspace structure. These include user roles, workspace templates with resource events or XML files, and resource replace variants. A user can also make changes herself.censhare uses the various tools in a particular sequence. You can use this to systematically rule out individual changes as the cause.

The second place to search for errors is in the censhare server log entries. This provides you with tips on which user workspace, which workspace template or which resource replace variants censhare called up.

The analysis may also start by initially clarifying which workspace concept was used by the censhare installation. The workspace concept has a history in censhare in which the concept has gone through different phases. The various phases (censhare versions) also determine which configuration tools are available. These then come into question as possible causes.

Problems can also occur if leftovers from the old concept exist after a migration to the new workspace concept has been carried out). That can lead to unexpected errors.

Login - workspace setup

When a user logs in, censhare creates that user's workspace. After that, the workspace is available as an internal XML structure in the browser. Errors in the configuration can occur when a user logs in. After that the workspace structure is normally not changed again from the system side.

The exception here is the dynamic visibility  of tabs or widgets. Otherwise, the user is allowed to then change their individual workspace. System-side changes are only visible once the user has logged in anew.

This is the sequence censhare uses to configure the workspace:

  1. readout of the standard workspace structure

  2. for every asset of the standard structure, censhare checks whether there is a resource replace variant and whether that is valid for the role of the current user. The log allows you to find out whether censhare called up a certain replace variant.

  3. Finally, censhare checks whether there is a workspace template with the role of the user. The censhare Server log records which workspace template censhare uses for the login.It is important here to know whether it is a template with resource events  or with an XML file.

    Using the asset ID in the log you can call up the workspace template to determine this. For an XML file, censhare disposes of the standard workspace structure and uses only the XML file. There may be validation errors in the XML file after changes are made.

  4. Then censhare applies the resource events of the user workspace. The log also lists here which user workspace it loaded.

To find out where the problem lies for which configuration element, you can systematically deactivate them. First eliminate whether the problem is due to changes made by the user. Next, deactivate  the workspace template and check whether the problem is still there.

Depending on the change, there may be a number of resource replace variants. Check which static page or asset page is affected by the problem and look for the associated workspace page in the standard workspace structure. In the column view  in censhare Web you will see which assets are referenced by the workspace page. Now go through the individually referenced assets and check whether there is a resource replace variant for them. You can then deactivate them.

It may be that the desired workspace template is not being used. Whichever one it is, you will see that in the server log censhare selects a template in the following sequence:

  1. The user workspace contains a field "Workspace", which references a workspace template using the resource key.

  2. There is a workspace template with the main user role. For multiple templates with the same role, one is selected at random.

  3. Workspace templates without a user role are not taken into consideration by censhare.

For an asset in the standard workspace structure there may be multiple resource replace variants. Unlike a workspace template, a resource replace variant does not have to have a role. Based on the log, you can check whether the desired replace variant is called up. If that is not the case, you need to check which replace variants are defined for which roles for the asset to be replaced.

The following rules are applied by censhare when selecting a replace variant:

  1. There is a replace variant with the main user role.

  2. There is a replace variant without user roles.

  3. There are only change variants with roles that do not correspond to the main role of the user. censhare uses the asset of the standard workspace structure.

Log tips

If a user logs in, censhare configures the internal workspace structure for displaying the workspace. You can follow this process in the server log.

If a user has successfully logged in, censhare logs which user workspace and which user preferences are loaded. censhare also shows if a workspace is loaded for the user.

By default, censhare delivers only minimal information regarding the configuration of the user workspace. If the configuration requires it, censhare also records which resource assets are available and which are used. You can use this information to determine, for example, whether a certain resource replace variant was loaded for a user. The log also shows whether a self-created workspace container was loaded.

To get this information you need to classify the logger "com.censhare.server.support.util.ReplaceVarUtil" on the level FINEST in the admin client. To do that, open "Logger manager" in the admin client.Navigate to the entry "logger: com.censhare.server.support.util.ReplaceVarUtil" and specify the appropriate level. The logger is only available after version 5.7.2. If the "Logger manager" is not active, you need to activate it under "Configuration/modules/administration/logger manager".

Note: Only set the logger "com.censhare.server.support.util.ReplaceVarUtil" to FINEST if you really want to analyze processes related to loading a workspace. The logger creates a lot of data, so your log files grow quickly.

Below is an example of some log excerpts with information about workspaces:

2017.02.09-16:17:38.289 INFO : T002: CommandExecutor: srv1.20170209.161738.284[system]: server.login-standard completed all in 4ms

The login process is complete. Now you will see notes about the user workspace, preferences and workspace templates.

2017.02.09-16:17:38.318 INFO : T079: Workspace: Loading workspace Workspace User, Test[36874-v3-c0-tcn17-ccn17] with preferences: Preferences User, Test[18625-v1-c0-tcn26-ccn26] and template: Workspace User, Test[36874-v3-c0-tcn17-ccn17]

The user workspace "Workspace User, Test" (asset ID 36874) and the user preference "Preferences User, Test" (asset ID 18625) are loaded.[36874-v3-c0-tcn17-ccn17] is an internal ID for uniquely identifying transactions; the first digits always contain the asset ID, in this case 36874.

2017.02.09-16:17:38.318 INFO : T079: PreferencesModel: srv1.20170209.161738.282[Cf93a446][#unknown#]: Loading preferences for user ug (role PartyRole[party_role.party_role_pk[party_id=108, role=testRole, domain=root., domain2=root.]]), using asset Preferences User, German[18625-v1-c0-tcn26-ccn26]

The login name of the user is "ug" and he/she has a main role with the ID "testrole". The user's internal ID in the system is "108) and the ID for her first and second domains are both "root".

2017.02.09-16:17:38.332 INFO : T079: Workspace: loading base workspace from asset structure censhare: Standard[12509-v8-c0-tcn32-ccn33]

censhare now loads the asset structure of the workspace. Starting point of the structure is the asset "censhare: Standard" with the ID"12509".

2017.02.09-16:17:39.522 INFO : T079: Workspace: loading from events in template Add Tab (Workspace Template) - test (tt)[29321-v4-c0-tcn64-ccn66]

For the current user, censhare loads a workspace template with the name "Add Tab (Workspace Template) - test (tt)" and the ID "29321".

2017.02.08-15:38:42.405 FINEST : T013: ReplaceVarUtil: Resource asset was found with defined resource key and will be used. Asset ID '36883 ' and Resource Key 'tu:workspace.container.variant-tab'

censhare finds and loads the asset with the ID 36883 and the resource key "tu:workspace.container.variant-tab". The "tu" prefix indicates that this asset was created by a company or a vendor. Look through the log for a certain resource key or asset ID if you wish to determine whether censhare loaded the resource replace variant you created.

2017.02.08-15:38:42.398 FINEST : T013: ReplaceVarUtil: Generic resource replace variant was found and will be used. Found Asset ID '36885' and Resource Key 'tu:workspace.page.dashboard.variant.noRole.addTab'

censhare finds and loads the resource replace variant with the ID 36885 and the resource key  "tu:workspace.page.dashboard.variant.noRole.addTab ". No role is defined for the variant: "Generic resource replace variant".

censhare loads the variants because there are either no additional variants or no variants with an appropriate role. This can only be determined if you find the associated asset of the standard workspace structure and check which resource replace variants are defined for it.

2017.02.13-12:07:21.214 FINEST : T014: ReplaceVarUtil: Role specific resource replace variant was found and will be used. Asset ID '36889' and Resource Key 'tu:workspace.page.dashboard.variant.addTab'

censhare finds and loads the resource replace variant with the ID 36885 and the resource key  "tu:workspace.page.dashboard.variant.noRole.addTab ". censhare loads the replace variant, because she has defined a role that the user owns as her main role: "Role specific resource replace variant was found".

2017.03.03-10:07:14.700 WARNING: T062: Serializer: Your page configuration is not unique.

Path: assetText/id, censhare:workspace_page_text vs. censhare:workspace_page_textMarkdown, com.censhare.api.workspace.util.PathTrie$PageMappingUniquenessError

censhare shows a warning for the "Serializer" when creating the internal workspace structure (workspace model). The reason is that the page definition for a workspace structure is not unique. The same can happen for containers or configuration widget definitions. The log lists the affected "Path" feature with the content: "assetText/id".

censhare then names the resource key for both affected assets in which the definition occurs and also provides an internal note. For the resource keys, censhare outputs an "_" in the log instead of an "." for the key name. You then have to replace it if you wish to look for the resource key.

For example, that means:

  • Entry in the log: censhare:workspace_page_text

  • Name of the resource key: censhare:workspace.page.text

Certain features for assets with the same workspace asset type are not allowed to have the same content, otherwise an error will occur when converting the original view to the internal workspace structure. The original view is either the standard workspace structure  or a workspace template that the workspace structure has saved as an XML file.

To fix this problem you need to adjust the path "assetText/id" in the "Workspace page URL pattern" field in one of the two assets. The error occurs when creating a duplicate of a workspace asset or when copying an XML fragment for an asset definition in an XML file in order to change it.

Analysis of the workspace concept

By developing a workspace concept in different stages in censhare, a variety of configuration concepts my pop up in a censhare system. Below you will find step-by-step instructions for detecting the current configuration or for finding configuration options. The censhare version identified is the one that is available for the configuration option in question.

Question 1: Is there a root workspace asset?

More Informationen: root workspace asset

Answer: Yes

This relates to "Version 5.6 or higher"

Continue with Question 3: Are resource replace variants used?

Answer: No

This relates to a version between 5.0 and 5.5.

Continue with Question 2: How does the user workspace save changes?

Question 2: How does the user workspace save changes?

More Informationen: user workspace

Answer: Using XML files

This relates to "Version 5.0 to 5.2"

Answer: Resource events

This relates from  "Version 5.3 to version 5.5"

Question 3: Are resource replace variants used?

More Informationen: resource replace variants

Answer: Yes

This relates to "Version 5.7 or higher"

Continue with Question 4: Can roles be defined for the variants?

Answer: No

No additional version information

Continue with Question 5: Are there XML workspace templates?

Question 4: Can roles be defined for the variants?

More Informationen: roles for resource replace variants

Answer: Yes

This relates to "Version 5.7.3 or higher"

Continue with question 5: Analysis of XML workspace templates? 

Answer: No

No additional version information

Continue with Question 5: Analysis of XML workspace templates? 

Question 5: Are there XML workspace templates?

More Informationen: XML workspace templates

If XML workspace templates exist in the system for versions 5.6 or higher, there are two options:

  • XML workspace templates are used independently of the standard workspace structure. This happens if XML workspace templates that were created before version 5.5 continue to be used. We recommend replacing these with XML templates based on the standard workspace structure  or working with templates with resource events.

  • The XML workspace template is based on the standard workspace structure?The function "Generate XML workspace" in version 2017.2 allows you to export and adapt an XML file for the entire user workspace.

Analyze the XML workspace templates: Create an XML file from a workspace using the "Generate XML workspace" function. This takes into consideration the standard workspace structure. Compare this XML file with the XML file of the workspace template you found in the system. Do the structure of the workspace pages match for the two XML files and are there any major deviations in the configuration? Then you can assume that the workspace template is also based on the standard workspace structure.

Result: The XML workspace template is based on the standard workspace structure?

Answer: Yes

This relates to  "Version 2017.2 or higher"

Answer: No

Create the XML workspace templates anew based on the standard workspace structure.