Page MenuHomeIn-Portal Phabricator

MINC-211 PHP Notice when adding product to discount/affiliate plan
Needs ReviewPublic

Authored by erik on Jul 31 2025, 5:51 AM.

Details

Reviewers
alex
Summary

removed excessive TitleField key from discount items and affiliate plan items configuration

Test Plan

Preparations - make api tab working

  1. In the affiliate_plans_config.php uncomment 'api' in the 'SubItems' array.
  2. In the affiliate_plans_config.php uncomment 'items' in the 'EditTabPresets' array.
  3. Fix affilite_plans_items.tpl - add pagination_prefix="api" parameter to the RenderElement name="combined_header" tag.

Testing di unit changes

  1. login to the adm. console
  2. go to the E-commerceDiscounts & Certificates section
  3. use adm.console interface in the current section to create new discount record, with some sub-records on the Items tab
  4. confirm that records are created on the Items tab
  5. go to the Logs & ReportsSystem Log section
  6. confirm that no record with warning 'Field "Name" is not defined in "di" unit config' appeared in the System Log
  7. confirm that no record with notice 'Undefined index: Name' appeared in the System Log

Testing api unit changes

  1. login to the adm. console
  2. go to the E-commerceAffiliates section go to 'Affiliate Plans' tab
  3. use adm.console interface in the current section to create new affiliate plan record, with some sub-records on the Items tab
  4. confirm that records are created on the Items tab
  5. go to the Logs & ReportsSystem Log section
  6. confirm that no record with warning 'Field "Name" is not defined in "api" unit config' appeared in the System Log
  7. confirm that no record with notice 'Undefined index: Name' appeared in the System Log

Diff Detail

Repository
rINP In-Portal
Branch
branches/5.2.x
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 11189
Build 3889: arc lint + arc unit

Event Timeline

erik created this revision.Jul 31 2025, 5:51 AM
erik requested review of this revision.Jul 31 2025, 5:51 AM
erik edited the test plan for this revision. (Show Details)Jul 31 2025, 5:51 AM
alex retitled this revision from MINC-211 Fix discount items configuration to MINC-211 Remove "TitleField" option for the di/coupi/api units.Aug 1 2025, 3:31 AM
alex requested changes to this revision.EditedAug 1 2025, 3:36 AM
  1. I've noticed, that the same issue happens also with coupi and api units of the In-Commerce. Please expand the Differential Revision code/test plan to cover them as well.
  2. I've noticed, that you're testing, that notice is gone, but not testing that item adding code still works. Please test that as well.
  3. I've also renamed the task. Please rename your changelist in the PhpStorm to avoid accidental Differential Revision rename on patch update.
This revision now requires changes to proceed.Aug 1 2025, 3:36 AM
erik updated this revision to Diff 1438.Mon, Feb 2, 6:22 AM

Added similar fix for the api unit

erik edited the summary of this revision. (Show Details)Mon, Feb 2, 6:24 AM
erik edited the test plan for this revision. (Show Details)
erik edited the test plan for this revision. (Show Details)
erik added a comment.Mon, Feb 2, 6:28 AM

No such notice in the coupi unit. TitleField for coupi unit was not configured.

alex retitled this revision from MINC-211 Remove "TitleField" option for the di/coupi/api units to MINC-211 PHP Notice when adding product to discount/affiliate plan.Mon, Feb 2, 7:33 AM