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

Error page/maintenance page skin customisation is not currently possible #4305

Closed
danny-balance opened this issue Apr 26, 2016 · 13 comments
Closed
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@danny-balance
Copy link

From what I can tell, the correct way to customise the default maintenance page is by adding a pub/errors/local.xml file & creating a new skin. It looks like there is a bug in this process.

In the _setSkin method in pub/errors/processor.php it first checks if the directory exists before setting the config to use the custom skin:

is_dir($this->_indexDir . self::ERROR_DIR . '/' . $value)

The problem lies in the variables setting up the path:

echo $this->_indexDir; // /var/www/src/pub/
echo self::ERROR_DIR; // pub/errors

Ending up with an incorrect path of:

/var/www/src/pub/pub/errors/custom_skin_name

It looks like either $this->_indexDir should be set to the Magento root (rather than the pub directory), or the ERROR_DIR const should not be prefixed with the pub dir.

@mazhalai
Copy link
Contributor

Thank you for reporting, we have created MAGETWO-52323 to investigate and fix.

@mazhalai mazhalai added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development PS labels Apr 26, 2016
@danny-balance
Copy link
Author

Hi @mazhalai is there any update to this issue?

@mazhalai
Copy link
Contributor

@danny-balance still being investigated.

okorshenko pushed a commit that referenced this issue Jul 6, 2016
okorshenko pushed a commit that referenced this issue Jul 6, 2016
@vkorotun vkorotun removed the PS label Aug 4, 2016
@andimov
Copy link
Contributor

andimov commented Aug 16, 2016

This issue has been fixed and delivered to mainline.

@andimov andimov closed this as completed Aug 16, 2016
@danny-balance
Copy link
Author

Hi, when will this be released? This was fixed in a commit 9 months ago and is still not in a release.

@sshymko
Copy link

sshymko commented Mar 13, 2017

@andimov
What release version the fix will be included into?

@andimov
Copy link
Contributor

andimov commented Mar 14, 2017

@sshymko it will be included into 2.2 release version

@vbmagento
Copy link
Contributor

I have fixed it to change value of const ERROR_DIR in processor.php.
Removed pub from this const and only put errors like that const ERROR_DIR = 'errors' ;
I have tried it and it is working for me.

@gallyamov
Copy link
Contributor

gallyamov commented Jun 1, 2017

Finished up by creating fake pub/pub/error/mymaintenance with readme inside.
Magento only checks if this folder exists and then takes the files from pub/error/mymaintenance as expected.

This also won't break when the fixed version will appear since it does not require any core updates.

@thomas-kl1
Copy link
Member

Be sure that your are in production mode. I wasn't able to see my custom in the developer mode.
It seems that the developer mode only print the exception, without to render the error with the default skin.

@mikebranderhorst
Copy link

mikebranderhorst commented Sep 20, 2017

Still there in 2.1.10

Create the folder structure to fool the existence check
(Replace with your custom error theme name)

cd public

mkdir -p pub/errors/<theme>

touch pub/errors/<theme>/.htaccess

Note that you create a pub folder within the public folder

public/pub/errors/

Your public folder can be public_html

This error occurs when the magento2 folder is next to (or somewhere else then within) the public folder and you have symlinked the magento2/pub/* to public/ (and magento2/sitemap.xml to public/sitemap.xml etc.)

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Sep 20, 2017
@sankalp-prft
Copy link

Just checked 2.2-develop, and didn't see any updates in this regards that might indicate this has been fixed.

@hostep
Copy link
Contributor

hostep commented Apr 14, 2018

@sankalp-prft: can you check the history of this file: https://github.com/magento/magento2/commits/2.2-develop/pub/errors/processor.php
Look at the commits on June 6 2016, those should fix this issue I believe.
You can also see those two same commits if you scroll up a bit on this very page, also to June 6 2016

If you believe it still isn't fixed, feel free to provide steps to reproduce on a clean installation.

magento-engcom-team pushed a commit to okorshenko/magento2 that referenced this issue Jun 5, 2019
[pangolins] MQE-1367: XSD schema validation error fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests