From LTS 2016 to 9.1
Reindex the full repository following Rebuilding the repository index page, or using Nuxeo Dev Tools Extension. See NXP-21279.
Installation and Configuration
Requirements
- MySQL >= 5.6.4 is required. See NXP-21338
Parameters to Update
| Parameter | Modification | Reference |
|---|---|---|
org.nuxeo.cmis.proxies |
New Default Value to true |
NXP-21828 |
Nuxeo Studio Application Definition
Make sure your Nuxeo Studio project depends on the Nuxeo JSF UI target package. See the pages HOWTO: Update the Version of Your Target Platform in Studio and Specific Upgrade Instructions for more details.
Code Changes
Automation Scripting
Backward Compatibility was broken for 9.1 (NXP-21508): parameters are no longer extracted from the context of the params object when calling the scripting operation. You have to explicitly set each parameter in the operation definition. Follow NXP-22190 for resolution.
Started from 9.2: you can set the parameter nuxeo.automation.scripting.inline-context-in-params to true in order to get back compatibility with scripts created before 9.1.
Code Behavior Changes
- Setting a property value to
nullnow always sets it to the default value if a default value is configured for the schema field. See NXP-19466.
- Expression Language artifact has been renamed from
org.nuxeo.ecm.platform:nuxeo-platform-eltoorg.nuxeo.ecm.core:nuxeo-core-el. See NXP-21713.
When using the feature
RepositoryElasticSearchFeature, you need to add a test Maven dependency onorg.nuxeo.ecm.automation:nuxeo-automation-server:<dependency> <groupId>org.nuxeo.ecm.automation</groupId> <artifactId>nuxeo-automation-server</artifactId> <scope>test</scope> <dependency>See NXP-21186.
Operation Changes
- Operations
Services.CreateUserandServices.QueryUsersare now part of the base platform. They have been renamed intoUser.CreateOrUpdateandUser.Query.
Aliases with old names have been kept for compatibility. See NXP-21962
Tag.Suggestionoperation no longer requires JSF; You have to pass the target document using the new parameterdocument. See NXP-21717.
Document.AddPermissionoperation: The existence of the input user name or group name is now checked before adding a permission. See NXP-21559.
Deprecated APIs
Fields file:filename and common:size Removed
To fix exports, manually edit the ZIP file (prior to 9.1) by removing <common:size> and <file:filename> elements from the files document.xml. See NXP-21025.
Scoped DocumentModel Context Data
Any usage of ScopedMap or ScopeType is deprecated and will be removed in the future.
- Instead of
ScopedMap, useMap<String, Serializable>. - Instead of
ScopeTypeingetContextDataandputContextData, use equivalent methods without a scope.
See NXP-21570.
LoginScreenHelper Mobile Methods
Removed:
LoginScreenHelper#NUXEO_PROTOCOLLoginScreenHelper#getURLForMobileApplication(HttpServletRequest request)LoginScreenHelper#getURLForMobileApplication(String baseURL, String requestedURL)
Use org.nuxeo.ecm.platform.web.common.MobileBannerHelper instead. See NXP-21679.
FileManager Can Now Prevent Overwriting Existing Document
Added:
FileManager#createFolder(CoreSession documentManager, String fullname, String path, boolean overwrite)FileManagerService#defaultCreateFolder(CoreSession documentManager, String fullname, String path, boolean overwrite)FileManagerService#defaultCreateFolder(CoreSession documentManager, String fullname, String path, String containerTypeName, boolean checkAllowedSubTypes, boolean overwrite)
Deprecated:
FileManager#createFolder(CoreSession documentManager, String fullname, String path)FileManagerService#defaultCreateFolder(CoreSession documentManager, String fullname, String path)FileManagerService#defaultCreateFolder(CoreSession documentManager, String fullname, String path, String containerTypeName, boolean checkAllowedSubTypes)
See NXP-21853.
BlobDispatcher Can Now Dispatch Depending on Document's XPath
Added:
BlobDispatcher#getBlobProvider(Document doc, Blob blob, String xpath)
Deprecated:
BlobDispatcher#getBlobProvider(Document doc, Blob blob)
See NXP-21891.
Automatic Versioning
We introduced a new automatic versioning system in 9.1. We deprecated versioningRules extension point. You now have to use new extension points, see documentation.
Nuxeo provides a backward compatibility mechanism, but it could be not accurate.
Previous automatic versioning mechanisms were removed or upgraded to new system:
- File manager and bulk edit don't automatically version documents since 9.1, you could put back this behavior by contributing a new rule and use source parameter to restrict versioning to this functionalities (for instance use:
fileimporter-{name-of-your-importer}orbulkEdit) - Nuxeo Drive is not responsible of automatic versioning anymore. The last contributor rule is now a default policy, and delay rule is introduced by Nuxeo Drive and rely on source parameter mechanism.
All configuration parameters relative to automatic versioning were removed without backward compatibility.
It's the case for:
nuxeo.drive.force.versioningversioningDelayandversioningOptionused inDefaultFileSystemItemFactory.
Note thatVersioningFileSystemItemFactoryis deprecated.
Addons
Nuxeo Drive - Server APIs Changes
Added:
FileSystemItemManager#createFolder(String parentId, String name, Principal principal, boolean overwrite)FileSystemItemManager#createFile(String parentId, Blob blob, Principal principal, boolean overwrite)FolderItem#createFolder(String parentId, String name, Principal principal, boolean overwrite)FolderItem#createFile(String parentId, Blob blob, Principal principal, boolean overwrite)- the
overwriteparameter to theNuxeoDrive.CreateFolderoperation - the
overwriteparameter to theNuxeoDrive.CreateFileoperation
Deprecated:
FileSystemItemManager#createFolder(String parentId, String name, Principal principal)FileSystemItemManager#createFile(String parentId, Blob blob, Principal principal)FolderItem#createFolder(String parentId, String name, Principal principal)FolderItem#createFile(String parentId, Blob blob, Principal principal)
See NXP-21854.
Nuxeo Drive - Synchronization Root Behavior
Synchronization root is now reset with a copied document. In LTS 2016 and earlier, copying a synchronization root Document resulted in creating a new synchronization root.
To re-activate the old behavior:
<extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
<property name="org.nuxeo.drive.resetSyncRootsOnCopy">false</property>
</extension>
See NXP-21676.
Complementary Information
From 9.1 to 9.2
Installation and Configuration
With VCS, delete the column hierarchy.changetoken so that it is regenerated with the correct type. For instance: ALTER TABLE hierarchy DROP COLUMN changetoken. See NXP-22259.
New Parameters
| Parameter | Default | Reference |
|---|---|---|
org.nuxeo.runtime.reload_strategy |
Default Value to restart |
NXP-19326 |
nuxeo.automation.scripting.inline-context-in-params |
Default Value to false |
NXP-22190 |
nuxeo.automation.allowVirtualUser |
Default Value to false |
NXP-21889 |
nuxeo.conf
Add the following parameter in order to keep consistency with the previous hot-reload strategy: org.nuxeo.runtime.reload_strategy=unstash.
Data
Directories
SQL Directories
If you did not use an explicit SQL configuration template (postgresql, mssql, mysql or mariadb), you must add the new sql template in your nuxeo.conf, in addition to the default template. You should at least have:
nuxeo.templates=default,sql
MongoDB Directories
Directories are now stored in MongoDB when enabling the mongodb template. You don't need to install the addon Nuxeo MongoDB Audit and Directories anymore, which is only needed for Audit now. See NXP-21582.
Migrating your directories to MongoDB
To migrate your custom directories to MongoDB, enable the mongodb template and use the extension point org.nuxeo.ecm.directory.GenericDirectory instead of org.nuxeo.ecm.directory.sql.SQLDirectoryFactory. See NXP-19175.
Using MongoDB with SQL directories
If you want to keep your custom SQL directories, contribute them to the extension point org.nuxeo.ecm.directory.sql.SQLDirectoryFactory.
Code Changes
Code Behavior Changes
- Class
org.nuxeo.ecm.core.blob.BlobManager.BlobInfomoved toorg.nuxeo.ecm.core.blob.BlobInfo. See NXP-22217.
- In
nuxeoctl, theregister-trialcommand reads parameters:./nuxectl register-trial [<firstname> <lastname> <email> <company> <project>]. See NXP-22550.
- During OAuth2 challenge (as identity provider), parameters
stateandredirect_uriare now mandatory for security reason. See NXP-22183 and NXP-22186.
Deprecated APIs
OAuth2Client
- Constructor
OAuth2Client(String name, String id, String secret)is deprecated. See NXP-22183.
Addons
Segment.io - Updated
Nuxeo Segment.io plugin is now aligned on com.github.segmentio:analytics:1.0.7, thus it has received a big update and breaks backward compatibility. See NXP-22462 and NXP-22212.
Complementary Information
From 9.2 to 9.3
Installation and Configuration
Requirements
- Elasticsearch >= 5.6.x is required.
New Parameters
| Parameter | Modification | Reference |
|---|---|---|
nuxeo.server.tomcat_error.show_report |
Default Value to false |
NXP-22592 |
nuxeo.server.tomcat_error.show_report_info |
Default Value to false |
NXP-22592 |
nuxeo.faceted.tag.service.enabled |
Default Value to false |
NXP-21651 |
Parameters to Update
| Parameter | Modification | Reference |
|---|---|---|
nuxeo.works.total.default.scheduled.count |
Renamed to nuxeo.works.total.default.scheduled |
NXP-22996 |
org.nuxeo.runtime.reload_strategy |
Default value to standbyunstash was removed |
NXP-22546 |
nuxeo.conf
It is no longer needed to define org.nuxeo.runtime.reload_strategy=unstash (introduced in 9.2), this behavior has been removed in favor of standby strategy.
Data
Elasticsearch
Elasticsearch 5.6.x is required. Follow those necessary steps to upgrade:
- Upgrade Elasticsearch version
- Update your custom settings and mapping to follow new Elasticsearch rules
- Re-index the repository to apply the new settings and mapping
- Update your custom code that queries Elasticsearch directly
Upgrade Elasticsearch Version
If your indices have been created with LTS 2016 they are in Elasticsearch 2.x format and can be read by Elasticsearch 5.6, in this case follow the full cluster restart upgrade procedure.
If your indices have been created before LTS 2016 they are in Elasticsearch 1.x format and Elasticsearch 5.x will not start, in this case an index need to be migrated to the new Elasticsearch 5.x format:
- The repository index named
nuxeoby default doesn't need this migration because the repository will be re-indexed in the next step, so once this index has been backed up you can delete it. - The sequence index named
nuxeo-uidgencannot be migrated because the_sourcefield is disabled, Nuxeo will take care to re-create this index at startup, so once this index has been backed up you can delete it. - The audit index named
nuxeo-auditneed to be migrated. Follow the reindex upgrade procedure.
Please refer to Elasticsearch documentation for more information on upgrading your Elasticsearch cluster.
Update Your Custom Elasticsearch Settings and Mapping
If you have a custom configuration for Elasticsearch it needs to be adapted to follow the new 5.6 rules. It is probably easier to start from the default Nuxeo 9.3 configuration and migrate your necessary change instead of modifying your existing contribution directly.
Since Nuxeo 9.3, you can configure the settings and mapping by overriding JSON files in your custom template:
The default settings is located in
templates/common-base/nxserver/config/elasticsearch-doc-settings.json.nxftl. The important changes are that settings no longer supports an analyzer alias (thefulltextalias need to be removed).The default mapping is located in
templates/common-base/nxserver/config/elasticsearch-doc-mapping.json. The important changes are:- Type
stringmust be rewritten tokeyword(in place ofnot_analyzedstring) ortext(theanalyzedstring version) not_analyzedis deprecated type it should be replaced bykeyword- Type
multi_fielddoes not exists anymore, it must be rewritten as typekeywordortext _allis disabled. A customall_fieldis used instead. By default all string fields are copied to this field, to not index a field this requires to add a mapping without the"copy_to": "all_field"instruction.- Text field used for sorting or aggregating must be of type
keywordortextwithfielddata=trueproperty - Text field used with NXQL
LIKErequires atextfield. If the field is also used for sorting it must befielddata. For instancedc:title:"dc:title": { "type": "text", "copy_to": "all_field", "fielddata": true, "fields": { "fulltext": { "type": "text", "analyzer": "fulltext" } } }, - Highlight must be done on
textfield with afulltextanalyzer.
- Type
Re-Index the Repository
The new mapping and setting for the repository index must be applied, this means that the entire repository must be re-indexed.
When using the JSF UI this can be done from the Admin > Elasticsearch > Admin page.
Or this can be done via REST:
curl -v -X POST 'http://localhost:8080/nuxeo/site/automation/Elasticsearch.Index' -u Administrator:Administrator -H 'content-type: application/json+nxrequest' -d '{"params":{},"context":{}}'
Update Your Custom Code That Query Elasticsearch Directly
Any custom native queries done using the passthrough or code need to be reviewed to follow Elasticsearch 5 query format, for instance:
filteredquery must be replaced withboolquerynotfilter should be replaced with aboolquery- Aggregate
size=0to get all buckets is not anymore supported the size must be explicitly defined (> 0) - There is no more default
_allfield.query_stringandsimple_query_stringmust use the new customall_fieldfield.
Keeping Old Tags
The tag implementation has changed in 9.3. If you want to keep your old tags, add the following contribution:
<require>org.nuxeo.ecm.platform.tag.service.migrator</require>
<extension target="org.nuxeo.runtime.migration.MigrationService" point="configuration">
<migration id="tag-storage">
<defaultState>relations</defaultState>
</migration>
</extension>
If you want to migrate tags to the new storage model, follow the Tag migrations steps.
Tag Migration
To migrate tags to the new storage model:
Follow the step from section Keeping old tags.
In the Nuxeo Platform's JSF UI, go to Admin > System Information > Migration, click the button Migrate tags from relations to facets and wait until migration is completed.
Remove the contribution added at step 1.
Code Changes
Code Behavior Changes
- A new
statusCodefield has been added toNuxeoExceptionto specify which HTTP code should be returned in case the exception is thrown, default to500. See NXP-21776.
- New
org.nuxeo.ecm.platform.query.api.PageProvider#getResultsCountLimitmethod to access the limit of number of results beyond which the page provider may not be able to compute the result count. See NXP-23202.
- Setting the value of a complex property now overwrites any previous values, and does not do a partial update anymore. See NXP-19261.
NuxeoGroupImplclass has been moved toorg.nuxeo.ecm.platform.usermanagerpackage. The code relying on it must be updated. See NXP-20619.
Operation Changes
- Operations
Document.CopySchema,Document.AddFacetandDocument.RemoveFacethave a new parametersaveto force a session save or not. See NXP-22912.
Deprecated APIs
Group Entity-type (REST)
The groupname and grouplabel properties at the root are deprecated. id property must be used instead of groupname. Both are now part of the properties field with all others group schema properties. See NXP-22542.
Nuxeoctl register-trial
The command nuxeoctl register-trial has been deprecated. See NXP-23122.
WebException
WebException (and most subclasses) has been deprecated, NuxeoException (and subclasses) are now the exceptions to be thrown. See NXP-21776.
Complementary Information
From 9.3 to LTS 2017
Installation and Configuration
New Parameters
| Parameter | Modification | Reference |
|---|---|---|
nuxeo.core.readacl.async.enabled |
Default value to true |
NXP-23788 |
nuxeo.core.readacl.async.threshold |
Default value to 500 |
NXP-23788 |
Addons
nuxeo-mqueues - Deprecated
The nuxeo-mqueues addon is replaced by nuxeo-stream. See NXP-23854.