-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Describe the bug
I am trying to save a new field onto a voucher type, when saving, am just getting:
Undefined variable $request
on
1. in /var/www/html/vendor/verbb/gift-voucher/src/controllers/VoucherTypesController.php
at line 68
{
$this->requirePostRequest();
$voucherType = new VoucherType();
$voucherType->id = $this->request->getBodyParam('voucherTypeId');
$voucherType->name = $this->request->getBodyParam('name');
$voucherType->handle = $this->request->getBodyParam('handle');
$voucherType->skuFormat = $this->request->getBodyParam('skuFormat');
$voucherType->descriptionFormat = $request->getBodyParam('descriptionFormat');
// Site-specific settings
$allSiteSettings = [];
foreach (Craft::$app->getSites()->getAllSites() as $site) {
$postedSettings = $this->request->getBodyParam('sites.' . $site->handle);
$siteSettings = new VoucherTypeSite();
$siteSettings->siteId = $site->id;specifically:
$voucherType->descriptionFormat = $request->getBodyParam('descriptionFormat');
Steps to reproduce
- Navigate to Gift Voucher > Voucher Types
- Click on voucher
- Hit save, or try modifying field and then hitting save
Craft CMS version
5.8.2
Plugin version
4.0.11
Multi-site?
Yes
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels