Skip to content

Update to latest version of v3.3

Before you start this procedure, make sure you have completed the previous step, Updating the app to v3.3.

Finally, bring your installation to the latest release of v3.3.

6. Update the database

Apply the following database update script:

1
mysql -u <username> -p <password> <database_name> < vendor/ibexa/installer/upgrade/db/mysql/ezplatform-2.5-to-ibexa-3.3.0.sql

If you are updating from an installation based on the ezsystems/ezplatform-ee metarepository, run the following command to upgrade your database:

1
php bin/console ibexa:upgrade

Caution

You can only run this command once.

Check the Location ID of the "Components" content item and set it as a value of the content_tree_module.contextual_tree_root_location_ids key in config/ezplatform.yaml:

1
- 60 # Components

If you are upgrading between Ibexa Commerce versions, add the content/read Policy with the Owner Limitation set to self to the "Ecommerce registered users" Role.

7. Update to the latest patch version

A. v3.3.2

Update entity managers

Version v3.3.2 introduces new entity managers. To ensure that they work in multi-repository setups, you must update the Doctrine schema. You do this manually by following this procedure:

  1. Run the php bin/console cache:clear command to generate the service container.

  2. Run the following command to discover the names of the new entity managers. Take note of the names that you discover:

    php bin/console debug:container --parameter=doctrine.entity_managers --format=json | grep ibexa_

  3. For every entity manager prefixed with ibexa_, run the following command:

    php bin/console doctrine:schema:update --em=<ENTITY_MANAGER_NAME> --dump-sql

  4. Review the queries and ensure that there are no harmful changes that could affect your data.

  5. For every entity manager prefixed with ibexa_, run the following command to run queries on the database:

    php bin/console doctrine:schema:update --em=<ENTITY_MANAGER_NAME> --force

VCL configuration for Fastly

If you use Fastly, deploy the most up-to-date VCL configuration.

Locate the vendor/ezsystems/ezplatform-http-cache-fastly/fastly/ez_main.vcl file, make sure that it has been updated with the following changes, and upload it to your Fastly:

  • Add the following lines:
1
2
3
if (req.restarts == 0 && resp.status == 301 && req.http.x-fos-original-url) {
    set resp.http.location = regsub(resp.http.location, "/_fos_user_context_hash", req.http.x-fos-original-url);
}
  • Move the #FASTLY recv macro call to a new location, right after the Preserve X-Forwarded-For in all requests section.

Optimize workflow queries

Run the following SQL queries to optimize workflow performance:

1
2
CREATE INDEX idx_workflow_co_id_ver ON ezeditorialworkflow_workflows(content_id, version_no);
CREATE INDEX idx_workflow_name ON ezeditorialworkflow_workflows(workflow_name);

Enable Commerce features

Commerce features in Experience and Content editions are disabled by default. If you use these features, after the update enable Commerce features by going to config\packages\ecommerce.yaml and setting the following:

1
2
3
4
5
ezplatform:
    system:
        default:
            commerce:
                enabled: true

Next, run the following command:

1
php bin/console ibexa:upgrade --force

Database update

If you are using MySQL, run the following update script:

1
mysql -u <username> -p <password> <database_name> < vendor/ibexa/installer/upgrade/db/mysql/ibexa-3.3.1-to-3.3.2.sql

B. v3.3.7

Commerce configuration

If you are using Commerce, run the following migration action to update the way Commerce configuration is stored:

1
php bin/console ibexa:migrations:migrate --file=src/bundle/Resources/install/migrations/content/Components/move_configuration_to_settings.yaml

Database update

Run the following SQL commands:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
CREATE TABLE IF NOT EXISTS `ibexa_workflow_version_lock` (
    `id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
    `content_id` INT(11) NOT NULL,
    `version` INT(11) NOT NULL,
    `user_id` INT(11) NOT NULL,
    `created` INT(11) NOT NULL DEFAULT 0,
    `modified` INT(11) NOT NULL DEFAULT 0,
    `is_locked` BOOLEAN NOT NULL DEFAULT true,
    KEY `ibexa_workflow_version_lock_content_id_index` (`content_id`) USING BTREE,
    KEY `ibexa_workflow_version_lock_user_id_index` (`user_id`) USING BTREE,
    UNIQUE KEY `ibexa_workflow_version_lock_content_id_version_uindex` (`content_id`,`version`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
CREATE TABLE IF NOT EXISTS ibexa_workflow_version_lock
(
    "id" SERIAL,
    "content_id" INTEGER,
    "version" INTEGER,
    "user_id" INTEGER,
    "created" INTEGER DEFAULT 0 NOT NULL,
    "modified" INTEGER DEFAULT 0 NOT NULL,
    "is_locked" boolean DEFAULT TRUE NOT NULL,
    CONSTRAINT "ibexa_workflow_version_lock_pk" PRIMARY KEY ("id")
);

CREATE INDEX IF NOT EXISTS "ibexa_workflow_version_lock_content_id_index"
    ON "ibexa_workflow_version_lock" ("content_id");

CREATE INDEX IF NOT EXISTS "ibexa_workflow_version_lock_user_id_index"
    ON "ibexa_workflow_version_lock" ("user_id");

CREATE UNIQUE INDEX IF NOT EXISTS "ibexa_workflow_version_lock_content_id_version_uindex"
    ON "ibexa_workflow_version_lock" ("content_id", "version");

C. v3.3.9

Database update

Run the following scripts:

1
mysql -u <username> -p <password> <database_name> < vendor/ibexa/installer/upgrade/db/mysql/ibexa-3.3.8-to-3.3.9.sql
1
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-3.3.8-to-3.3.9.sql

D. v3.3.24

VCL configuration for Fastly

Ibexa DXP now supports Fastly shielding. If you are using Fastly and want to use shielding, you need to update your VCL files.

Tip

Even if you do not plan to use Fastly shielding, it is recommended to update the VCL files for future compatibility.

  1. Locate the vendor/ezsystems/ezplatform-http-cache-fastly/fastly/ez_main.vcl file and update your VCL file with the recent changes.
  2. Do the same with vendor/ezsystems/ezplatform-http-cache-fastly/fastly/ez_user_hash.vcl.
  3. Upload a new snippet_re_enable_shielding.vcl snippet file, based on vendor/ezsystems/ezplatform-http-cache-fastly/fastly/snippet_re_enable_shielding.vcl.

8. Finish the update

A. Platform.sh changes

If you are hosting your site on Ibexa Cloud be aware of the fact that Varnish is enabled by default as of v1.13.5, v2.4.3 and v2.5.0. If you are using Fastly, read about how to disable Varnish.

B. Dump assets

Dump web assets if you are using the prod environment. In dev this happens automatically:

1
2
yarn install
yarn encore prod

If you encounter problems, additionally clear the cache and install assets:

1
2
3
4
php bin/console cache:clear -e prod
php bin/console assets:install --symlink -e prod
yarn install
yarn encore prod

C. Commit, test and merge

When you resolve all conflicts and update composer.lock, commit the merge.

You may or may not keep composer.lock, depending on your version management workflow. If you do not want to keep it, run git reset HEAD composer.lock to remove it from the changes. Run git commit, and adapt the message if necessary.

Go back to master, and merge the update-3.3 branch:

1
2
git checkout master
git merge update-3.3

Insecure password hashes

To ensure that no users have unsupported, insecure password hashes, run the following command:

1
2
3
4
# In v1 and v2:
php bin/console ezplatform:user:validate-password-hashes
# In v3:
php bin/console ibexa:user:validate-password-hashes

This command checks if all user hashes are up-to-date and informs you if any of them need to be updated.

D. Complete the update

Complete the update by running the following commands:

1
2
3
4
5
6
# In v2.5:
php bin/console ezplatform:graphql:generate-schema
# In v3:
php bin/console ibexa:graphql:generate-schema

composer run post-install-cmd

Notify support

Please tell support that you have updated your installation. They will update your support portal to match the new version. This ensures that you receive notifications about new maintenance releases and security advisories for the correct version. You can contact support at support@ibexa.co or through your Support portal.