Upgrading from WebForms 3
What it does
Upgrades a store that runs WebForms 3 to WebForms 4, in place. Your forms, fields, submissions and files stay where they are. Each form's email settings become that form's notifications, and its thank-you message and redirect become its confirmation. The upgrade adds what WebForms 4 needs and keeps the database columns and tables WebForms 3 stored its settings in. It removes only two kinds of rows: leftovers of things you had already deleted in WebForms 3, such as the counters of a deleted form, and older copies of an answer that WebForms 3 stored more than once for the same submission. An older copy with a different value then exists only in your backup. All the work happens on your server, on the command line.
You can upgrade from any WebForms 3 version straight to WebForms 4. If you stay on WebForms 3 for a while, even a short one, install WebForms 3.6.6 first: it closes security issues in WebForms 3.0–3.6.5. Update the WebForms Hyvä package to 2.2.11 and the Product Options add-on to 3.3.5 with it, if your store has them.
This page covers the common path. The full upgrade notes for developers come with WebForms in the file
UPGRADE.md: once the WebForms 4 package is installed (step 5), it's at
vendor/mageme/module-webforms-base/UPGRADE.md, or at app/code/MageMe/WebForms/UPGRADE.md on a store that copied
the modules into its code folder. They also cover your own code that uses WebForms classes.
Before you start
- Command-line (SSH) access to the server, in the Magento root folder. If someone else manages your server, send this page to them.
- A copy of your store to try the upgrade on first. Run every step there, check the result, then repeat on the
live store. A copy of the live database holds the addresses of your real customers and staff, so before you run
anything on the copy, switch off its outgoing email and keep Magento's cron off there. Otherwise the copy can
email real people. Set Disable Email Communications to Yes with
bin/magento config:set system/smtp/disable 1(in the admin: Stores → Configuration → Advanced → System → Mail Sending Settings), or ask your developer to send the copy's email to a test mailbox. - A quiet time for the store. The store is in maintenance mode during the upgrade, so visitors can't send forms.
- Magento 2.4.6 or later and PHP 8.1 or later, with Magento's Page Builder and Login as Customer Assistance modules installed and switched on. Upgrade Magento or PHP first if your store runs an older version. A Hyvä store on Magento 2.4.6 needs 2.4.6-p6 or later: the Hyvä theme module asks for it. See Compatibility.
- The MageMe Core package 2.2.2 or later. You name it in the Composer command of step 5, and Composer installs it; a store that copied the modules into its code folder by hand must update Core by hand too. With an older Core the forms show but never send.
- Admin roles that should keep working with their forms. In WebForms 4, a form's pages, the builder and the preview also need Manage Forms. Before the upgrade, give Manage Forms to every role that works with forms. See Roles and permissions.
- Magento's scheduled tasks (cron) running on the live store after the upgrade, because WebForms 4 sends its emails from cron. If Asynchronous Sending is on in WebForms 3, cron also sends WebForms 3's emails before the upgrade (step 1).
Steps
Run the commands in the Magento root folder on your server.
Prepare on WebForms 3
-
Check whether WebForms 3 still owes emails. Go to Stores → Configuration → MageMe Extensions → WebForms and look at Asynchronous Sending under Email. With No, the default, WebForms 3 sends each email at the moment of the submission, and there's nothing to wait for. With Yes, it sends submission emails later, from cron. The upgrade doesn't send the emails WebForms 3 left waiting and doesn't hand them to WebForms 4: it only records each one as unsent in its migration journal. So with Yes, let cron run until the emails for the last submissions in your store have arrived in the mailboxes your forms send to.
-
Run the readiness check while the store still runs WebForms 3, before you install the WebForms 4 package. It reads the store's module list and database and changes nothing. Run it with the same PHP that runs
bin/magento: that PHP can read your database, and any PHP 7.4 or later will do. Download the script and its checksum file into your Magento root folder:On the server, the commands below download both files. Then they check that the script arrived intact and run it from your Magento root folder:
cd /path/to/magentocurl -fsSLO https://github.com/mageme/webforms-upgrade-check/releases/latest/download/wf4-readiness.phpcurl -fsSLO https://github.com/mageme/webforms-upgrade-check/releases/latest/download/wf4-readiness.php.sha256sha256sum -c wf4-readiness.php.sha256php wf4-readiness.phpThe checksum command prints
wf4-readiness.php: OK. On macOS useshasum -a 256 -c wf4-readiness.php.sha256. The check's own output starts with its version and ends with one of three verdicts:- READY: go ahead.
- READY WITH WARNINGS: go ahead after you read every line marked
[WARNING]. Each one names something the upgrade changes on your store, by form and field, and says what to do. See What the warnings mean below. - NOT READY: lines marked
[BLOCKING]need action. They are: Magento older than 2.4.6, a missing Page Builder or Login as Customer Assistance module, a MageMe Core older than 2.2.2 copied into the code folder, a copy of an add-on that is now part of WebForms left in the code folder, or a switched-off WebForms API module. A line marked[ERROR]means the check could not read your store, for example its database; it names the cause.
At this point only read the report. An old Magento or a missing Magento module is fixed before you start the upgrade, as for any Magento update. The code-folder lines and the WebForms API line are fixed later, after the backup: step 5 and step 8 say when.
When the report is long, it starts with
[SUMMARY]lines that count the forms and fields of each kind of finding. Lines marked[INFO]don't stop the upgrade; each says what it found. If one of the add-ons that are now part of WebForms (Page Builder, Digital Signature, Customer Registration, Reference Number or Print) is still switched on inapp/etc/config.php, an[INFO]line names it and says there is nothing to do. Composer removes the add-on's files in step 5, andsetup:upgradein step 8 takes it out of the module list. Don't switch it off withmodule:disableon the running store: that clears the generated code, and the store stays down untilsetup:di:compile. The options and exit codes are on CLI, cron and queues. -
Put the store into maintenance mode:
bin/magento maintenance:enableThen stop Magento's cron, and keep it off until step 13. Otherwise a scheduled task can start on half-replaced code, or write the old settings back into the cache you clear in step 8. Cron is usually stopped by commenting out Magento's lines in the crontab of the user that owns the Magento files (
crontab -e); ask your developer or hosting provider if your server starts cron another way. -
Back up the database and the files
composer.json,composer.lock,app/etc/config.phpandapp/etc/env.php, all at the same moment. If you copied the MageMe modules into your code folder by hand, back up the foldersapp/code/MageMeandapp/code/Hyvaat the same moment too. Back up the files visitors uploaded to your forms as well: in WebForms 3 they are inpub/media/webforms. You don't need to back up thevendorfolder: going back reinstalls it fromcomposer.jsonandcomposer.lockwithcomposer install. This backup is your only way back: see If you need to go back.
Install WebForms 4
-
Install the WebForms 4 packages in one step. The WebForms 4 package replaces the WebForms 3 package and the Print, Reference Number, Customer Registration, Page Builder and Digital Signature add-ons, which are now part of WebForms. The WebForms 4 theme, GraphQL and product add-ons replace their WebForms 3 packages the same way. Composer removes the replaced packages itself. The eight integrations (Freshdesk, HubSpot, Klaviyo, Mailchimp, Salesforce, Zapier, Zendesk and Zoho) are different: their WebForms 4 packages don't replace the WebForms 3 ones, and WebForms 4 doesn't install next to a WebForms 3 integration, so take their lines out first. The WebForms 3 Cart2Quote add-on has no WebForms 4 version and stops the install too: remove it.
The commands below are for a store that installed WebForms 3 with Composer. A store that keeps WebForms in its code folder follows WebForms in app/code below instead.
WebForms 4 comes from the repository address of this store's license. The address a WebForms 3 store has,
https://repo.mageme.com, doesn't list the WebForms 4 packages, so change it first. In My Products open WebForms, go to the Install tab, choose the license for this store and copy the command. It looks like this, with the serial number of your license in place ofYOUR-SERIAL; your keys stay the same:composer config repositories.mageme composer https://repo.mageme.com/s/YOUR-SERIALWithout this change Composer answers that it can't find the WebForms 4 package. The new address still lists your WebForms 3 packages.
-
List the MageMe packages your store has now:
composer show 'mageme/*' -
Take the old WebForms lines out of your store's
composer.json: everymageme/module-webforms-3…package, andmageme/module-webformson a store that started on WebForms 3.0. Name each one your list shows:composer remove --no-update mageme/module-webforms-3 \mageme/module-webforms-3-zapier # …and the other WebForms 3 packages your list showsLeft in,
mageme/module-webformsstays installed next to WebForms 4, and both register the same module. Amageme/module-webforms-3line left in stops the next command: Composer says the two "cannot coexist". -
Name WebForms 4, MageMe Core and the WebForms 4 version of every add-on you have, then let Composer update the MageMe packages:
composer require --no-update mageme/module-core:^2.2.2 mageme/module-webforms-base:^4.0 \mageme/module-webforms-addon-zapier:^4.0 # …and the rest of your add-onscomposer update 'mageme/*'Use these two commands rather than one
composer require. On a store whose lock file holds MageMe Core 1.x together with an add-on that is now part of WebForms, such as Print, a singlecomposer requirestops withfound mageme/module-core[2.2.2] but these were not loaded. The two commands also went through on the stores where a single one worked.Composer then changes only MageMe packages, and adds the PDF library mPDF if your store doesn't have it yet. It updates every MageMe package in your store, so other MageMe products there must be available from the MageMe repository too. Name MageMe Core in the first command: otherwise a store that has Core 2.1 stops with "fixed to 2.1.2 by a partial update". Don't add
--with-dependencies: it lets Composer update every package WebForms depends on, and on a test store that changed about 60 other packages, among them a new major version of a payment module.With the Zendesk integration, add
zendesk/zendesk_api_client_php:^3.1.1to the first command: the WebForms 4 integration needs a newer Zendesk library than a WebForms 3 store has. With the HidePrice add-on, update MageMe HidePrice Pro to 3.1.4 or later and addmageme/module-webforms-addon-hideprice:^4.0to the first command. A WebForms 3 HidePrice add-on copied into the code folder isn't seen by Composer: delete its folder first.If an integration or your own code uses the WebForms 3 REST API, for example to read forms and submissions or to send a form, add
mageme/module-webforms-api:^4.0to the first command. In WebForms 4 those addresses come with the WebForms API package, not with WebForms itself. The same addresses and access tokens keep working. A form's answer no longer carries its email settings (the notification address, Bcc, sender and on/off switches): in WebForms 4 they belong to the form's notifications. A submission's answer addscustom_status.If Composer stops and names
https://repo.magento.comnext to amageme/…package, for example thatmageme/module-corethere "has higher repository priority", your Magento repository offers older MageMe packages. Open your store'scomposer.json, find the entry underrepositorieswith"url": "https://repo.magento.com/", and add the line"exclude": ["mageme/*"]to it. Then run the two commands again. Composer then no longer takes MageMe packages from the Magento repository.
Add the WebForms package for your theme to the first command:
- Hyvä:
mageme/module-webforms-base-hyva:^4.0. It replaces the WebForms 3 Hyvä packages. It needs the Hyvä theme module 1.3.11 or later. Keep it on the same version as WebForms whenever you update. Left out, Composer removes the WebForms 3 Hyvä package and installs nothing in its place. If the WebForms 3 Digital Signature Hyvä package is still in yourcomposer.json, Composer stops instead and names it. - Breeze:
mageme/module-webforms-base-breeze:^4.0. It replaces the WebForms 3 Breeze package,mageme/module-webforms-3-breeze, and Composer removes that one. The Product Options add-on has its own Breeze package,mageme/module-webforms-addon-product-options-breeze, which replaces its WebForms 3 Breeze package the same way. - Product Options:
mageme/module-webforms-addon-product-options:^4.0, and on Hyvä alsomageme/module-webforms-addon-product-options-hyva:^4.0. They replacemageme/module-webforms-3-product-optionsand…-product-options-hyva.
Check every add-on from another vendor that uses WebForms before you start. If it works only with WebForms 3, Composer stops at this step and names it. If it also accepts newer versions, it stays installed, and it may fail because it was written for WebForms 3. In both cases, ask its vendor for a WebForms 4 version, or remove it before the upgrade.
-
WebForms in app/code
A store that copied WebForms 3 into app/code replaces the folders instead of running the Composer commands
above. Do it here, in maintenance mode and after the backup of step 4: removing a folder on the live WebForms 3
store breaks its forms.
- Delete every WebForms folder, the add-ons included:
app/code/MageMe/WebForms*andapp/code/Hyva/MageMeWebForms*. WebForms 3 add-ons don't work with WebForms 4. Download the WebForms 4 version of every WebForms add-on you own from My Products and copy it in together with WebForms; add-ons that are now part of WebForms have no separate download. Deleteapp/code/MageMe/Coreonly if your WebForms 4 archive has its replacement. Delete the folders first: files of WebForms 3 left next to the new ones are not cleaned up. - Put the WebForms 4 files in their place: WebForms in
app/code/MageMe/WebForms, your add-ons next to it, and MageMe Core 2.2.2 or later inapp/code/MageMe/Core. If anything calls the WebForms REST addresses, also add the WebForms API inapp/code/MageMe/WebFormsApi: without it, those addresses answer that no route matches. - Install the libraries the modules need: a store without Composer doesn't get them by itself. The file
INSTALL.txtin the archive gives thecomposer requirecommand for each one, such as the PDF library mPDF, which WebForms 4 needs, or the library of an integration. Skip mPDF ifcomposer show mpdf/mpdfalready lists it, for example because the WebForms 3 Print add-on brought it:Without it,composer require mpdf/mpdf:^8setup:di:compilein step 8 stops with an error that anMpdfinterface was not found.
Then go on with step 6. In the preflight, use php app/code/MageMe/WebForms/bin/preflight.php.
Check your email settings with the preflight
-
Run the preflight. It reads your database, writes nothing, and doesn't need the rest of the upgrade:
php vendor/mageme/module-webforms-base/bin/preflight.phpIf WebForms was copied into the code folder instead of installed with Composer, run
php app/code/MageMe/WebForms/bin/preflight.php. It lists every form with the emails it will get, then ends with one word: CLEAN (nothing to fix), PROBLEMS (fix the list under Problems to fix before setup:upgrade first) or NOTHING TO MIGRATE. Read How to read the preflight report below. -
If the preflight on your copy finds problems, fix each one in the admin of your live store, which still runs WebForms 3. Then make a fresh copy and start again. On the live store, the preflight should then say CLEAN.
Once the WebForms 4 package is installed, the WebForms 3 admin is gone, so problems found at this point can't be fixed there. The upgrade still finishes. The upgrade check names the forms whose emails didn't move, and you set those emails up on the form's Notifications tab.
Run the upgrade
-
Clear Magento's cache by hand, before any
bin/magentocommand on the new code.bin/magento cache:flushcan't do it at this point: the cache still holds the WebForms 3 setup, andbin/magentocan stop before the command runs. With Magento's file cache:rm -rf var/cache/* var/page_cache/*If your store keeps its cache in Redis or Valkey, ask your developer to empty the two cache databases named in
app/etc/env.php(the cache and the page cache), or only this store's keys when other data shares them. The full commands are inUPGRADE.md, under Running the upgrade from 3.x.Then clear the two
generatedfolders, also before anybin/magentocommand. In production mode this is a must: code compiled for WebForms 3 stopsbin/magentothe same way.rm -rf generated/code generated/metadataIf the readiness check named a switched-off WebForms API module, switch it on now:
bin/magento module:enable MageMe_WebFormsApiThen update the database and rebuild the store's generated files:
bin/magento setup:upgradebin/magento setup:di:compileOn a Hyvä store, rebuild your theme's styles (its Tailwind CSS) at this point, so that the next command deploys the new stylesheet. First let Hyvä update its list of modules with styles, then build the theme in its
web/tailwindfolder:bin/magento hyva:config:generatecd app/design/frontend/Vendor/theme/web/tailwind && npm install && npm run build && cd -Replace
Vendor/themewith the folder of your own Hyvä theme. The WebForms Hyvä package adds its styles to that build; without the rebuild, parts of the forms show without their styles. Build the theme before the deploy command. The deploy doesn't replace a stylesheet that's already deployed: if you built the theme after it, run step 8 again frombin/magento setup:upgrade, which clears the deployed files. Then deploy the static files:rm -rf var/view_preprocessedbin/magento setup:static-content:deploy -fClearing the two
generatedfolders first matters: code built for the old version stops the upgrade. Cron stays off until step 13. Stay in maintenance mode until the static files are deployed. If the deploy stops on a theme, see Troubleshooting. -
Fill in the Inbox columns of your old submissions. Without this, submissions sent before the upgrade show in the Inbox with no subject and no sender. The command can be run again and continues where it stopped:
bin/magento webforms:backfill inboxIt ends with
Inbox back-fill complete: … result(s) projected.Every old submission gets its subject, and the sender's name where the submission has one. The sender's email address is filled in only where the form has an email field; on submissions of other forms it stays empty. -
Run the upgrade check:
bin/magento webforms:upgrade:checkIt ends with READY, READY WITH WARNINGS or NOT READY. With warnings you can go on after you read every line marked
[WARNING]. The check only reads; it changes nothing. See How to read the upgrade check. To see whether one of the WebForms 3 add-ons that WebForms 4 now includes (Page Builder, Digital Signature, Customer Registration, Reference Number and Print) is still installed, run the readiness check from step 2 again, from your Magento root folder:php wf4-readiness.php. Its Hyvä and Magento 2.4.6 lines repeat what step 2 said and need nothing more once the upgrade is through. When it finds nothing that blocks, it ends with READY or READY WITH WARNINGS.Each problem the check names is fixed from the command line, as described under How to read the upgrade check, except
Form … cannot deliver a Form Submitted email: that one needs the admin. Maintenance mode closes the admin as well as the storefront, except for the IP addresses you let through. To reach the admin, let your own IP address through, fix the form, run the check again, and remove your address afterwards:bin/magento maintenance:allow-ips <your IP address>bin/magento maintenance:allow-ips --noneFrom your address you also see the storefront while the store is in maintenance mode. If you open the store with only such forms left, the storefront works and the forms accept submissions, but those forms send no Form Submitted email until you fix them.
-
Check the system log. The upgrade check from step 10 shows the three findings below as information lines; Magento's system log,
var/log/system.log, has the detail for each notification. Search it for lines that containWebForms. The ones that need you:the storefront theme "…" (ID …) is not present in the code base: a theme a store view is set to is missing from your code, so the upgrade used WebForms' own email text instead of the copy customised in that theme. Restore the theme, or check the text of the notifications it names. The warning appears once per theme, however many notifications and store views use it.keeps the 3.x custom From "…" as a grandfathered sender (DMARC/SPF may reject it): the form's emails still go out from the sender address it had in WebForms 3. Ask whoever runs your email to check that your domain's mail settings allow your store to send from that address; otherwise receiving mail servers may reject these emails. The address stays in force until you save the notification in the admin. From then on, the email goes from the Sender Identity selected on the notification. Where the WebForms 3 address was the same as one of your store's email identities, the upgrade sets that identity on the notification straight away.text that no longer resolves on … form(s): some form text still uses WebForms 3 variables. Runbin/magento webforms:report legacy-valuesto see where. Its heading still says to fix them before upgrading; fix them now. Product Options price tags in option labels, such as{{price 15}}, can be on that list too. They still work: leave them. It doesn't list store blocks and widgets in form texts: the readiness check from step 2 names those.
-
Switch email delivery on. After the upgrade, Deliver Notifications is No, so no email goes out yet: the scheduled task that sends WebForms emails runs but sends nothing, and emails wait in the queue until delivery is on (see How email delivery works). Set it from the command line. If your forms should keep the look of your theme's own input boxes instead of the WebForms 4 style, switch that style off now too, before the storefront opens (the third line; see How the forms look under What to review afterwards). Then clear the cache:
bin/magento config:set webforms/notifications/delivery_enabled 1bin/magento config:set webforms/appearance/modern_fields 0 # only to keep the theme's own input stylebin/magento cache:flushLater you'll find the delivery setting at Stores → Configuration → MageMe Extensions → WebForms, under Email & Replies → Notification Delivery.
Run the upgrade check again. With delivery on, it now ends with READY or READY WITH WARNINGS, unless a problem line is left:
bin/magento webforms:upgrade:checkIf your store runs Varnish or a CDN that keeps pages, such as Fastly or Cloudflare, purge its whole cache too, for two reasons. Pages stored before the upgrade still carry the old WebForms 3 popup addresses, so their form buttons open nothing until each page is stored again. And in WebForms 3 a page with a form could hand the signed-in customer's session to the blocks after the form, so a page stored then may show what such a block printed for another customer.
On Magento 2.4.9 with Magento's file cache,
cache:flushcan leave some cached pages and settings in place. If the store still shows something from before the upgrade, use Flush Cache Storage: see Old pages or settings stay after clearing the cache. -
Start Magento's cron again: WebForms 4 sends every email from cron. If your crontab runs only selected cron groups, add the WebForms delivery group to it: see CLI, cron and queues. Then open the store again:
bin/magento maintenance:disable
If you need to go back
Going back means restoring the backup from step 4 and rebuilding the store on the WebForms 3 code. The rebuild
matters: without setup:upgrade, the WebForms 4 scripts stay in the store's static files, and the WebForms 3
forms show but don't send, with no error.
- Put the store into maintenance mode and stop cron, as in step 3.
- Restore the database,
composer.json,composer.lock,app/etc/config.php,app/etc/env.phpand the uploaded files inpub/media/webforms, all from the same backup. If you copied the MageMe modules into your code folder, first delete the folderapp/code/MageMeand the MageMe folders inapp/code/Hyva, then restore them from the backup. Restoring over them leaves WebForms 4 files behind:setup:upgradethen stops, writes WebForms 4 into the restored WebForms 3 database, and the store shows an error page. The database then has to be restored again. - Reinstall the code of your backup, clear the cache and generated code by hand, and rebuild the store:
With Redis or Valkey, empty the cache databases instead ofcomposer install --no-devrm -rf var/cache/* var/page_cache/* var/view_preprocessed generated/code generated/metadatabin/magento setup:upgradebin/magento setup:di:compilebin/magento hyva:config:generate # Hyvä onlycd app/design/frontend/Vendor/theme/web/tailwind && npm run build && cd - # Hyvä onlybin/magento setup:static-content:deploy -fbin/magento cache:flush
var/cacheandvar/page_cache, as in step 8. - Start cron again and open the store:
bin/magento maintenance:disable
WebForms 4 keeps the files visitors upload in its own storage folder, by default var/webforms. Files uploaded
after the upgrade stay there and don't come back with the backup. Emails WebForms 4 sent before you went back can't
be recalled.
What the readiness warnings mean
WebForms 4 shows the texts of a form as safe HTML: the description, the text below the form, the success text and
a field's help text. It doesn't run what WebForms 3 ran in them. Each [WARNING] line says what it found and what to
do; a line about a form text names the form or field and the admin page to open. Nothing stored is changed; only
the storefront shows it differently. The common ones:
- A directive or a script in a form text, such as a store block, a widget or a script. WebForms 4 shows the text without it. Move it to an HTML field of the form, which still runs blocks, widgets and scripts, or to the form's On Load Script or After Submission Script.
- A link or image built from a store address.
{{store url}},{{store direct_url}},{{view url}}and{{media url}}with only their address keep working: they print the address of the store view the visitor is on, so these get no line. With any other option added, such as_query, WebForms 4 drops the placeholder, and a link built from it keeps only its text. The check names each one. In a field's help text every placeholder is dropped. - Headings, tables, style blocks and embedded frames. Headings and tables lose their formatting and keep their text. Style blocks and frames, such as an embedded video or map, are left out with their content. Keep a copy of what you need, and move a video or map into an HTML field.
- A variable in the description or the text below the form, such as an answer,
{{var result.email.value}}, or the form's name,{{var webform_name}}. WebForms 4 fills in no variable there. Write the text itself, or move it into the success text or a confirmation message. - A class on an option label or a label, on a Radio, Checkbox, Swatches, Newsletter or Toggle field. WebForms 4 keeps no class there, only an id. If your theme or a store script finds the label by that class, give the label an id and use it instead.
- Hyvä. On a Hyvä store, a line reminds you to add the WebForms Hyvä package to the same Composer command and to rebuild your theme's styles afterwards (steps 5 and 8).
- A class on a link or an image, an id or a
data-attribute in a form text. WebForms 4 keeps none of them there, so a theme style or a store script that found the element by them no longer finds it. Put the class on the paragraph around the link or image instead, or move such content to an HTML field of the form. - A directive in an option label. In option labels WebForms 4 runs only a translation phrase
(
{{trans "…"}}), a custom variable and the store address placeholders with only their address. Any other directive is left out, and a link or image built from it loses its address. Write the text or the address itself into the label in each store view. - An integration that uses the WebForms 3 REST API. The check names each integration and admin role with
rights to it. Add
mageme/module-webforms-api:^4.0to the Composer command of step 5. - A form with its own print template. WebForms 4 prints in the layout of its own PDF documents, not with this
template. To print with your template again, run
bin/magento webforms:upgrade:migrate pdf-templatesafter the upgrade: it copies the template into a PDF document of the form, switched off, and you turn that document on. Where WebForms 3 attached such a PDF to the approved or completed email, WebForms 4 attaches the customer copy instead.--acknowledge-print-templatesis no longer needed. - Answers stored more than once. The upgrade keeps the latest copy of each answer and deletes the older ones, also older ones with a different value. The line names the first 20 submissions. Back up before step 8.
- Submission PDFs left in
var/tmp. WebForms 3 left a copy of printed submission PDFs on the server. They hold customer data, and the upgrade leaves them where they are. The line gives the command that lists them, so your developer can review and delete them.
Lines marked [INFO] add notes that need no action, for example a form text placed over the page that WebForms 4
now keeps inside the form, or a recommended update of another MageMe extension. The readiness check also names
forms whose CAPTCHA has no keys and redirect addresses WebForms 4 won't fill in: see
What to review afterwards.
How to read the preflight report
A shortened report from a WebForms 3.5.6 store, after its problems were fixed:
WebForms 3.x → 4.0 email migration preflight
State: present
20 form(s): 20 migrate cleanly, 0 with problems; 10 known loss(es), 4 store override(s) archived, 0 unsent 3.x queue row(s).
- form 1 "Contacts": no mail settings
- form 13 "Sidebar Form": 5 notification(s)
…
CLEAN
- The summary line counts the forms, the forms with problems, the settings WebForms 4 has no place for (known losses), the email settings made for one store view that the upgrade won't carry over (store overrides), and the emails WebForms 3 still owes. Store view settings that do carry over aren't counted there.
- One block per form lists the notifications the form will get, one line each, with the event that sends it
and whether it's created on or off. An email that was switched off in WebForms 3 is created switched
off. A form whose approval controls were hidden gets no approval emails, because they never fired there. Each
line has four columns:
- The first names the email:
adminto your team,customerto the visitor,replyyour reply to a customer,customer_replythe alert to your team when a customer answers, andapproval:1,approval:-1andapproval:2the emails for Approved, Not Approved and Completed. - The second names the event that sends it, such as
submissionfor a new submission. - The third says whether the notification is created on or off.
- The fourth says where its text comes from:
legacy_templateand a number or name is the WebForms 3 email template it keeps using. That can be one of your own templates or a standard WebForms 3 email, such aslegacy_template #webforms_notification.legacy_defaultis the standard WebForms 3 email for that kind of message.
- The first names the email:
- Lines marked
note:say how the upgrade handles something on that form, and they aren't problems. For example,admin mail named no address; 3.x fell back to webforms/email/email = …, fixed heremeans the store-wide address WebForms 3 used each time it sent is now written into the notification, andmail to the visitor keeps its 3.x sender name "…"means the notification keeps the sender name it had. - Lines marked
!!are problems, and the same problems are listed again at the end. The common ones:address "…" is not valid: the form's email had no address of its own, and the store-wide WebForms address isn't an email address. WebForms 3 fell back to that address each time it sent. WebForms 4 writes it into the notification once, so enter a real address on the form or in the store-wide setting.the selected email template #… does not exist: the form names an email template that was deleted. Choose another template on the form, or the default one.… still wait for the 3.x notification cron: emails WebForms 3 hasn't sent yet. On your copy, this tells you to wait on the live store before you repeat the upgrade there. On the live store after step 5, these emails won't be sent any more: the upgrade records each one as unsent in its migration journal. The submissions themselves are kept and stay in the Inbox.
- Known losses and Store-view overrides aren't errors. They list each setting the upgrade keeps in its journal but doesn't apply. See Limits.
- Installed WebForms companions lists the WebForms add-ons and theme packages on your store. Install the WebForms 4 version of each: see step 5 and Add-ons under What to review afterwards. Print, Reference Number, Customer Registration, Page Builder and Digital Signature, and their Hyvä packages, can be on this list too: they are part of WebForms 4 and need nothing.
To keep the report, add --json to the command and save its output in a file.
How to read the upgrade check
The check from the same store, right after the upgrade, before step 12:
Delivery targets: empty (leased now: 0, open attempts: 0)
Delivery switch: off
Delivery cron: never ran
Forms: 20 live, 24 active notification(s), 16 without a Form Submitted notification, 16 that cannot deliver (16 had none in 3.x either)
3.x notification queue: 0 unsent submission(s)
3.x email migration ledger: archived=14, ok=51, … across 20 form(s)
Magento email template references: 0 published notification(s), 0 draft revision(s), 0 waiting target(s), 0 dispatch(es), 0 unresolved
Results widgets: no checked Results widget references a form with Publish Submissions off (…)
- Delivery is disabled while notifications are active; set webforms/notifications/delivery_enabled = 1.
NOT READY
Lines that start with a dash, right above the verdict, are problems: each names what to do, and any one of them makes the verdict NOT READY. All other lines are information.
The information lines:
- Delivery targets: emails waiting to be sent. Right after the upgrade there are none.
- Delivery switch: whether Deliver Notifications is on. It's off until step 12.
- Delivery cron: when the scheduled task that sends WebForms emails last finished. It says
never ranuntil Magento's cron runs it. This line never makes the verdict NOT READY, so it can still saynever rannext to READY: READY means the setup is complete, not that an email has gone out. Emails go out only while cron runs; see CLI, cron and queues. - Forms: the live forms, their active notifications, the forms without a Form Submitted notification and the forms that can't send a Form Submitted email. In brackets, those last forms are split by reason, and only the groups that have forms appear: forms that had such an email in WebForms 3 that isn't active now (the migration journal says why), forms that had none in WebForms 3 either, and forms created after the upgrade. A form whose WebForms 3 email to your team was switched off counts as having had none.
- 3.x notification queue: emails WebForms 3 left unsent. WebForms 4 doesn't send them (step 1).
- Inbox projection: submissions that have no subject and no sender in the Inbox yet. Step 9 fills them in.
- 3.x email migration ledger: what happened to each form's emails, counted by result. Emails WebForms 3 left
unsent are counted here as
unsent_legacy_queue. - Magento email template references: notifications that still use a Magento email template. The upgrade
moves each template's content into the notification, so these are normally all
0. - Forms with 3.x print templates: forms that had a custom print template in WebForms 3 (see
What the warnings mean). Their
PDFs now print with the WebForms 4 layout; the old template isn't used.
bin/magento webforms:upgrade:migrate pdf-templates --dry-runshows what each would carry over into a PDF document, which is created switched off; without--dry-run, the command carries them over. - Results widgets: a Results widget whose form doesn't publish its submissions yet. See What to review afterwards.
Form "…" (id …): the redirect address … cannot be filled in by WebForms 4: a confirmation sends visitors to an address that WebForms 4 won't fill in, so visitors get the confirmation message instead. See Confirmations under What to review afterwards. The readiness check from step 2 lists the same addresses before the upgrade.… customer notification attachment file(s) are still in the legacy directory: files attached to customer emails that are still in their WebForms 3 folder. They're still sent meanwhile. Runbin/magento webforms:files move-legacyto see why: without--moveit only reports and moves nothing. Then run it with--moveto move the files that can be moved.Custom From carried over from 3.x:the notifications that still send from the sender address their form had in WebForms 3, which the receiving mail server may reject. The line gives the number and names each one by form number, notification number and name, without the address, and adds(inactive)to a switched-off one. It is information only and doesn't change READY. The preflight report shows the same finding as anote:line on the form (see step 11).Store … : … e-mail templates cannot be read from it: a theme a store view is set to is missing from your code, so the notifications of that store view use WebForms' own email text instead of the copy customised in the theme. Restore the theme, or check those notifications (see step 11).Text that no longer resolves:the forms whose texts still use WebForms 3 variables. Runbin/magento webforms:report legacy-valuesfor the details (see step 11).- Form access: staff roles and API integrations that now reach only the forms ticked for them, or that reach every form because a module declares them. Shown only when there are some.
- Store view email settings: each line names the form, the notification and the store view. It lists a store
view that sends from its own sender address carried over from WebForms 3, a store view whose WebForms 3 email
template wasn't found and that now sends the default text, and a notification that is off for all store views
but on in one. It also lists store view settings the upgrade didn't carry, with the reason, and settings it
failed to carry: fix the cause, then run
bin/magento webforms:upgrade:migrate notificationsagain. - Confirmation type of a store view: a store view that redirected while the rest of the store showed the message, or the other way round. In WebForms 4 a form has one confirmation type, so that store view now does what the rest of the store does.
The problem lines you may see:
Delivery is disabled while notifications are active: step 12 hasn't been done yet. This is the last switch, not a fault in the migration.3.x email migration: … entr(ies) failed: fix the cause, such as an address or a template, then run:You don't need to runbin/magento webforms:upgrade:migrate notificationssetup:upgradeagain. The command picks up where the upgrade left off.… notification(s) were quarantined: notifications whose content couldn't be moved inside. Each one is switched off and sends nothing. The linesQuarantined (…):below it name each cause and how many notifications it affects. Fix the cause, then runbin/magento webforms:upgrade:migrate notification-templatesagain.… active notification(s) still point at a Magento email template: they can't send in WebForms 4. Runbin/magento webforms:upgrade:migrate notification-templates.… submission(s) show no subject and no sender in the inbox yet: run step 9.The notification tables are missing; run setup:upgrade first.: step 8 hasn't run on this database yet.… delivery target(s) are waiting with no body …: emails waiting to be sent that have no text and will never go out. Runbin/magento webforms:notifications retry --held.… delivery target(s) hold a content mode this build cannot send: contact MageMe support.Form … "…" cannot deliver a Form Submitted email: …: a form that sent an email when it was submitted in WebForms 3 and can't now. The line ends with the reason. Set the email up on the form's Notifications tab. Forms that sent no such email in WebForms 3 either aren't listed here; they're only counted in the Forms line.
After you fix something in the admin, such as an empty address, run the check again with --record. It then
also stores the result, so the Manage Forms list and the upgrade notice at the top of the admin show the new
state now rather than after the next scheduled refresh.
What to review afterwards
Go through these on the storefront and in the admin, one form at a time.
-
Emails. Go to Content → WebForms → Manage Forms, click the form's name, then Notifications. Each WebForms 3 email is a notification now. Send a test from each one: see Test and switch on an email. If an email still doesn't arrive, see Emails stopped after upgrading from WebForms 3. The subject of the email to your team can now start with the submission's number, such as
#07E90C057A:, also on forms whose WebForms 3 emails didn't show one. -
Submit button and captcha. Every form now has a Submit button and a Captcha element in the builder. A form that had neither gets both, with the captcha placed right above Submit; a form that already had them keeps its own. Neither can be deleted or switched off in the builder. Whether a form shows the captcha is set by Captcha Mode in the form's settings. See Submit Button field.
-
Sending. Every form now sends without reloading the page; the setting that made a form reload the page is gone. While the form is being sent, its button shows a spinner and "Sending...". Then the thank-you message takes the place of the form, or the visitor is taken to the page of its confirmation.
-
Version history. A form's history starts at the upgrade. The oldest entry of its Version History says "Version history before the upgrade is not available".
-
Customer replies. If customers answer from their account, check that the forms with that option have a notification for staff when a customer replies. See Notification triggers.
-
Confirmations. The thank-you message and redirect of each form are now its confirmation. Send one test submission per form and check what you see. See Confirmations. A redirect address can hold only a few placeholders now, such as an answer of the form, the reference number, the form's name or the store's address. An address with any other placeholder, or with an answer before the path, no longer sends visitors anywhere: they see the confirmation message instead. The upgrade check names each such address by form, store view and confirmation. See Redirects.
-
CAPTCHA keys. A form that asks for a CAPTCHA on a store view where the CAPTCHA service has no keys refuses every submission there with "Captcha is not set up on this store". The readiness check and the upgrade check list such forms. Add the keys, or switch the form's CAPTCHA off. See Protect forms with CAPTCHA.
-
Thumbnail sizes. The thumbnail sizes WebForms 3 had in its settings have no field in the admin of WebForms 4, but a size you set there still sizes the thumbnails of Image and Gallery answers.
-
Form statistics. Refresh Counters by Cron is on by default in WebForms 4, but a store that had switched it off keeps it off. Turn it on at Stores → Configuration → MageMe Extensions → WebForms, under Admin Interface → Manage Forms Counters; otherwise the forms list recounts the statistics each time it opens. See Settings: Admin Interface.
-
How the forms look. WebForms 4 draws inputs in its own style by default. To keep your theme's own input boxes, set Enable Modern Field Style to No, best before the storefront opens (step 12). A theme that restyled WebForms 3 forms by copying its stylesheet loses those rules: your developer moves them as described on Theme and template overrides. See also Luma, Hyvä and Breeze.
-
Published submissions. A Results widget shows nothing until Publish Submissions is on for its form. See Publishing results.
-
Statuses. Completed can't be set any more. Submissions that are already Completed keep it. If your team closed requests with Completed, add a status of your own: see Submission statuses. The email a form sent when a submission was completed is carried over but never sends. On forms that use approval, customers can now edit a submission only while it's Not Approved or Pending. To keep letting them edit approved ones, select Approved in Editable Submission Statuses: see Settings: Submissions & Privacy.
-
Hidden fields in submission titles. A field with Hide in Submissions is now left out of the Submission Title everywhere: the submission grid, the Inbox, the customer account, PDFs, replies and emails. The upgrade switches on Allow in Staff Email Subject for every hidden field a Submission Title already uses, in the form or in a store view, so the subjects of the emails your team gets, and of the tickets the Freshdesk, HubSpot, Zoho Desk and Zendesk integrations open, stay the same. Review those fields after the upgrade: Freshdesk, Zendesk and Zoho Desk (with Contact on -- Auto --) open the ticket in the name of the visitor, and Freshdesk and Zendesk email that person the ticket's subject by default; a HubSpot ticket is linked to the visitor's contact. Keep the setting on only for a value the visitor may see. Two cases still leave the hidden answer out of the subject:
- an email that also goes to an address the visitor typed into a field, or that is sent by hand to an address typed in for that one send;
- a submission whose title came from a field that was later deleted, when that field was hidden or its saved copy doesn't say.
Step 9 writes every title in the Inbox fresh. If you later switch on Hide in Submissions for a field a title uses, older submissions keep the old title in the Inbox until you run
bin/magento webforms:backfill inbox --form=<form id>. See General field settings. -
Form texts. The description, the text below the form, the success text and help texts are shown as safe HTML. Store blocks, widgets, scripts and embedded frames in them no longer show, and headings and tables keep only their text. Links and images built from the store's address keep working. Open each form the readiness check named in step 2 and move what you need into an HTML field. See What the readiness warnings mean and Safe HTML.
-
Texts placed over the page. A form text that a theme style placed over the rest of the page now stays inside the form.
-
Option labels. Labels of Radio, Checkbox, Swatches, Newsletter and Toggle fields keep no class, only an id. If your theme styles a label or a store script finds it by a class, switch it to an id.
-
Conversation messages. Replies and customer messages keep the formatting the reply editor gives: bold and italic, lists, links, pictures, tables, colors and fonts. Anything else, such as custom classes or attributes a page script reads, is removed when a message is shown, in older messages too. A message also stays inside its own box on the page. On Hyvä, that box works after the style rebuild of step 8. See Replies.
-
Staff roles. A role reaches every form only when All Forms is ticked in its WebForms permissions. Roles saved before the upgrade don't get the permissions that are new in WebForms 4, such as Approve Results and Inbox: select them for each role that needs them. See Roles and permissions.
-
Access to personal data. Every role and integration that had Get Information in WebForms 3 gets View Forms and Schema, View Submissions (Masked) and Disclose Personal Data from the upgrade, so it keeps reading submissions with the real answers. One that had Update Submitted Result gets Edit Submissions. If a role or connection shouldn't see personal data, clear Disclose Personal Data for it. See Personal data masking.
-
Integrations and AI assistants. A connection to the WebForms API, such as the AI assistant, needs the new Edit Form Scripts permission to add a script to a form. Without it, it also can't switch on, copy or publish a form whose texts or HTML fields run code; it can still switch such a form off. The upgrade gives this permission to no role or integration. Select it only for connections you trust with your storefront's code. See Permission reference.
-
Add-ons. Print, Reference Number, Customer Registration, Page Builder and Digital Signature are now part of WebForms. For any other WebForms add-on, install its WebForms 4 version. On Hyvä, keep the WebForms Hyvä packages on the same version as WebForms whenever you update. See Add-ons.
-
Other changes you may notice. Where a line names a setting, it's at Stores → Configuration → MageMe Extensions → WebForms unless the line says otherwise:
- Upload limit per visitor. A visitor can upload at most 50 files or 250 MB an hour; guests are counted by
their IP address. Behind a proxy or CDN, ask your developer to pass the visitor's real address to the store, or
set Uploads per Visitor per Hour and Upload Volume per Visitor per Hour (MB) under Uploads & Media
to
0. - Emails per submission. One submission sends at most 20 emails a day, across all its notifications. A form that sends more needs a higher Messages per Submission per Day, under Email & Replies → Advanced.
- Forms for customers only. A guest who opens such a form now sees a sign-in panel in its place, and the page stays where it is instead of jumping to the login page. Open the form's page as a guest to check.
- Remember Me. On a store with Enable Persistence on (Stores → Configuration → Customers → Persistent Shopping Cart), a visitor who is remembered but not signed in now sends forms as a guest. The submission isn't added to that customer's account.
- Theme copies of WebForms templates and styles. A theme copy of the WebForms 3 form stylesheet stops having any effect. A copy of the form button template that uses a WebForms 3 address opens nothing, and a copy of the slide-out template made from WebForms 3 can stop the whole page with an error. Ask your developer to compare your theme's WebForms copies with WebForms 4: see Theme and template overrides.
- reCAPTCHA keys of WebForms 3.0. A store still on WebForms 3.0 keeps its reCAPTCHA keys and settings: the
upgrade copies them under Spam Protection, and
bin/magento webforms:upgrade:migrate settingsruns the copy again. Keys your developer set inapp/etc/config.php,app/etc/env.phporCONFIG__environment variables instead of the admin aren't copied: your developer renames them there towebforms/captcha/recaptcha/…by hand. Check that Spam Protection shows them after the upgrade.
- Upload limit per visitor. A visitor can upload at most 50 files or 250 MB an hour; guests are counted by
their IP address. Behind a proxy or CDN, ask your developer to pass the visitor's real address to the store, or
set Uploads per Visitor per Hour and Upload Volume per Visitor per Hour (MB) under Uploads & Media
to
-
Uploaded files. WebForms 4 keeps new uploaded files outside the public folder of your store, by default in Magento's
varfolder. Some hosting set-ups replace or clean that folder, so ask your developer to choose a storage folder that is kept and backed up. Files from WebForms 3 stay where they were, and anyone who has their link can still open them, until your developer moves them with the file commands in CLI, cron and queues. The thumbnails WebForms 3 made of uploaded pictures are the exception: the upgrade moves them out of the public folder at once. The files themselves stay.
What you should see
- The upgrade check ends with READY or READY WITH WARNINGS.
- Content → WebForms → Manage Forms lists all your forms, and the Inbox shows your old submissions with their subjects, and with the sender's email address where the form has an email field.
- A test submission on each form shows its confirmation, appears in the Inbox, and its emails arrive at the same addresses as in WebForms 3, in every store view.
- Forms you placed with a widget on a CMS page or block, or with a block in your theme's layout, still show in the same place. WebForms 4 keeps the widget names and the forms' numbers, so you don't need to place them again.
Limits
- The upgrade keeps every database column WebForms 3 stored its form settings in. Some values change as they move: a form's description and the text below it become elements on the form's canvas and are cleared from their old place. Nothing is lost: each cleared text, with its store view versions and the copy in a draft opened before the upgrade, is archived in the migration journal. Some other WebForms 3 settings, such as the Customer Registration field mapping, are rewritten. Removing the old columns is a separate decision, not part of the upgrade.
- Some WebForms 3 settings have no place in WebForms 4. The preflight names each one by form, and the upgrade
keeps its value in its journal:
- the form's link in the admin menu;
- loading the form after the page;
- the email header switch;
- files attached to every customer email;
- whether the reference number goes into the email and into the PDF name. The reference number stays in the subject of the email to your team. The email to the customer shows it in its text instead of the subject.
- Email settings made for one store view in WebForms 3 carry over: the address and Bcc, the sender, the template, or an email switched off there become that notification's settings for the store view, so each store view sends as it did. Not carried: attachment settings of a store view, settings of a store view your store no longer has, and settings of a notification that was edited after an earlier upgrade attempt. The upgrade check names each of these, and the journal keeps their WebForms 3 values. See Notify your team.
- Visitors can't send forms while the store is in maintenance mode.
- The only way back is to restore the backup from step 4 and rebuild the store: see If you need to go back. Emails WebForms 4 sent before you went back can't be recalled.
Troubleshooting
bin/magentostops at once and says that a class ending inMigratedoes not exist. The cache still holds the WebForms 3 setup. Clear the cache by hand as in step 8, then run the command again. On some Magento versions before 2.4.9,setup:upgradeshows this error only at the end, after the database is already updated: clear the cache the same way and runsetup:upgradeagain.- The upgrade stops with
Type Error occurred when creating object: …\Interceptoror "class does not exist". Code generated for the version before was still in thegeneratedfolder. Otherbin/magentocommands then printFailed to load core Magento commandsandCommands like cache:flush, deploy:mode:set are UNAVAILABLE!too, and many of them stop, thoughbin/magento maintenance:enablestill works. Runbin/magento setup:upgradeagain: before it stopped, it emptiedgenerated/codeitself, so the second run goes through. - The static files deploy stops with "Unable to find a physical ancestor for a theme '…'". Magento's list of
themes in your database has that theme marked as one that exists only in the database, with no parent theme to
build it from. This comes from Magento's list of themes, not from WebForms, and the themes listed before the
message are already deployed. Ask your developer to correct that theme's entry in the list, or to deploy without
it. Before you leave a theme out, check at Content → Design → Configuration that no store view uses it: a
storefront whose theme is left out opens without its styles and scripts. The message names the theme by its
title; the deploy's progress lines show its code, such as
Vendor/theme:bin/magento setup:static-content:deploy -f --exclude-theme Vendor/theme - The upgrade stops because the WebForms 3 email settings are missing. The database has forms but not the columns WebForms 3 kept their email settings in. The message offers two ways out: restore the backup from step 4 and upgrade again, or accept that the WebForms 3 email settings are gone and set up the notifications by hand. Contact MageMe support before you choose.
- The upgrade was interrupted. Run
bin/magento setup:upgradeagain. Forms that already moved are skipped, and no notification is created twice. - Forms show but don't send. MageMe Core is older than 2.2.2. Update it and run step 8 again. If Core is
current, the store may still serve an old copy of the WebForms form script. Ask your developer to compare the
deployed
MageMe_WebForms/js/form-controller.jsunderpub/staticwith the module'sview/base/web/js/form-controller.js. A store that minifies JavaScript hasform-controller.min.jsthere instead, and noform-controller.js. If the deployed copy is out of date, delete the deployed WebForms files there and run step 8's deploy command again.
Doesn't happen in WebForms 4
Some problems that WebForms 3 stores reported are gone in WebForms 4:
- The page reloads on submit although AJAX submission is on. Forms always send without reloading the page, so there is no AJAX setting any more.
- A plain email address in the blocked list stops every submission. A full address blocks only that address. See Blocked email addresses.
- The Salesforce add-on creates contacts instead of leads. It creates a lead from each submission. See Salesforce.
- The date field accepts an entry such as "12a". A Date field is picked from a calendar, and a Birth Date field accepts only a real month and day. See Date field and Birth Date field.
What's next
- Custom code from WebForms 3: for developers, what to change in a module, theme or integration written for WebForms 3.
UPGRADE.mdin the WebForms package (see What it does): the full upgrade notes, including custom code written for WebForms 3.- Email notifications: how the notifications your emails became work.
- Going-live checklist: check email, spam protection and privacy before you open the store.
- Drafts, publishing and versions: opening a form in the builder creates a draft, and visitors keep seeing the live form until you publish.