Използваме бисквитки с цел подобряване и персонализиране на услугата и съдържанието на сайта. Научи повече.
Magento Update 2.4.2 -> 2.4.3
Magento Update 2.4.2 -> 2.4.3
This is what was required to successfully update Magento 2.4.2 to 2.4.3:
cp composer.json composer.json.bak
composer require magento/product-community-edition=2.4.2 --no-update
composer update
composer require magento/product-community-edition=2.4.3 --no-update
vi composer.json
"require-dev": {
"allure-framework/allure-phpunit": "~1.4",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"friendsofphp/php-cs-fixer": "~2.18.1",
"lusitanian/oauth": "~0.8.10",
"magento/magento-coding-standard": "*",
"magento/magento2-functional-testing-framework": "^3.0",
"pdepend/pdepend": "~2.7.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpmd/phpmd": "^2.8.0",
"phpstan/phpstan": "^0.12.77",
"phpunit/phpunit": "^9",
"sebastian/phpcpd": "^6.0.3",
"squizlabs/php_codesniffer": "~3.5.4",
"symfony/finder": "^5.2"
},
…...
composer update
bin/magento setup:upgrade
fix table
bin/magento c:c
bin/magento c:f
composer suggest
Problem with table “catalog_url_rewrite_product_category” - We encountered problems running bin/magento setup:upgrade
Integrity constraint violation: 1062 Duplicate entry ‘...’ for key 'PRIMARY', query was: ALTER TABLE `catalog_url_rewrite_product_category` ADD CONSTRAINT PRIMARY KEY (`url_rewrite_id`)
The problem was multiple entries with the same PRIMARY KEY (`url_rewrite_id`)
FIX 1
SELECT * FROM `catalog_url_rewrite_product_category`) WHERE `url_rewrite_id` = “.....”
SELECT * FROM `catalog_url_rewrite_product_category`) GROUP BY `url_rewrite_id` WHERE `url_rewrite_id` = “.....”
And delete the duplicates one by one.
To select only records that have duplicates:
SELECT * FROM ( SELECT *,ROW_NUMBER() OVER (PARTITION BY `url_rewrite_id` ORDER BY `url_rewrite_id`) AS RN FROM `catalog_url_rewrite_product_category`) P WHERE P.RN >1 GROUP BY `url_rewrite_id`
DELETE * FROM `catalog_url_rewrite_product_category` WHERE `url_rewrite_id` = “.....”
INSERT INTO `catalog_url_rewrite_product_category` (`url_rewrite_id`, `category_id`, `product_id`)
VALUES (234034, 319, 3875)
FIX 2
This php script will delete the duplicate entries from the table and leave only one
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "myDB"; // Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM ( SELECT *,ROW_NUMBER() OVER (PARTITION BY `url_rewrite_id` ORDER BY `url_rewrite_id`) AS RN FROM `catalog_url_rewrite_product_category`) P WHERE P.RN >1";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
$rewrite_id = $row["url_rewrite_id"];
$category_id = $row["category_id"];
$product_id = $row["product_id"];
$sql = "DELETE FROM `catalog_url_rewrite_product_category` WHERE `url_rewrite_id` = " . $rewrite_id;
$result2 = $conn->query($sql);
echo "Deleted entry for url_rewrite_id: " . $rewrite_id . PHP_EOL;
$sql = "INSERT INTO `catalog_url_rewrite_product_category` (`url_rewrite_id`, `category_id`, `product_id`) VALUES (" . $rewrite_id . ", " . $category_id . ", " . $product_id . ")" ;
$result3 = $conn->query($sql);
echo "Inserted entry: ". $rewrite_id . ", " . $category_id . ", " . $product_id . PHP_EOL;
}
} else {
echo "0 results";
}
$conn->close();
?>
If you get the following message on the store front:
“The store will not work correctly in the case when cookies are disabled.”
Inside theme_name/web/css/source/_theme.less
#cookie-status {
display: none;
}
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/exception is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/event is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/consistency is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/ustring is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/protocol is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/iterator is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/stream is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/file is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/console is abandoned, you should avoid using it. No replacement was suggested.
Package csharpru/vault-php-guzzle6-transport is abandoned, you should avoid using it. No replacement was suggested.
Remove state
Configuration -> Settings -> General -> State Options
Uncheck state is required for
Translating states:
Problem with
Invalid security or form key. Please refresh the page.
We got this error message in admin after logging in. Solution for the above will be available in version 2.4.4
Upgrade 2.4.3 to 2.4.3-p1
composer update
composer require magento/product-community-edition=2.4.3-p1 --no-update
composer update
bin/magento setup:upgrade
Patch 2.4.3-p1 using composer
Download patch file from adobe page
patch -p1 < MDVA-43395_EE_2.4.3-p1_COMPOSER_v1.patch
patching file vendor/magento/module-email/Model/Template/Filter.php
patching file vendor/magento/framework/Filter/DirectiveProcessor/VarDirective.php