Skip to main content
Version: next

Set up the Magento 1 backend

The CMS stores its pages and media through your connector. With the Magento 1 flavour, the PageBuilder module and a REST role must be in place before content managers can edit pages.

Enabling cms("magento1") in your front-commerce.config.ts is only the Front-Commerce side of the setup (see the CMS overview). The Magento 1 backend must also be configured for the editor and publishing to work.

Register the extension after Magento 1

cms("magento1") reads the Magento 1 connector's services when the server starts — to resolve content storage and the media library. It must therefore be registered after magento1() in your extensions array:

front-commerce.config.ts
export default defineConfig({
extensions: [
magento1({ storesConfig }),
cms("magento1"),
],
// …
});

A Magento 1 connector that is itself correctly configured is a prerequisite — see Set up the Magento 1 extension and its environment variables.

Install the PageBuilder module

Since version 1.10 on the FrontCommerce_PageBuilder module

Content storage and the media library are served by the FrontCommerce_PageBuilder Magento module. Install it on your Magento 1 instance and keep it enabled — see Set up the Magento module. While the module is disabled, every CMS route returns 404 and the editor and media library stay unavailable.

Grant the pagebuilder REST role

The CMS reaches Magento through its REST API, gated by Magento's REST roles. The whole media API is admin-only: browsing folders, searching, uploading, creating, and deleting all go through the admin OAuth consumer, which must carry the pagebuilder role (System > Web Services > REST Roles).

Without this role the media library is unreachable. Who may edit on the storefront is a separate, Front-Commerce-side decision driven by contribution mode.

Media storage

Media is stored in your Magento instance, under the wysiwyg/pagebuilder/ media subtree, and served through the public /cms/media/<id> route like every other backend. For local development against an instance with no media set up, you can force the built-in filesystem backend instead:

.env
FRONT_COMMERCE_CMS_MEDIA_DANGEROUSLY_FORCE_FILESYSTEM=true

As its name suggests, this is a development-only escape hatch: it ignores the connector's media backend entirely and stores files on the local filesystem.

Limitations

Renaming files and folders is not available on Magento 1.

Next