Skip to content

Hardcoded path causes collisions #29373

Closed
@miguelbalparda

Description

@miguelbalparda

private $subdirectoryPath = 'analytics/';

This hardcoded path will cause issues when more than 1 Magento install is using the same server. It might be useful to make it unique per install, maybe using the domain URL or another unique value.

Preconditions (*)

  1. Magento Analytics installed
  2. More than one Magento instance on the same server

Steps to reproduce (*)

  1. Found static path $subdirectoryPath = 'analytics/'; in dir magento2/app/code/Magento/Analytics/Model/ExportDataHandler.php
  2. We used Magento 1st instance and made some minor code changes as per Hardcoded path causes collisions #29373 (comment) in CollectData.php and ExportDataHandler.php respectively to print the dir /private/tmp/analytics/tmp/.
  3. We used Magento 2nd instance and made same code changes in CollectData.php and ExportDataHandler.php respectively to print the dir /private/tmp/analytics/tmp/.

Issue: Both Magento instances are inserting the analytics data to the same path.

Expected result (*)

  1. Different Magento 2 installs will use different paths

Actual result (*)

  1. Different Magento 2 installs will use the same paths

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: Analytics / ReportingComponent: AnalyticsIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions