magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

the error page processor does not work when the webroot is set to `www/pub` instead of `www`

Open heldchen opened this issue 10 years ago • 10 comments

Preconditions

  1. CE 2.1.0 in production or default mode
  2. webroot pointing to www/pub

Steps to reproduce

  1. copy www/pub/errors/default to www/pub/errors/test
  2. edit www/pub/errors/design.xml and replace default with test
  3. edit text in www/pub/errors/test/503.phtml to read "hello world"
  4. enable maintenance mode
  5. browse website

Expected result

  1. the resulting 503 page should say "hello world"

Actual result

  1. the resulting 503 page says the default "Service Temporarily Unavailable"

www/pub/errors/processor.php checks the wrong path in the _setSkin function. instead of checking .../www/pub/errors/test the path .../www/pub/pub/errors/test is checked, and this check obviously fails due to the doubled pub. _setSkin should use $this->root and change the path accordingly, just like getBaseUrl() in the same class already does. unfortunately, _setSkin is not the only function broken - _setReportUrl will also use an extra /pub/ in the url

heldchen avatar Aug 30 '16 17:08 heldchen

also applies to 2.1.1

heldchen avatar Aug 30 '16 22:08 heldchen

Still happening in CE 2.1.2, any ETA on this being fixed?

johnhughes1984 avatar Oct 30 '16 20:10 johnhughes1984

I can confirm, that we have the same issue on CE 2.1.2 (and still not fixed in 2.1.3). Please fix this issue asap. Thanks.

alexpoletaev avatar Dec 28 '16 13:12 alexpoletaev

Suffering from the issue on 2.1.3. Deployment with /pub as a document root is the recommended configuration. Can the issue be prioritized higher?

sshymko avatar Dec 29 '16 17:12 sshymko

This is a duplicate of #4305 in which a fix was pushed to develop 9 months ago. When can we expect this to be released?

danny-balance avatar Feb 20 '17 06:02 danny-balance

issue is still present in 2.1.4

bh-ref avatar Feb 20 '17 15:02 bh-ref

Issue is still present in 2.1.5.

Rane2k avatar Feb 24 '17 12:02 Rane2k

@heldchen, thank you for reporting the issue, but we couldn't reproduce it. Could you please provide more details?

KrystynaKabannyk avatar Mar 24 '17 17:03 KrystynaKabannyk

@KrystynaKabannyk sorry, I really don't know what more details I could provide that are not already mentioned in the issue:

  1. configure magento2 to use www/pub as webroot
  2. copy www/pub/errors/default to www/pub/errors/test
  3. edit www/pub/errors/design.xml and replace default with test
  4. edit text in www/pub/errors/test/503.phtml to read "hello world"
  5. enable maintenance mode
  6. browse website

heldchen avatar Mar 24 '17 17:03 heldchen

Internal ticket was created - MAGETWO-69938 I'm closing this issue as #8026 has more detailed description.

veloraven avatar Jun 21 '17 08:06 veloraven