3.1 to 4.0.0-GA Migration
Misc
- In build.properties, replace
spring.instrument.path=../lib/spring-instrument-3.2.2.RELEASE.jarwithspring.instrument.path=../lib/spring-instrument-4.1.0.RELEASE.jar - In core/applicationContext.xml, remove beans
blInventoryClassTransformer,customClassTransformers, andorg.broadleafcommerce.common.extensibility.context.merge.LateStageMergeBeanPostProcessor - Add
fullName.required=Please enter your full name.to messages.properties - Add
validator.address.fullNameOnly=falseunder "Spring Validators" incore/src/main/resources/runtime-properties/common-shared.properties - Add
/sql/load_menu_data.sqltoblPU.hibernate.hbm2ddl.import_filesincore/src/main/resources/runtime-properties/common-shared.properties Add the following property to
core/src/main/resources/runtime-properties/common-shared.properties:# If set to true, the customer's email address will be used for login on the Site side use.email.for.site.login=true
Solr Updates
BLC_FIELD Data Changes
- The
PROPERTY_NAMEcolumn ofBLC_FIELDmust be updated to the following format if the field is obtained from a map:map(key).value. For example,productAttributes.heatRangewould need to be changed toproductAttributes(heatRange).value.
Updates for DemoSite's Solr schema.xml
TODO
Add the following dynamic field:
<dynamicField name="*_searchable" type="text_general" indexed="true" stored="false" />
Resource Handling
Add the following bean to
site/src/main/webapp/WEB-INF/applicationContext-filter.xmlandadmin/src/main/webapp/WEB-INF/applicationContext-admin-filter.xml.<bean id="resourceUrlEncodingFilter" class="org.springframework.web.servlet.resource.ResourceUrlEncodingFilter"/>
Then add the bean id as the first element in the
blPostSecurityFilterChainfilter chain for each file.In
admin/src/main/webapp/WEB-INF/applicationContext-admin.xml, replaceblJsResources,cssLocations, andblCssResourcesbean definitions with the following:<bean id="blJsResources" parent="adminJsResourceHttpRequestHandlerBase" /> <bean id="cssLocations" class="org.springframework.beans.factory.config.ListFactoryBean"> <property name="sourceList"> <list> <value>/css/</value> </list> </property> </bean> <bean id="blCssResources" parent="adminCssResourceHttpRequestHandlerBase" />
In
site/src/main/webapp/WEB-INF/applicationContext.xml, replaceblJsResources,blCssResources,blImageResources, andblFontResourcesbean definitions with the following:<bean id="blJsResources" parent="siteJsResourceRequestHandlerBase" /> <bean id="blCssResources" parent="siteCssResourceRequestHandlerBase" /> <bean id="blImageResources" parent="siteImageResourceRequestHandlerBase" /> <bean id="blFontResources" parent="siteFontResourceRequestHandlerBase" />
Remove the
webContentInterceptorbean fromadmin/src/main/webapp/WEB-INF/applicationContext-servlet-admin.xmlandsite/src/main/webapp/WEB-INF/applicationContext-servlet.xml.Add the following properties to
core/src/main/resources/runtime-properties/development-shared.properties:# Note that when bundle.enabled is normally set to false in development as changes to # file based resources (like CSS and JS) will not be picked up until the server is restarted # if this setting is true bundle.enabled=false # Don't version resources in development. If this property is true then changes to resources # on the file-system will require a server restart to be picked up. # # Used by blc:bundle and blc:resource tags to better support client-side browser # caching (see the "staticResourceBrowserCacheSeconds" property below). resource.versioning.enabled=false # Add no-cache headers to static resources in development to simplify debugging. # # This property represents the number of seconds to add to static file cache headers. This property is used # in the "demo" applicationContext.xml to set the cache-seconds property for # HTTPResourceHandlers # See org.springframework.web.servlet.resource.ResourceHttpRequestHandler staticResourceBrowserCacheSeconds=0 # Don't minify static resources (JS and CSS) in dev as it makes debugging to difficult minify.enabled=false # Don't cache resources or transformations in development resource.transformer.caching.enabled=false resource.caching.enabled=false
Thymeleaf Layout Dialect
Broadleaf now officially supports Thymeleaf's layout dialect. This allows for a more intuitive and readable method of including frequently used page components. To make use of the layout dialect, simply add thymeleaf.useLayoutDialect=true to core/common-shared.properties and follow the documentation linked above.
TODO add link to DemoSite changelog
Inventory Management
The quantity available field on BLC_SKU as well as the CheckAvailabilityActivity and DecrementInventoryActivity have been added to the framework out of the box. If you have performed any of the steps from the 3.1.0 to 3.1.1 migration doc then you should undo them.
Page Field Data
The relationship of Pages to their PageFields has been changed from a @ManyToMany to a @OneToMany, with the owning column on blc_page_fld. This means that blc_page_fld_map has gone away and will no longer be used. To update your data, you can at your own risk run the following query:
UPDATE blc_page_fld f SET page_id = (SELECT page_id FROM blc_page_fld_map m WHERE m.page_fld_id = f.page_fld_id)
Database Migration
Broadleaf provides the following Liquibase change logs to help with migrating your database:
Other Data Changes
Change
STARTING_DEPTHandENDING_DEPTHofBLC_CAT_SITE_MAP_GEN_CFGto 0 to avoid MultiTenant Site Map configuration issues.Make sure that the
SITE_DISCcolumn ofBLC_URL_HANDLERpoints to aPROFILEsite rather than aSTANDARDorTEMPLATEsite.