Skip to content

Instantly share code, notes, and snippets.

@mreidsma
Last active December 24, 2015 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mreidsma/6872739 to your computer and use it in GitHub Desktop.
Save mreidsma/6872739 to your computer and use it in GitHub Desktop.
Fix a terrible error in Sierra when patron has a locked account

Sierra's hard coded error messages

Epic error message failure

If a patron tries to request an item and their account is locked, they get this terrific message. Besides being HUGE RED TEXT it is completely unhelpful in letting the patron know who to ask and how to get ahold of someone who can help them. So I fixed it with CSS and markup, since this silly message is hard-coded and can't be changed. You just need to edit the request_result.html file in Web Master and look for the section that looks like this:

<!--{iferror}-->
<!--{errormsg}-->
<!--{else}-->

Replace that chunk with the code below (after you customize the message and the contact information) and it'll be a quick fix on a page that only frustrated folks see. It'll look more like this:

Not the greatest but better

<!--{iferror}-->
<style>
.please-do-not-display { display: none; }
</style>
<h3>There is a problem with your account</h3>
<p>Sorry, but your account is locked. Get in touch right away so we can fix it:</p>
<ul>
<li><!-- Put your contact info here --></li>
</ul>
<div class="please-do-not-display">
<!--{errormsg}-->
</div>
<!--{else}-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment