Analyze workspace modifications
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:
readout of the standard workspace structure
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.
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.
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:
The user workspace contains a field "Workspace", which references a workspace template using the resource key.
There is a workspace template with the main user role. For multiple templates with the same role, one is selected at random.
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:
There is a replace variant with the main user role.
There is a replace variant without user roles.
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:
The login process is complete. Now you will see notes about the user workspace, preferences and workspace templates.
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.
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".
censhare now loads the asset structure of the workspace. Starting point of the structure is the asset "censhare: Standard" with the ID"12509".
For the current user, censhare loads a workspace template with the name "Add Tab (Workspace Template) - test (tt)" and the ID "29321".
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.
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.
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".
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 Information: 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 Information: 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 Information: 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 Information: 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 Information: 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.