JoomlaPolska / jezyk-J4

Język polski dla Joomla 4
GNU General Public License v2.0
3 stars 5 forks source link

[5.0] Custom Error Pages - new feature #369

Closed joomlapl-bot closed 5 months ago

joomlapl-bot commented 1 year ago

PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/40597 Poniżej zmiany w oryginale:

Click to expand the diff! ```diff diff --git a/language/en-GB/tpl_cassiopeia.sys.ini b/language/en-GB/tpl_cassiopeia.sys.ini index f2b0f2a65110..be02e4c25a6f 100644 --- a/language/en-GB/tpl_cassiopeia.sys.ini +++ b/language/en-GB/tpl_cassiopeia.sys.ini @@ -12,6 +12,8 @@ TPL_CASSIOPEIA_POSITION_BOTTOM-A="Bottom-a" TPL_CASSIOPEIA_POSITION_BOTTOM-B="Bottom-b" TPL_CASSIOPEIA_POSITION_BREADCRUMBS="Breadcrumbs" TPL_CASSIOPEIA_POSITION_DEBUG="Debug" +TPL_CASSIOPEIA_POSITION_ERROR-403="Error 403" +TPL_CASSIOPEIA_POSITION_ERROR-404="Error 404" TPL_CASSIOPEIA_POSITION_FOOTER="Footer" TPL_CASSIOPEIA_POSITION_MAIN-BOTTOM="Main-bottom" TPL_CASSIOPEIA_POSITION_MAIN-TOP="Main-top" diff --git a/templates/cassiopeia/error.php b/templates/cassiopeia/error.php index 40be5dd71785..f987f6bee8e7 100644 --- a/templates/cassiopeia/error.php +++ b/templates/cassiopeia/error.php @@ -101,6 +101,9 @@ // Defer font awesome $wa->getAsset('style', 'fontawesome')->setAttribute('rel', 'lazy-stylesheet'); + +// Get the error code +$errorCode = $this->error->getCode(); ?> @@ -148,6 +151,11 @@
+ countModules('error-' . $errorCode)) : ?> +
+ +
+

@@ -167,28 +175,29 @@
error->getCode(); ?> error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>
- debug) : ?> -
+
+
+ + debug) : ?> +
+ renderBacktrace(); ?> + + error->getPrevious()) : ?> + + _error here and in the loop as setError() assigns errors to this property and we need this for the backtrace to work correctly ?> + + setError($this->_error->getPrevious()); ?> + +

+

_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>

renderBacktrace(); ?> - - error->getPrevious()) : ?> - - _error here and in the loop as setError() assigns errors to this property and we need this for the backtrace to work correctly ?> - - setError($this->_error->getPrevious()); ?> - -

-

_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>

- renderBacktrace(); ?> - setError($this->_error->getPrevious()); ?> - - - setError($this->error); ?> - -
+ setError($this->_error->getPrevious()); ?> + + + setError($this->error); ?>
-
+
countModules('footer')) : ?> diff --git a/templates/cassiopeia/templateDetails.xml b/templates/cassiopeia/templateDetails.xml index b7e8ba817a1d..b69ab1ba2035 100644 --- a/templates/cassiopeia/templateDetails.xml +++ b/templates/cassiopeia/templateDetails.xml @@ -40,6 +40,9 @@ bottom-b footer debug + + error-403 + error-404 en-GB/tpl_cassiopeia.ini ```