-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[4.0] Redo the fatal error pages #31743
[4.0] Redo the fatal error pages #31743
Conversation
Just add your suggestion to this PR and I will close my pr |
index.php
Outdated
$output = 'Your host needs to use PHP version {{PHP_VERSION}} or newer to run this version of Joomla.'; | ||
$template = dirname(__FILE__) . '/media/system/html/incompatible.html'; | ||
|
||
if (file_exists($template)) | ||
{ | ||
$output = file_get_contents($template); | ||
} | ||
|
||
die(str_replace('{{PHP_VERSION}}', JOOMLA_MINIMUM_PHP, $output)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really needed to make it more complex?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, it's just a fallback for the fallback. The reason is that since the files were moved into the media folder these files (assuming that someone is working on a git clone) won't be there until composer + npm install...
installation/includes/app.php
Outdated
$output = 'It looks like you are trying to run Joomla! from our git repository. ' | ||
. 'To do so requires you to complete a couple of extra steps first.'; | ||
$template = JPATH_ROOT . '/media/system/html/build_incomplete.html'; | ||
|
||
if (file_exists($template)) | ||
{ | ||
$output = file_get_contents($template); | ||
} | ||
|
||
die($output); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the your comment this file can't exist or is unlikely that you only run npm i?
Whats the benefit to compile this files? I mean it's a error page when something fundamental is wrong and if looks like that creating this files could be one of the problems ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the your comment this file can't exist or is unlikely that you only run npm I?
You can trigger this by cloning the repo and directly serving it (no composer/npm install). I guess not everyone is immediately aware what more needs to be executed before playing with the source (IIRC the Readme has all these infonaut people might skip it)
Whats the benefit to compile this files?
So the compile part essentially is adding some js for switching languages (the script collects all the different language strings from the installation folder creates an object with all the languages and then fills the select element with appropriate language names/tags). The reason for all these complicated steps is just to provide a better UX even when everything failed hardly
This comment was marked as abuse.
This comment was marked as abuse.
@PhilETaylor this PR has conflicts, I'll try to update it tomorrow |
This comment was marked as abuse.
This comment was marked as abuse.
cbb47ca
to
90d5eeb
Compare
Commit 90d5eeb
|
This looks ok to me. Thanks! |
Pull Request as a helping hand for #30056 and #31735.
Summary of Changes
The files are moved tomedia/system
as these are static filesFixed all the paths for this changeTesting Instructions
Run
![Screenshot 2020-12-20 at 21 17 57](https://user-images.githubusercontent.com/3889375/102723540-ef636500-4308-11eb-958f-3054b8526543.png)
![Screenshot 2020-12-20 at 21 18 07](https://user-images.githubusercontent.com/3889375/102723544-f2f6ec00-4308-11eb-8da2-10992339205c.png)
![Screenshot 2020-12-20 at 21 18 17](https://user-images.githubusercontent.com/3889375/102723546-f4281900-4308-11eb-86a3-4fbe648001af.png)
![Screenshot 2020-12-20 at 21 18 26](https://user-images.githubusercontent.com/3889375/102723548-f5594600-4308-11eb-8857-b92fb5b3dbf6.png)
npm install
ornode build/build.js --build-pages
from the root path of your Joomla cloned repoCheck
/templates/system
for 4 html files: incompatible, noxml, fatal-error and build_incompleteOpen each in your browser (double click also works here)
You should have these:
Testing the actual php requires some editing of files (that's because it needs to kick the error):
<
to>
joomla-cms/index.php
Line 18 in f637260
<
to>
joomla-cms/administrator/index.php
Line 18 in f637260
<
to>
joomla-cms/installation/index.php
Line 18 in f637260
/media/vendor
to/media/notexisting
joomla-cms/installation/includes/app.php
Line 18 in f637260
There are also 2 more cases that require this PR to be merge, then pull #30056 and 31735 and follow the testing instructions on these PR's
That's all.