Skip to content

Clarified Attribute Option already exists response #39941

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 2.4-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2378,7 +2378,7 @@ public function getUploader()
/**
* Uploading files into the "catalog/product" media folder.
*
* Return a new file name if the same file is already exists.
* Return a new file name if the same file already exists.
*
* @param string $fileName
* @param bool $renameFileOff [optional] boolean to pass.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ private function parseStructuredSampleOption(array $sampleOption): array
/**
* Uploading files into the "downloadable/files" media folder.
*
* Return a new file name if the same file is already exists.
* Return a new file name if the same file already exists.
*
* @param string $fileName
* @param string $type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function add($entityType, $attributeCode, $option)
if ($attribute->getSource()->getOptionId($label) !== null) {
throw new InputException(
__(
'Admin store attribute option label "%1" is already exists.',
'Admin store attribute option label "%1" already exists.',
$option->getLabel()
)
);
Expand Down Expand Up @@ -110,7 +110,7 @@ public function update(
if (!empty($optionIdByLabel) && (int)$optionIdByLabel !== (int)$optionId) {
throw new InputException(
__(
'Admin store attribute option label \'%1\' is already exists.',
'Admin store attribute option label \'%1\' already exists.',
$option->getLabel()
)
);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Eav/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ hello,hello
"The value of attribute not valid","The value of attribute not valid"
"EAV types and attributes","EAV types and attributes"
"Entity types declaration cache","Entity types declaration cache"
"Admin store attribute option label ""%1"" is already exists.","Admin store attribute option label ""%1"" is already exists."
"Admin store attribute option label ""%1"" already exists.","Admin store attribute option label ""%1"" already exists."
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function testUpdate()
*/
public function testUpdateWithAlreadyExistsException()
{
$this->expectExceptionMessage("Admin store attribute option label '%1' is already exists.");
$this->expectExceptionMessage("Admin store attribute option label '%1' already exists.");
$testAttributeCode = 'select_attribute';

$newOptionData = [
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/File/Uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ private function createDestinationFolder(string $destinationFolder)
}

/**
* Get new file name if the same is already exists
* Get new file name if the same already exists
*
* @param string $destinationFile
* @return string
Expand Down