Skip to content

Updating to Venta Theme 1.7.0.1

A patch release on top of 1.7.0. It carries one structural change - CMS content can now compile Tailwind server-side - plus three storefront fixes and a change to Venta's seeded CMS content. There is no Magento or Hyvä version change, and no build-stack migration.

Composer and deploy are on this page. The CMS compilation setup is not: that procedure lives on Server-side Tailwind Compilation.

Recommended reading before starting:

What changed

CMS Tailwind moves to ^2.0

hyva-themes/magento2-cms-tailwind-jit is now required at ^2.0 by the theme package. Version 2 drops the Tailwind v3 in-browser compiler that version 1 shipped and replaces it with an in-browser Tailwind v4 compiler, fed by a generated stylesheet.

Server-side compilation is a separate option, and it needs two more packages that the theme lists under suggest, not require: hyva-themes/magento2-cms-tailwind-jit-bridge and hyva-themes/magento2-cms-tailwind-recompile. The Composer update alone does not give you a daemon.

Two things to know:

  • The theme package itself now requires hyva-themes/magento2-cms-tailwind-jit at ^2.0, so the correct version arrives transitively and your project needs no entry of its own. A leftover pin in your project's root composer.json (typically "^1.2", from when the theme required only "*") conflicts with the theme's ^2.0 and blocks the update: remove that line (composer remove hyva-themes/magento2-cms-tailwind-jit); the package stays installed as a dependency of the theme.
  • app/design/frontend/Magebit/venta/etc/cms-tailwind-jit-theme-config.json is gone. It pointed at a browser JIT config file that never existed, so nothing read it. Delete your child theme's copy if it has one.

The theme also gained a generate-browser-jit npm script in web/tailwind, which produces the tailwind.browser-jit.css the in-browser v4 compiler needs. It ships in the vendor theme only, so a child theme has to add its own script entry pointing at the generator in the vendor package - see the fallback section for the exact line.

Seeded CMS content is now .phtml

In magebitcom/magento2-venta-theme-module, the seed content files under Setup/{Blocks,Pages,Templates} are renamed from .html to .phtml, and the Hyvä CMS 404 page and top-header markup move out of Setup/HyvaCmsSeeder.php into Setup/HyvaCms/*.phtml files. The theme's Tailwind build scans the whole module directory (hyva-sources emits an @source entry per registered module), which is why Venta's packaged CMS content needs no JIT setup at all; the rename aligns the seed files with template conventions. If your project seeds its own CMS content from a module, keep that module registered for Hyvä config generation so its seed files are scanned too.

Storefront fixes

  • The layered-navigation filter tooltip now sits beside the filter label instead of the middle of the header row, and its Alpine state is registered rather than inline, so it no longer trips a strict CSP.
  • The header cart item-count badge uses a 2px top-right corner radius, matching the design.
  • The Contact Us form subtitle no longer repeats the page heading.

These touch templates that projects commonly override: Magento_Theme/templates/html/header.phtml, Magento_Contact/templates/form.phtml, and the ElasticSuite module's catalog/layer/view.phtml and catalog/layer/js/init-layered-navigation-js.phtml. If you override any of them you will not get the fix until you re-base - see File Review.

Prerequisites

  • Access to hyva-themes/magento2-cms-tailwind-jit 2.x in your Hyvä Packagist tenant. The theme requires it, so without it the update does not resolve at all. Check with composer show hyva-themes/magento2-cms-tailwind-jit -a; if 2.x is not listed, request access from Hyvä before starting.
  • Venta Theme 1.7.0. If you are further back, work through Updating to 1.7.0 first.
  • Node 20 or newer for the theme build. This was already true in 1.7.0.

For server-side compilation you also need access to hyva-themes/magento2-cms-tailwind-jit-bridge and hyva-themes/magento2-cms-tailwind-recompile, and the infrastructure listed in Requirements.

Do you need to set up CMS compilation?

Venta's own packaged CMS content is styled by the static theme build, so a stock install renders correctly with no JIT setup at all. This only matters for CMS content you author: CMS pages, CMS blocks, product descriptions and category descriptions.

First, does it apply to you? If you are unsure whether your CMS content uses Tailwind classes, check the stored content for utility classes before deciding:

sql
SELECT COUNT(*) FROM cms_block WHERE content REGEXP 'class="[^"]*(flex|grid|text-|bg-|p[xytblr]?-[0-9])';
SELECT COUNT(*) FROM cms_page  WHERE content REGEXP 'class="[^"]*(flex|grid|text-|bg-|p[xytblr]?-[0-9])';

Non-zero on either means yes. Content seeded programmatically through RecurringData or Setup is compiled by the static build instead, so it does not count.

AnswerWhat to do
No Tailwind classes in authored CMS contentDo steps 1 and 2, then stop.
Yes, and you can run a long-lived Node process on every content-editing environment, with web/tailwind/ (including node_modules/ and generated/*) deployed to the runtimeUse the server-side daemon. It compiles against your theme's own toolchain and stores only the delta CSS.
Yes, but you cannot meet that (Adobe Commerce Cloud, shared hosting, or a build that strips node_modules/)Use the in-browser v4 fallback: npm run generate-browser-jit plus the compiler_version setting.

WARNING

Since the 1.6.0 Tailwind v4 migration, the in-browser compiler the v1 module shipped has been compiling authored CMS content against stock Tailwind: the theme config file it reads was dropped in that migration. Every entity saved in admin since then has stock-compiled CSS stored and renders with stock values today. Picking a compiler fixes future saves only; to repair existing content, run bin/magento hyva:cms-tailwind:recompile (server-side route) or re-save the affected entities in admin (fallback route, which has no recompile command).

1. Update Composer dependencies

json
{
  "require": {
    "magebitcom/magento2-venta-theme": "1.7.0.1",
    "magebitcom/magento2-venta-theme-module": "1.7.0.1",
    "magebitcom/magento2-venta-theme-smile-elasticsuite-module": "1.7.0.1"
  }
}

Remove the hyva-themes/magento2-cms-tailwind-jit line from your project's own composer.json first if it has one; the theme carries the ^2.0 requirement itself, so the package keeps arriving as its dependency. If you are going the server-side route, add the two bridge packages in the same run so the compiler mode and the daemon arrive together:

bash
composer require hyva-themes/magento2-cms-tailwind-jit-bridge hyva-themes/magento2-cms-tailwind-recompile

Then:

bash
composer update \
  magebitcom/magento2-venta-theme \
  magebitcom/magento2-venta-theme-module \
  magebitcom/magento2-venta-theme-smile-elasticsuite-module \
  --with-all-dependencies
composer show hyva-themes/magento2-cms-tailwind-jit   # must report 2.x

The other Venta packages are unchanged in this release and stay where they are: Style Guide 1.0.3, Back In Stock 1.1.0, PayPal 1.0.2, User Type Switcher 1.0.0.

2. Deploy

bash
bin/magento maintenance:enable
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

Then rebuild theme assets in your child theme:

bash
cd app/design/frontend/<Vendor>/<ProjectTheme>/web/tailwind
npm ci
npm run build-prod

Stay in maintenance mode if you installed the bridge

Installing magento2-cms-tailwind-jit-bridge switches the compiler mode to daemon on setup:upgrade, before any daemon or token exists. Saving CMS content in that window returns a compiler error and stores no CSS. Finish step 3 before running bin/magento maintenance:disable.

If you are not setting up the daemon, disable maintenance mode now and you are done.

3. Set up CMS compilation

Only if the table above sends you here. Work through Server-side Tailwind Compilation end to end: