Skip to content
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

Create symlink to setup wizard con compile command to avoid 404 error when /pub directory is configured as root path #16151

Closed
wants to merge 3 commits into from

Conversation

fcjurado
Copy link

@fcjurado fcjurado commented Jun 15, 2018

Description

There are some issues related to the 404 error when entering on setup wizard page when /pub directory is configured as root path in apache or nginx.
With this fix, the compile command will create a symlink to setup.
Related: https://github.com/magento/magento2/search?q=wizard+404&unscoped_q=wizard+404&type=Issues

Fixed Issues (if relevant)

  1. Magento 2.2.1 Web Setup Wizard problems - {{menuState.title}} #14880: Magento 2.2.1 Web Setup Wizard problems - {{menuState.title}}
  2. Web Setup Wizard not visible in backend (V.2.1.2) ONGOING #7623: Web Setup Wizard not visible in backend (V.2.1.2)
  3. Web Setup Wizard not visible in backend magento 2.1.9 #11892: Web Setup Wizard not visible in backend magento 2.1.9

Manual testing scenarios

  1. Configure Apache with Document Root pointing to mage_dir/pub
  2. Enter Admin -> Setup Wizard
  3. A 404 page appears

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

There are some issues related to the 404 error when entering on setup wizard page when /pub directory is configured as root path in apache or nginx.
With this fix, the compile command will create a symlink to setup.
Related: https://github.com/magento/magento2/search?q=wizard+404&unscoped_q=wizard+404&type=Issues
@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Jun 15, 2018

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @fcjurado. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on Pull Request changes
  • @magento-engcom-team give me new test instance - deploy NEW test instance based on Pull Request changes
  • @magento-engcom-team give me {$VERSION} instance - deploy Vanilla Magento instance for Issue or Pull Request

For more details, please, review the Magento Contributor Assistant documentation

@orlangur
Copy link
Contributor

@fcjurado I'm using the same setup without any issues. Could you provide more details on how to reproduce this issue?

@fcjurado
Copy link
Author

fcjurado commented Jun 15, 2018

@orlangur do you have the apache settings configured as documentRoot on /pub folder? When it is configured, any setup link, file or url does not exist on this directory. So my solution is to create a setup link. Another solution could be using rewrite rules

imagen

fcjurado added 2 commits June 15, 2018 11:21
Fix file_exists return on checking setupPublicPath
@orlangur
Copy link
Contributor

@fcjurado I'm using Valet Plus and it is using /pub/ as WebRoot. I even removed root index.php to assure it is not involved.

Are you sure nginx setup is affected?

@fcjurado
Copy link
Author

@orlangur it only affects to Apache environments. I'd researched for an universal solution but only this is the only solution I found to prevent this 404 or access denied to Web Setup Wizard.

However, I've read again the documentation on https://devdocs.magento.com/guides/v2.2/install-gde/tutorials/change-docroot-to-pub.html, and noticed that the 4.2 point says that throwing a 404/403. I missunderstand it, so when configuring "pub" as root folder, no one could access to Web Setup Wizard?

@orlangur orlangur added this to the Release: 2.2.6 milestone Jun 19, 2018
@orlangur
Copy link
Contributor

@fcjurado yep, thanks for investigation

If you’re accustomed to using the Web Setup Wizard during development, be aware that you won’t be able to access it when serving files from the pub/ directory.

So there is nothing to fix here. More than that, what could be fixed on server configuration level, should be fixed on this level instead of adding some symlinking logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants