Broadleaf Microservices
  • v1.0.0-latest-prod

Tenant Release Notes for 1.7.15-GA

Requirements

  • JDK 11 is required for Broadleaf release trains 1.7.0-GA, and beyond.

  • JDK 17 is supported for Broadleaf release trains 1.8.1-GA, and beyond.

New Features & Notable Changes

  • Added support for resolving Applications by context-path.

    • Introduced a new identifier type of CONTEXT_PATH. Applications using this type will have their identifier value treated as the first path segment in a URL: If the identifier is my-app, then it will be resolved on URLs like https://localhost/my-app. The identifier is expected to only match the first path segment not any arbitrary subsequent segment. Therefore, https://localhost/some-path/my-app would not match.

Bug Fixes

  • Fixed issue where vendorRef isn’t populated to the application’s isolated implicit catalog

    • Note that this is only relevant if broadleaf.common.data.application.configuration.allow-vendor-catalog-in-application-isolated-catalogs is enabled and the isolated catalog is a vendor catalog

    • Deprecated the property broadleaf.tenant.application.allow-vendor-catalog-in-application-isolated-catalogs, use DataTracking’s broadleaf.common.data.application.configuration.allow-vendor-catalog-in-application-isolated-catalogs instead

    • Added validations and metadata level restriction to ensure that when vendor catalogs are added as isolated catalogs, they:

      • Cannot be visible as assigned

      • Must be excluded from add

      • This is because content such as categories & products must be added to the vendor catalogs directly at the tenant level instead when they are added as isolated catalogs

    • Refer to this script to address records created before these changes d == Upgrade Guide

Script to populate vendorRef for implicit catalogs based on their parent catalog

This is only needed if broadleaf.common.data.application.configuration.allow-vendor-catalog-in-application-isolated-catalogs is enabled, to populate records created prior to the bug fix where the value of vendorRef remains missing.

Populate vendorRef value for implicit catalogs (PostgreSQL)
-- liquibase formatted sql

UPDATE tenant.blc_tenant_catalog tcat_update
SET vendor_ref        = subquery.vendor_ref,
    updated_timestamp = ((now()) AT TIME ZONE ('UTC'))
FROM (SELECT tappcat.implicit, tcat_parent.vendor_ref
      FROM tenant.blc_tenant_catalog tcat_parent
               INNER JOIN tenant.blc_tenant_application_catalog tappcat
                          ON tcat_parent.id = tappcat.context_id
      -- We only care about main catalogs whose vendor ref is not null
      WHERE tcat_parent.vendor_ref IS NOT NULL) AS subquery
WHERE tcat_update.id = subquery.implicit;

-- Trigger a re-sync of catalog tables across all schemas
DELETE
from tenant.blc_notification_state
where ENTITY_TYPE = 'com.broadleafcommerce.tenant.provider.jpa.domain.JpaTenantCatalog'
  AND notification_name = 'PERSISTENCE';

INSERT INTO tenant.blc_notification_state (ID, CONTAINER, ENTITY_TYPE, CHANGE_TIMESTAMP, CHANGE_TIMESTAMP_ACK, ACKED,
                                           STOPPED,
                                           ATTEMPTS, NEXT_ATTEMPT, NOTIFICATION_NAME, MESSAGE_TYPE, MESSAGE_VALUE)
SELECT concat('blc_', id::VARCHAR),
       id,
       'com.broadleafcommerce.tenant.provider.jpa.domain.JpaTenantCatalog',
       ((now() - INTERVAL '1 HOUR') AT TIME ZONE ('UTC')),
       NULL,
       'N',
       'N',
       0,
       NULL,
       'PERSISTENCE',
       NULL,
       NULL
FROM tenant.blc_tenant_catalog;
Populate vendorRef value for implicit catalogs (Oracle)
-- liquibase formatted sql

UPDATE TENANTSCHEMA.blc_tenant_catalog tcat_update
SET updated_timestamp = (systimestamp at time zone 'UTC'),
    vendor_ref        = (SELECT tcat_parent.vendor_ref
                         FROM TENANTSCHEMA.blc_tenant_catalog tcat_parent
                                  INNER JOIN TENANTSCHEMA.blc_tenant_application_catalog tappcat
                                             ON tcat_parent.id = tappcat.context_id
                         -- We only care about main catalogs whose vendor ref is not null
                         WHERE tcat_parent.vendor_ref IS NOT NULL
                           AND tcat_update.id = tappcat.implicit);

-- Trigger a re-sync of catalog tables across all schemas
DELETE
from TENANTSCHEMA.blc_notification_state
where ENTITY_TYPE = 'com.broadleafcommerce.tenant.provider.jpa.domain.JpaTenantCatalog'
  AND notification_name = 'PERSISTENCE';

INSERT INTO TENANTSCHEMA.blc_notification_state (ID, CONTAINER, ENTITY_TYPE, CHANGE_TIMESTAMP, CHANGE_TIMESTAMP_ACK,
                                                 ACKED,
                                                 STOPPED,
                                                 ATTEMPTS, NEXT_ATTEMPT, NOTIFICATION_NAME, MESSAGE_TYPE, MESSAGE_VALUE)
SELECT concat('blc_', ID),
       id,
       'com.broadleafcommerce.tenant.provider.jpa.domain.JpaTenantCatalog',
       ((systimestamp - INTERVAL '1' HOUR) at time zone 'UTC'),
       NULL,
       'N',
       'N',
       0,
       NULL,
       'PERSISTENCE',
       NULL,
       NULL
FROM TENANTSCHEMA.blc_tenant_catalog;