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.56k stars 9.32k forks source link

Can't Access Component Manager #4159

Closed astorm closed 8 years ago

astorm commented 8 years ago

The component manager page returns a 404 when Magento is installed using the more secure /path/to/magento/pub (vs. /path/to/magento) as the system web root.

  1. Install Magento
  2. Configure Web Root to point to Magento's pub folder
  3. Navigate in admin to System -> Web Setup Wizard

    Expected result

  4. Web Setup Wizard page displays

    Actual result

  5. Standard Magento 404 (Whoops, our bad...) page displays
astorm commented 8 years ago

/cc @tanya-soroka

piotrekkaminski commented 8 years ago

and cc @alankent as this is the MEC install model

tanya-soroka commented 8 years ago

Hello @astorm . Thanks for reporting this issue. I have create a ticket for our team to review it: MAGETWO-51929.

piotrekkaminski commented 8 years ago

Based on the latest changes so far it won't be possible to access web wizard when located in pub unless you set up separate domain to access the top level. It should be fixed better in a future version.

piotrekkaminski commented 8 years ago

Internal issue for proper fix MAGETWO-52799

KrystynaKabannyk commented 8 years ago

Hello @astorm, this issue has been fixed in the 2.1.0 Release, that's why I'm closing it. If you any questions or additional information regarding the issue feel free to reopen it or create a new one.

astorm commented 8 years ago

Thank you @tanya-soroka, confirmed fix, and much appreciated!

piotrekkaminski commented 8 years ago

@astorm @KrystynaKabannyk @tanya-soroka @xcomSteveJohnson i'm reopening this issue as it was not fixed. The only change is that there is no longer link to setup wizard in menu if Magento is installed in /pub but proper solution is scheduled for next version and tracked as MAGETWO-52799. It turned out it is harder to fix than expected and it was not merged into 2.1.

CalebWC commented 8 years ago

Hello, we are a Magento partner with multiple clients moving to Magento 2, and this is impacting the installation of our plugin. What is the ETA for this fix/version, and is there a workaround in the meantime besides manual installation?

ghost commented 8 years ago

@CalebWC To get the Component Manager to work, try configuring your Virtual Host to use the Magento root directory instead of pub. Otherwise, I'm sorry for trouble.

alexgran commented 8 years ago

Hi, you closed 5247 as a duplicate of this one. But I do have web root set to magento root, and still I get the odd unlogin message. And a warning that my webserver allows acces to files which it shouldn't, obviously. I can set it to /pub, than I get a page not found when trying to access web setup wizzard

alexgran commented 8 years ago

Update: Chrome seems to be the issue, firefox works

johnhughes1984 commented 8 years ago

Same issue here, clean install of CE 2.1 using composer and CLI install.

Switching web root to Magento root worked, thanks!

Look forward to the 'full fix' as don't want to use this workaround in production.

magenx commented 8 years ago

Magento 2.1.1 doc root /pub/ Web Setup Wizard menu still missing, but when you type http://www.shop.com/admin_xxxx/admin/backendapp/redirect/app/setup/ redirects tohttp://www.shop.com/setup/#/home and then all works as expected...

i do even have php-fpm in chroot and nginx has two doc roots defined, still no menu, but manual redirect works...

stamster commented 8 years ago

No comment for this issue.

What in the world could happen to make such a failure in a release, to disable menu item?! On the other hand everything works just fine if you use 'secret passage' URL redirect provided here by @magenx ! So, it's not a core issue, but only a God damn link / frontend problem.

@magenx thanks a lot for this hint, you saved not a day but a month! :+1:

Contrary to this, @ Magento core team who let this just happen w/o resolving it ASAP I just don't have words to say but that it is not only unacceptable but lame.

astorm commented 8 years ago

Just a note for people coming along after the fact -- per this comment, the underlying issue remains in the latest versions of Magento. This specific issue was closed when the original poster decided Magento wasn't going to address it.

kevinjavitz commented 8 years ago

yes this should really be re-opened, it is confusing as the issue still exists in 2.1.2 and it is a big issue as without the web installer you can only install modules/components with composer

joebordo commented 7 years ago

I just Tried it in google chrome "incognito modus" and it worked. magento 2.1.2 clean install. Hope it helps.

timstoel commented 7 years ago

I am using Magento 2.1.1 in production and need to update to 2.1.2 and install an extension as well. The extension I am working with does not have any instructions for installing it with Composer.

I tried the URL workaround and it does not work on my setup using Varnish. It points to domain.com:8080/setup which does not work.

Any suggestions how to work around this problem?

dharake commented 7 years ago

@timstoel Absolutely correct. Add Varnish to this cocktail of doom, and I've given up, can't access it even with the change of mageroot /

In the word of Max Romeo, one step forward two steps backward

timstoel commented 7 years ago

@dharake Thank you for confirming my findings. In your opinion, is Magento 2.1.1/2.1.2 ready for production use? I am not an expert nor a Magento professional but I am seeing a disconnect between the dev audience who can get it working locally and the production audience trying to deploy Magento. We have been on it in production for about a month now and had nothing but problems and poor third party support. After spending four months on developing our Magento 2 site in house, we just had a sad discussion about reverting to Magento 1.9 for this and a handful of other issues that are just not getting fixed. We've had multiple vendors promise Magento 2 support and issues like this have stopped us from connecting to shipping, inventory and marketplace connectors.

dharake commented 7 years ago

@timstoel In your position I'd bide my time and wait for development on magento 2. I've had clients on 1.9 getting hacked left right and centre, and the patching and recovery is a real pain. I think the issues you're facing with Magento 2 won't improve much in Magento 1.9. That said, for the Magento 2 sites I'm deploying I am not using any third party modules as of yet. Good to give them time to cycle through a few versions first. Hope that helps

dharake commented 7 years ago

I've reopened this issue https://github.com/magento/magento2/issues/7623

timstoel commented 7 years ago

@dharake Thank you for your help and response. We're in production on Magento 2.1.1 now and we're panicking. We left a lesser platform due to other issues not relevant to his conversation. We decided rolling out Magento 1.9 was a bad call when we started because 2 had been out for almost a year and we didn't want to upgrade again so soon. We were excited to get on Magento 2 which we assumed would be in better shape after a year of being out. We've had vendors like ShipStation promise Magento 2 support but their connector requires the Web Setup Wizard to install their connector to connect to their service, so our move to Magento 2 has accomplished very little for us, and really backed us into a corner as far as growing our business. We're also working with another provider to sync inventory across all of our marketplaces and they advertise Magento support but you get right down to it and Magento 2 is a problem there as well.

ghost commented 7 years ago

This issue still exists and its quite impressive there are two separate recommended setups for M2 and its been 8+ months with no clear solution?

Maybe some kind of testing should occur.

ghost commented 7 years ago

By the way, a workaround for this is a symlink in pub/

ln -s ../setup/ setup

Depending on your Nginx configuration.

inelukipg commented 7 years ago

@sylink Your workaround worked for me! Do you think there is any sercurity risk with that solution?

ghost commented 7 years ago

It should be fine, the setup stuff is probably already in your Nginx config but the one released by Magento doesn't account for the pub web root as far as I know.

stamster commented 7 years ago

@sylink your response involves symlink and your username is sylink :+1: How odd is that! :)

Userr017 commented 7 years ago

@sylink Can someone tell more detail how to solve this problem? I don't fully undestand this... ln -s ../setup/ setup

Need run command or?

ghost commented 7 years ago

You can either adjust your vhost config or use a symlink, compare whatever you have to the Nginx config Magento puts out to see how setup is meant to work.

Alternatively, not using Magento 2 is a very viable option.

rgjoyce commented 7 years ago

unbelievable. I am a Joomla developer and to see this problem go unresolved is astonishing. It has been several versions now. I just installed 2.1.5 and it wend through all the tests and installed perfectly. Well done. It was only when I went to setup a payment plugin that I found the system doesn't work at all. you get a logged out message when you try top open the Web Setup Wizard. Since this is the only place you can install or setup the modules for Magento, and it's not accessible, doesn't that make Magento completely UN-usable? Getting the setup wizard fixed and working should be the top priority of the dev team as it's the cor configurator of the system.

rgjoyce commented 7 years ago

ln -s ../setup/ setup didi not work for me after changing to the public_html/pub folder via ssh and executing this command.

Radiergummi commented 7 years ago

push any news on this?

fwolfst commented 7 years ago

Using the nginx.conf.sample from magento2 (.1.5) directory I managed to access http:////admin/backendapp/redirect/app/setup/ which redirected me to http:///setup/#/home .

There I was able to define the marketplace public and private keys to be presented a spinning wheel of death ("Please Wait...") - or is it normal that this takes > 20 minutes? Pretty dissappointing, was so happy to finally be presented with the Web Setup Tool thing .... Setup is ubuntu 14.04 with backported php7 running nginx.

Radiergummi commented 7 years ago

@fwolfst I also tried to just access it by URL, though I never even saw the marketplace key selection screen but the text Welcome to Magento Admin, your online store headquarters. To use the Magento setup wizard sign into your Admin account and navigate to System => Tools => Web Setup Wizard

fwolfst commented 7 years ago

make sure you are logged in as admin (or similar) in a different tab in your browser session, then visit http:////admin/backendapp/redirect/app/setup/ .

On 19.04.2017 18:35, Mo wrote:

@fwolfst https://github.com/fwolfst I also tried to just access it by URL, though I never even saw the marketplace key selection screen but the text /Welcome to Magento Admin, your online store headquarters. To use the Magento setup wizard sign into your Admin account and navigate to System => Tools => Web Setup Wizard/

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/4159#issuecomment-295335572, or mute the thread https://github.com/notifications/unsubscribe-auth/AANY7cpW8xNBHRzZ5y_Jv-SxWvatOuthks5rxjfSgaJpZM4IHguY.

rgjoyce commented 7 years ago

Yes, this is the problem we have been reporting.

It has been in Magento since version 2.0.2 and is still there.

It seems to be related to the /var folder contents.

But even so, the php diagnostics on the next step are broken too, so even if they finally get this fixed, there will be further problems.

Version 2 of magento is totally useless so far.

stamster commented 7 years ago

@rgjoyce I completely understand your point! :+1: And since you've compared Joomla (which has always been on the dark site) and Magento2, oh Boy - now it looks like Joomla is for a magnitude more professional than M2. It's been almost two years since initial release, so I guess M2 is a dead end if the core issues are still present. :-1: M(2) is completely overrated.

justanewbie00 commented 7 years ago

Using 2.1.6 and the issue is still unresolved.

Radiergummi commented 7 years ago

@alyhugo with all due respect for the Magento team, I've given up any hope for a timely fix. Of you are like everyone else and have projects due, move on and try to solve it by yourself. This may be unacceptable for an enterprise software product, but I don't have time to wait another year with a project due next month.

drpit commented 7 years ago

Hello, I tried to use both /pub and non pub directory as system root but still cannot find web setup wizard. I have switched back yo apache in order to use it. Any suggestions?

korostii commented 7 years ago

@drpit, well, as a workaround I could suggest doing installs and updates via composer and not use the web setup wizard, at all. That's probably the most resilient way to do it right now. Please also keep in mind that having web setup wizard accessible in production is a bad choice from security standpoint.

Other than that, you'll probably need to wait for some updated from Magento representatives.

pmsteil commented 5 years ago

By the way, a workaround for this is a symlink in pub/

ln -s ../setup/ setup

Depending on your Nginx configuration.

As I am having this issue on 2.3 in 2019 I am trying to find the easiest workaround.

The above suggestion... I have tried running it from my /var/www/webroot /var/www/webroot/setup /var/www/webroot/pub /var/www/webroot/pub/setup

folders and it doesn't change anything. I still get "Access Denied" when I try and got to /setup in my browser.

What folder do I run this from and do I need to clear any caches or any other CLI commands after I do the symlink?

thanks

dharake commented 5 years ago

Hey guys,

I solved this mystery, sorry you are still suffering with this. Since Magento 2.0 I've had this issue and finally in 2.3 found the answer a few days ago on https://magento.stackexchange.com/questions/222345/magento-2-2-2-web-setup-wizard-not-visible-in-backend.

Before I give the solution, warning, do not be too excited. I tried using the Component manager and it gave me so many problems. I have it now, and won't use it because it will disappoint you and invariably crash.

That said, solution:

  1. Edit the file: magento/vendor/magento/module-backend/Model/Setup/MenuBuilder.php

  2. locate @ line 36 :

    • Removes 'Web Setup Wizard' from the menu if doc root is pub and no setup url variable is specified.
  3. Comment out the whole function like so:

/**

  1. php bin/magento setup:di:compile

  2. php bin/magento cache:flush

I tried installing modules, enabling/disabling modules and it was all garbage. Only good to see what modules are enabled/disabled in a visual format.

Hope that helps.

pmsteil commented 5 years ago

Hey guys,

I solved this mystery, sorry you are still suffering with this. Since Magento 2.0 I've had this issue and finally in 2.3 found the answer a few days ago on https://magento.stackexchange.com/questions/222345/magento-2-2-2-web-setup-wizard-not-visible-in-backend.

Before I give the solution, warning, do not be too excited. I tried using the Component manager and it gave me so many problems. I have it now, and won't use it because it will disappoint you and invariably crash.

That said, solution:

  1. Edit the file: magento/vendor/magento/module-backend/Model/Setup/MenuBuilder.php
  2. locate @ line 36 :
  • Removes 'Web Setup Wizard' from the menu if doc root is pub and no setup url variable is specified.
  1. Comment out the whole function like so:

/**

  • Removes 'Web Setup Wizard' from the menu if doc root is pub and no setup url variable is specified.
  • @param Builder $subject
  • @param Menu $menu
  • @return Menu
  • @SuppressWarnings(PHPMD.UnusedFormalParameter)
  • @SInCE 100.1.0 / / public function afterGetResult(Builder $subject, Menu $menu) { if ($this->docRootLocator->isPub()) { $menu->remove('Magento_Backend::setup_wizard'); } return $menu; } /
  1. php bin/magento setup:di:compile
  2. php bin/magento cache:flush

I tried installing modules, enabling/disabling modules and it was all garbage. Only good to see what modules are enabled/disabled in a visual format.

Hope that helps.

Thanks... I gave up and found command line ways to do what I wanted to do with /setup...

gladroger commented 5 years ago

I have applied this fix and it works, thanks!

However when trying to install extensions I get composer status You have changes in the following dependencies: /home/user/public_html/vendor/magento/module-backend

How do I bypass this in able to use composer or web setup?

mateuszrusiecki commented 4 years ago

Hello! It's 2020 here and this issue still exists(ver. 2.3.4)! are you serious guys? o_O

magenx commented 4 years ago

it is working, if you have webroot in /pub/ then you need to have separate root dir for /setup/

mateuszrusiecki commented 4 years ago

uh silly me. I just used nginx.conf.sample from magento and it worked