magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.55k stars 9.32k forks source link

Check Component Dependency when trying to update from 2.0.2 to 2.0.4 #4055

Closed Krapulat closed 8 years ago

Krapulat commented 8 years ago

Hello,

I'm trying to upgrade Magento from 2.0.2 to 2.0.4 and I get "We found conflicting component dependencies.".

I attach the screenshot with console.

error-magento

vancoz commented 8 years ago

Hi @Krapulat, can you please provide us your root composer.json file?

Also may you please run following commands:

$composer require magento/product-community-edition:2.0.4 --no-update; composer update --dry-run

and provide output of commands here?

Thank you!

Krapulat commented 8 years ago

The code is "magento/project-community-edition:2.0.4" or "magento/product-community-edition:2.0.4" ?

The composer.json is:

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.0.2",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ],
    "require": {
        "magento/product-community-edition": "2.0.2",
        "composer/composer": "@alpha"
    },
    "require-dev": {
        "phpunit/phpunit": "4.1.0",
        "squizlabs/php_codesniffer": "1.5.3",
        "phpmd/phpmd": "@stable",
        "pdepend/pdepend": "2.2.2",
        "sjparkinson/static-review": "~4.1",
        "fabpot/php-cs-fixer": "~1.2",
        "lusitanian/oauth": "~0.3 <=0.7.0"
    },
    "config": {
        "use-include-path": true
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/"
        },
        "psr-0": {
            "": "app/code/"
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "minimum-stability": "alpha",
    "prefer-stable": true,
    "extra": {
        "magento-force": "override"
    }
}

And the output of the command:

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package magento/project-community-edition 2.0.2 could not be found.
  Problem 2
    - Installation request for magento/project-community-edition 2.0.4 -> satisfiable by magento/project-community-edition[2.0.4].
    - magento/project-community-edition 2.0.4 requires magento/product-community-edition 2.0.4 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
vancoz commented 8 years ago

@Krapulat I'm sorry, it should be product not project. Can you please run again and provide output?

Krapulat commented 8 years ago

@vancoz The output:

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Updating magento/magento-composer-installer (0.1.6) to magento/magento-composer-installer (0.1.7)

  - Updating magento/framework (100.0.4) to magento/framework (100.0.6)

  - Updating magento/language-zh_hans_cn (100.0.3) to magento/language-zh_hans_cn (100.0.5)

  - Updating magento/language-pt_br (100.0.3) to magento/language-pt_br (100.0.5)

  - Updating magento/language-nl_nl (100.0.3) to magento/language-nl_nl (100.0.5)

  - Updating magento/language-fr_fr (100.0.3) to magento/language-fr_fr (100.0.5)

  - Updating magento/language-es_es (100.0.3) to magento/language-es_es (100.0.5)

  - Updating magento/language-en_us (100.0.3) to magento/language-en_us (100.0.5)

  - Updating magento/language-de_de (100.0.3) to magento/language-de_de (100.0.5)

  - Updating magento/theme-frontend-blank (100.0.3) to magento/theme-frontend-blank (100.0.5)

  - Updating magento/theme-frontend-luma (100.0.3) to magento/theme-frontend-luma (100.0.5)

  - Updating magento/theme-adminhtml-backend (100.0.3) to magento/theme-adminhtml-backend (100.0.5)

  - Updating magento/module-media-storage (100.0.3) to magento/module-media-storage (100.0.5)

  - Updating magento/module-config (100.0.3) to magento/module-config (100.0.5)

  - Updating magento/module-store (100.0.3) to magento/module-store (100.0.5)

  - Updating magento/module-ui (100.0.3) to magento/module-ui (100.0.5)

  - Updating magento/module-user (100.0.3) to magento/module-user (100.0.5)

  - Updating magento/module-email (100.0.3) to magento/module-email (100.0.5)

  - Updating magento/module-variable (100.0.3) to magento/module-variable (100.0.5)

  - Updating magento/module-require-js (100.0.3) to magento/module-require-js (100.0.5)

  - Updating magento/module-theme (100.0.3) to magento/module-theme (100.0.5)

  - Updating magento/module-widget (100.0.3) to magento/module-widget (100.0.5)

  - Updating magento/module-backend (100.0.3) to magento/module-backend (100.0.5)

  - Updating magento/module-translation (100.0.3) to magento/module-translation (100.0.5)

  - Updating magento/module-developer (100.0.3) to magento/module-developer (100.0.5)

  - Updating magento/module-quote (100.0.3) to magento/module-quote (100.0.5)

  - Updating magento/module-catalog-inventory (100.0.3) to magento/module-catalog-inventory (100.0.5)

  - Updating magento/module-page-cache (100.0.3) to magento/module-page-cache (100.0.5)

  - Updating magento/module-integration (100.0.3) to magento/module-integration (100.0.5)

  - Updating magento/module-authorization (100.0.3) to magento/module-authorization (100.0.5)

  - Updating magento/module-customer (100.0.3) to magento/module-customer (100.0.5)

  - Updating magento/module-wishlist (100.0.3) to magento/module-wishlist (100.0.5)

  - Updating magento/module-tax (100.0.3) to magento/module-tax (100.0.5)

  - Updating magento/module-reports (100.0.3) to magento/module-reports (100.0.5)

  - Updating magento/module-sales-rule (100.0.3) to magento/module-sales-rule (100.0.5)

  - Updating magento/module-catalog-rule (100.0.3) to magento/module-catalog-rule (100.0.5)

  - Updating magento/module-eav (100.0.3) to magento/module-eav (100.0.5)

  - Updating magento/module-catalog (100.0.3) to magento/module-catalog (100.0.5)

  - Updating magento/module-configurable-product (100.0.3) to magento/module-configurable-product (100.0.5)

  - Updating magento/module-grouped-product (100.0.3) to magento/module-grouped-product (100.0.5)

  - Updating magento/module-msrp (100.0.3) to magento/module-msrp (100.0.5)

  - Updating magento/module-rule (100.0.3) to magento/module-rule (100.0.5)

  - Updating magento/module-sales (100.0.3) to magento/module-sales (100.0.5)

  - Updating magento/module-shipping (100.0.3) to magento/module-shipping (100.0.5)

  - Updating magento/module-directory (100.0.3) to magento/module-directory (100.0.5)

  - Updating magento/module-payment (100.0.3) to magento/module-payment (100.0.5)

  - Updating magento/module-checkout (100.0.3) to magento/module-checkout (100.0.5)

  - Updating magento/module-sales-sequence (100.0.3) to magento/module-sales-sequence (100.0.5)

  - Updating magento/module-gift-message (100.0.3) to magento/module-gift-message (100.0.5)

  - Updating magento/module-rss (100.0.3) to magento/module-rss (100.0.5)

  - Updating magento/module-cms (100.0.3) to magento/module-cms (100.0.5)

  - Updating magento/module-contact (100.0.3) to magento/module-contact (100.0.5)

  - Updating magento/module-downloadable (100.0.3) to magento/module-downloadable (100.0.5)

  - Updating magento/module-cron (100.0.3) to magento/module-cron (100.0.5)

  - Updating magento/module-newsletter (100.0.3) to magento/module-newsletter (100.0.5)

  - Updating magento/module-review (100.0.3) to magento/module-review (100.0.5)

  - Updating magento/module-url-rewrite (100.0.3) to magento/module-url-rewrite (100.0.5)

  - Updating magento/module-cms-url-rewrite (100.0.3) to magento/module-cms-url-rewrite (100.0.5)

  - Updating magento/module-import-export (100.0.3) to magento/module-import-export (100.0.5)

  - Updating magento/module-catalog-url-rewrite (100.0.3) to magento/module-catalog-url-rewrite (100.0.5)

  - Updating magento/module-catalog-import-export (100.0.3) to magento/module-catalog-import-export (100.0.5)

  - Updating magento/module-product-alert (100.0.3) to magento/module-product-alert (100.0.5)

  - Updating magento/module-indexer (100.0.3) to magento/module-indexer (100.0.5)

  - Updating magento/module-backup (100.0.3) to magento/module-backup (100.0.5)

  - Updating magento/module-weee (100.0.3) to magento/module-weee (100.0.5)

  - Installing magento/module-webapi-security (100.0.1)

  - Updating magento/module-webapi (100.0.3) to magento/module-webapi (100.0.5)

  - Updating magento/module-version (100.0.3) to magento/module-version (100.0.5)

  - Updating magento/module-usps (100.0.3) to magento/module-usps (100.0.5)

  - Updating magento/module-ups (100.0.3) to magento/module-ups (100.0.5)

  - Updating magento/module-tax-import-export (100.0.3) to magento/module-tax-import-export (100.0.5)

  - Updating magento/module-swatches (100.0.3) to magento/module-swatches (100.0.5)

  - Updating magento/module-swagger (100.0.3) to magento/module-swagger (100.0.5)

  - Updating magento/module-sitemap (100.0.3) to magento/module-sitemap (100.0.5)

  - Updating magento/module-send-friend (100.0.3) to magento/module-send-friend (100.0.5)

  - Updating magento/module-search (100.0.3) to magento/module-search (100.0.5)

  - Updating magento/module-catalog-search (100.0.3) to magento/module-catalog-search (100.0.5)

  - Updating magento/module-sample-data (100.0.3) to magento/module-sample-data (100.0.5)

  - Updating magento/module-product-video (100.0.3) to magento/module-product-video (100.0.5)

  - Updating magento/module-persistent (100.0.3) to magento/module-persistent (100.0.5)

  - Updating magento/module-paypal (100.0.3) to magento/module-paypal (100.0.5)

  - Updating magento/module-offline-shipping (100.0.3) to magento/module-offline-shipping (100.0.5)

  - Updating magento/module-offline-payments (100.0.3) to magento/module-offline-payments (100.0.5)

  - Updating magento/module-new-relic-reporting (100.0.3) to magento/module-new-relic-reporting (100.0.5)

  - Updating magento/module-multishipping (100.0.3) to magento/module-multishipping (100.0.5)

  - Updating magento/module-layered-navigation (100.0.3) to magento/module-layered-navigation (100.0.5)

  - Updating magento/module-grouped-import-export (100.0.3) to magento/module-grouped-import-export (100.0.5)

  - Updating magento/module-cookie (100.0.3) to magento/module-cookie (100.0.5)

  - Updating magento/module-google-analytics (100.0.3) to magento/module-google-analytics (100.0.5)

  - Updating magento/module-google-optimizer (100.0.3) to magento/module-google-optimizer (100.0.5)

  - Updating magento/module-google-adwords (100.0.3) to magento/module-google-adwords (100.0.5)

  - Updating magento/module-fedex (100.0.3) to magento/module-fedex (100.0.5)

  - Updating magento/module-encryption-key (100.0.3) to magento/module-encryption-key (100.0.5)

  - Updating magento/module-downloadable-import-export (100.0.3) to magento/module-downloadable-import-export (100.0.5)

  - Updating magento/module-dhl (100.0.3) to magento/module-dhl (100.0.5)

  - Updating magento/module-deploy (100.0.3) to magento/module-deploy (100.0.5)

  - Updating magento/module-customer-import-export (100.0.3) to magento/module-customer-import-export (100.0.5)

  - Updating magento/module-currency-symbol (100.0.3) to magento/module-currency-symbol (100.0.5)

  - Updating magento/module-configurable-import-export (100.0.3) to magento/module-configurable-import-export (100.0.5)

  - Updating magento/module-checkout-agreements (100.0.3) to magento/module-checkout-agreements (100.0.5)

  - Updating magento/module-catalog-widget (100.0.3) to magento/module-catalog-widget (100.0.5)

  - Updating magento/module-catalog-rule-configurable (100.0.3) to magento/module-catalog-rule-configurable (100.0.5)

  - Updating magento/module-captcha (100.0.3) to magento/module-captcha (100.0.5)

  - Updating magento/module-cache-invalidate (100.0.3) to magento/module-cache-invalidate (100.0.5)

  - Updating magento/module-bundle (100.0.3) to magento/module-bundle (100.0.5)

  - Updating magento/module-bundle-import-export (100.0.3) to magento/module-bundle-import-export (100.0.5)

  - Updating magento/module-braintree (100.0.3) to magento/module-braintree (100.0.5)

  - Updating magento/module-authorizenet (100.0.3) to magento/module-authorizenet (100.0.5)

  - Updating magento/module-advanced-pricing-import-export (100.0.3) to magento/module-advanced-pricing-import-export (100.0.5)

  - Updating magento/module-admin-notification (100.0.3) to magento/module-admin-notification (100.0.5)

  - Updating magento/module-marketplace (100.0.3) to magento/module-marketplace (100.0.5)

  - Updating magento/magento2-base (2.0.2) to magento/magento2-base (2.0.4)

  - Updating magento/product-community-edition (2.0.2) to magento/product-community-edition (2.0.4)

I've tried again and I still get "We found conflicting component dependencies."

vancoz commented 8 years ago

Thank you @Krapulat, base on this output (which seems like not completed) I do not see any conflicts in packages. Can you run:

php bin/magento setup:upgrade

Login to admin and make sure your Magento version is 2.0.4 now (right bottom corner)?

Thank you.

Krapulat commented 8 years ago

@vancoz After running the setup:upgrade, I'm seeing Magento ver. 2.0.2.

vancoz commented 8 years ago

@Krapulat sorry again, it was --dry-run output.

Please run:

$composer require magento/product-community-edition:2.0.4 --no-update; composer update; php bin/magento setup:upgrade

And please, check version again, also provide output logs in case of failure.

Thank you.

Krapulat commented 8 years ago

@vancoz The update was fine. But now I can't access to admin panel. I had 3 languages (each one in different domains).

Now the main domain and language (which is not english) redirects me to the english one. And If I try to access to admin via english domain, I get "Too many redirects".

vancoz commented 8 years ago

@Krapulat can you please try to clear cache and generation directories in /var ?

Also have question - how did you install additional languages? I can not see it in your composer.json dependencies.

Krapulat commented 8 years ago

@vancoz I've cleared the cache and the /var directories and the same problem.

I installed the languages using magento i18n:pack

Krapulat commented 8 years ago

@vancoz And composer.json in root directory it shows:

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.0.2",

Is it normal?

vancoz commented 8 years ago

@Krapulat yes this is normal, project is something you installing only once (this is basically composer.json and update folder - skeleton), and it has dependency on magento/product-community-edition package, and version of this package is actual Magento version.

Regarding your languages issue, can you provide the package and clear steps to reproduce?

Krapulat commented 8 years ago

@vancoz I've used a test copy (using only an IP) and the same: it installs correctly Magento 2.0.4 via command line, but there is a problem with languages. With the IP (same URL for all languages) I've been able to login to admin. With a domain per language (different URL per language) I wasn't able to.

It changes the default language to english. And if I'm in a page and select another language, it changes the language perfectly but then when I click to a link (a category or a product) it changes again to english.

Krapulat commented 8 years ago

I found it. Using multiple domains I added this custom code inside index.php:

$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = $language; $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'store';

And after upgrading, the code disappeared from index.php. I added the code again, and it works!

davidalger commented 8 years ago

Closing as it appears OP resolved the issue. Feel free to re-open with added detail if an issue persists.