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

Revise error message #17

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions themes/TAMU/templates/error/index.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
// Set page title.
$this->headTitle($this->translate('An error has occurred'));

$this->layout()->breadcrumbs = '<li class="active">Error</li>';
?>
<div class="alert alert-danger">
<p><?=$this->transEsc('An error has occurred')?></p>
<p><?=$this->transEsc($this->message)?></p>
<p>
<?=$this->transEsc('Please contact AskUs for assistance')?>
<br>
<?php $supportEmail = $this->escapeHtmlAttr($this->systemEmail()); ?>
<a href="mailto:<?=$supportEmail?>"><?=$supportEmail?></a>
</p>
</div>

<?php if ($this->showInstallLink): ?>
<h2><a href="<?=$this->url('install-home')?>"><?=$this->transEsc('auto_configure_title', [], 'Auto Configure')?></a></h2>
<?=$this->transEsc('auto_configure_description', [], 'If this is a new installation, you may be able to fix the error using VuFind\'s Auto Configure tool.')?>
<h2><a href="<?=$this->url('upgrade-home')?>"><?=$this->transEsc('Upgrade VuFind')?></a></h2>
<?=$this->transEsc('upgrade_description', [], 'If you are upgrading a previous VuFind version, you can load your old settings with this tool.')?>
<?php endif; ?>

<?php if (isset($this->display_exceptions) && $this->display_exceptions): ?>
<h2><?=$this->transEsc('Exception')?>:</h2>
<p>
<b><?=$this->transEsc('Message')?>:</b> <?=$this->escapeHtml($this->exception->getMessage())?>
</p>

<h2><?=$this->transEsc('Backtrace')?>:</h2>
<pre><?=$this->exception->getTraceAsString()?>
</pre>

<?php if ($e = $this->exception->getPrevious()): ?>
<h3>Previous exceptions:</h3>
<?php while($e): ?>
<h4><?=get_class($e)?></h4>
<p><?=$e->getMessage()?></p>
<pre><?=$e->getTraceAsString()?></pre>
<?php $e = $e->getPrevious(); ?>
<?php endwhile; ?>
<?php endif; ?>

<?php if (isset($this->request)): ?>
<h2><?=$this->transEsc('error_page_parameter_list_heading')?>:</h2>
<pre><?=$this->escapeHtml(var_export($this->request->getParams(), true))?></pre>
<?php endif; ?>
<?php endif ?>
4 changes: 4 additions & 0 deletions themes/TAMU/templates/error/loginForAccess.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php // This can be used as a permission denied behavior; see example in permissionBehavior.ini... ?>
<a class="login" href="<?=$this->url('myresearch-home')?>" rel="nofollow">
<strong><?=$this->transEsc('Login for full access')?></strong>
</a>
25 changes: 25 additions & 0 deletions themes/TAMU/templates/error/permissiondenied.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
// Set page title.
$this->headTitle($this->translate('permission_denied_title'));

// Disable top search box -- this page has a special layout.
$this->layout()->searchbox = false;

$this->layout()->breadcrumbs = '<li class="active">Error</li>';
?>
<div>
<h2><?=$this->transEsc('permission_denied_title')?></h2>
<p><?=$this->flashmessages()?></p>
<p>
<?=$this->transEsc('permission_denied')?>
<?php if (!empty($msg)): ?>
<div class="alert alert-danger"><?=$this->transEsc($msg)?></div>
<?php endif; ?>
</p>
<p>
<?=$this->transEsc('Please contact AskUs for assistance')?>
<br>
<?php $supportEmail = $this->escapeHtmlAttr($this->systemEmail()); ?>
<a href="mailto:<?=$supportEmail?>"><?=$supportEmail?></a>
</p>
</div>
22 changes: 22 additions & 0 deletions themes/TAMU/templates/error/unavailable.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
// Set page title.
$this->headTitle($this->translate('System Unavailable'));

// Disable top search box -- this page has a special layout.
$this->layout()->searchbox = false;

$this->layout()->breadcrumbs = '<li class="active">Error</li>';
?>
<div class="alert alert-warning">
<h2><?=$this->transEsc('System Unavailable')?></h2>
<p>
<?=$this->transEsc('The system is currently unavailable due to system maintenance')?>.
<?=$this->transEsc('Please check back soon')?>.
</p>
<p>
<?=$this->transEsc('Please contact AskUs for assistance')?>
<br>
<?php $supportEmail = $this->escapeHtmlAttr($this->systemEmail()); ?>
<a href="mailto:<?=$supportEmail?>"><?=$supportEmail?></a>
</p>
</div>
Loading