← FAQs and Troubleshooting

Development FAQs/Known Issues

Please submit any known issues (like Silvercloud scripting issues) or frequent questions you have as a developer or get from another developer to Laura Drury or Chris Struyk via Slack. They can add it to this list.

Frequently Asked Developer Questions

  1. Where can I find the list of mustache Page call options?
    Log in to https://github.com/Banno/banno-cms/blob/64a08059ca89d0cba4cebdff724000ca592b2107/modules/common/src/main/scala/models/page/events/PageEvents.scala
    Lines ~87-112 should be the full list of options.

  2. I opened a page on a UAT or live site and it gave a gross red bar saying there was an error. It’s probably an issue with a mustache file. But there are so many, how do you know which one has the problem?? Use Kibana, here are your links.

To find your error type in the errorId in the search bar and open up the error. In the message parameter, you will see more info regarding your specific site’s error.

  1. How do I convert a site to use Bootstrap 4? Please see this page for a full walkthrough!

  2. How do I clear varnish? (And why would I do that?)

curl -X PURGE 10.3.0.111:6081 -H "Host: domain.com ";

You may need to clear varnish if CSS or JS functions are not taking effect on a UAT or production site. HTML changes may or may not go through fine, but CSS and JS refuse to go through. Hopefully, you shouldn’t need to do this often, because we’ve improved our processes to keep things from getting cached as much as possible, but just in case, it’s always helpful to manually clear varnish to verify that that’s not the issue you’re having.

  1. My new site is built from a Sketch file, but I’ve never used it before. The designers have officially switched off of Adobe Illustrator and moved on to Sketch, which means that we are working with the developer-friendly spinoff, Abstract. Here’s how to build a new site using it!

  2. I’m getting dev console errors about things that “violate the Content Security Policy”. What does that mean, and how do I fix it?

This is referring to CSP (content security policy) errors, which in turn references the csp.mustache file. These are directives set by corporate to prevent scripts, images, etc. from getting pulled in that are unwanted. Unfortunately this also means that anytime we have anything new, we usually need to whitelist it.

Your CSP error will look something like this:

Refused to load the image 'https://images.boldchat.com/ext/images/buttons/chat/gallery/Button_Navy_Shaded_17A.png' because it violates the following Content Security Policy directive: "img-src 'self' *.google-analytics.com *.googletagmanager.com data: *.googleapis.com *.gstatic.com https://dummyimage.com *.banno.com".

To clear it, find the directive it mentions within your csp.mustache file. In this case, “…because it violates the following Content Security Policy directive: “img-src ‘self’…” is your hint–the “img-src” directive is the one you want to edit. The error also gives you information on what you need to add–in this case, it would be the boldchat link. But because we want to cover all subdomains of boldchat, just in case, you can add *.boldchat.com (note the period after the * wildcard) and boldchat.com to the directive. This will clear errors related to the direct boldchat.com URL, and any subdomains under boldchat.com.

  1. How do I reindex the search?

You can reindex the search through Postman, but it may also just be faster to do it through the API URL. This has to be done manually sometimes, usually right after you push the site to UAT and after the site has been launched.

UAT Site: https://uat.banno.com/a/cms/api/site/YOURSITE-uat.banno.com/page/_reindex UAT Site Example: https://uat.banno.com/a/cms/api/site/chinese-inbk-uat.banno.com/page/_reindex

Live Site: https://banno.com/a/cms/api/site/YOURSITE.com/page/_reindex Live Site Example: https://banno.com/a/cms/api/site/nbofi.com/page/_reindex

  1. I’m being asked to set different default values for the Dinkytown calculators. Can we even do that?

For some values, yes. See this FAQ from Dinkytown about the available defaults that can be changed within KJESiteSpecific.js. For more general information about calculators, see this page.

Known issues

  1. Silvercloud scripting:
    Content coming soon. See Karla or Evan for details until more is posted here.

Handy Tips

Functions with parameters

You can create a custom functions file inside of your ~/.oh-my-zsh/custom folder to store functions so you don’t have to type as much in terminal.

function Name() {
  commands go here with variables in this format: "$1"
}

For example, let’s push repo changes to git. We can pass a parameter with the branch name.

function push () {
  git push origin $1
}

After you have created your functions save the file and restart terminal. To use your new function, you just need to type the function name and file in your parameters. So in the example above if you were trying to push directly to the master branch of a repo you would simply type. push master.

To add more parameters, just add them as “$2”, “$3”, etc Note: They must be numbers or they won’t work. You can use the same parameter in different places if needed. Like for example if you need to pass a branch name to your function.

Keyboard Shortcuts in text editor

  • ctrl + cmd + g select a word, then hit this combo to select all occurrences of that word all at once (fast find and replace)
  • ctrl + opt + g will select the next occurrence of the word
  • ctrl + shift + a inside of html will select opening and closing tags at the same time allowing you to change both at once
  • cmd + opt + [# 1-10] will split the current pane into [this] many vertical panels
  • cmd + shift + v paste AND indent contents correctly
  • cmd + shift + l while having multiple lines selected will give you a cursor at each line and also select each line, hitting right arrow will move you to the end of the lines allowing you to add code to each line all at once.
  • cmd + d highlight something, then use this to select the next occurrence of the selection
  • cmd + p open file within the project you have open