Skip to content

Commit

Permalink
Merge pull request #1 from Lai0n/master
Browse files Browse the repository at this point in the history
FIX: do not automatically force remove identifier attributes
  • Loading branch information
michaelgracious authored Feb 3, 2023
2 parents d75cf85 + a8ab778 commit eecc22b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@

Internal bundle for Akeneo with utility commands

Provides extra commands for:
Provides extra commands for
-

- Deleting attributes (capable of deleting also identifiers)
- Deleting attribute families
- Deleting attribute family variants
- Deleting products
- Deleting product models
- Deleting product models

Caveats when removing attributes
-

Akeneo blacklists deleted attributes until they are cleaned from products by job runners.
This bundle does not clean the table for it as it is quite unsafe to do so. Therefore you should either run the runners
or delete contents of the table 'pim_catalog_attribute_blacklist' but beware that you can corrupt your database doing that.
We strongly advise that you should use job runners for cleaning of the blacklisted attributes.
2 changes: 1 addition & 1 deletion src/Command/PimMassDeleteAttributesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private function removeAttribute(SymfonyStyle $io, InputInterface $input, Attrib
}
else {
$io->error(
sprintf("Cannot remove attribute '%s' because it's an identifier!", $attribute->getCode())
sprintf("Cannot remove attribute '%s' because it's an identifier! (for removal of this identifier run command 'pim:mass-delete:attributes -f')", $attribute->getCode())
);
return;
}
Expand Down
4 changes: 1 addition & 3 deletions src/Command/PimMassDeleteSystemFlushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
'pim:mass-delete:product-models' => [],
'pim:mass-delete:family-variants' => [],
'pim:mass-delete:families' => [],
'pim:mass-delete:attributes' => [
'-f'
],
'pim:mass-delete:attributes' => [],
];

foreach ($commands as $command => $args) {
Expand Down

0 comments on commit eecc22b

Please sign in to comment.