Week Beginning 6th November 2023

I spent the first two days of this week finishing off checking my locally hosted sites were compatible with PHP8, upgrading the version of jQuery they use and dealing with any warnings and notifications thrown by PHP.  The dictionary sites (Anglo-Norman and the Dictionaries of the Scots Language) were especially time consuming to deal with, and the DSL sites needed to be upgraded from a very early version of jQuery and jQuery UI which was a bit of a nightmare.  However, I’d completed all of the required work on Tuesday, which was quite a relief as it’s been a long and tedious task.  I discovered later in the week that the server these sites is hosted on, which we purchased less than two years ago is now going to be decommissioned, and all of the sites will be moved to an entirely different server.  This was a bit of a shock, and will require yet another round of migration and dealing with issues.  I’m not directly involved with most of this, but I did have to help out with setting up Solr cores and important data into Solr on the new server on Friday this week, which took some time to sort out when I was really needing to focus on other things, which was rather frustrating.

I spent most of the rest of the week continuing to develop the new map interface for the Iona place-names project, working on the Advanced Search, which is accessed by pressing the ‘Advanced search’ button in the ‘Search’ section of the map’s left-hand menu.  This opens up a pop-up that contains all of the fields as found in previous place-names projects (e.g. https://berwickshire-placenames.glasgow.ac.uk/place-names/?p=search), but in a more compact layout.  This pop-up is an ‘in map’ pop-up meaning that it still works when the map is in full-screen mode.  It has been trickier than you might think to implement – it wasn’t just a case of taking the existing form and sticking it in the pop-up as fields such as parishes, codes and element languages are dynamically generated based on the available data and the existing form was generated on the server-side whereas the new form is generated on the client-side (i.e. by code running in the user’s  browser).  I therefore had to write a new series of scripts to generate the data on the server and make it available to be pulled into the form in the browser.  This also applies to the ‘autocomplete’ fields (‘Source’ and ‘Element’), where you can type a few characters in and view a list of matching items.

Having the form in a pop-up in a map also made it tricky to get the tooltips (when you hover-over one of the ‘(?)’ icons) and the autocomplete selection lists working.  The webpage is comprised of different elements, some of which sit on top of each other, and the order of these is controlled by something called the ‘z-index’.  This tells the browser (for example) that when the pop-up opens, the map layer should be covered by a transparent grey layer and on top of this layer the popup should sit.  But the tooltips and autocomplete use a different library that doesn’t expect there to be a map and then a popup sitting over the webpage, meaning these elements were appearing underneath the popup.  It took a while to figure out these elements were actually working, but were being hidden.

However, I managed to deal with these issues and the upshot is that the advanced search form works.  The following screenshot is an example of the form, with ‘Scottish Gaelic’ chosen as ‘Element Language’ and the autocomplete list visible for ‘Element’ after typing in the characters ‘du’.

The form can be used to search for any combination of the search boxes, but we may want to trim these down (‘Parish’ may not be necessary and I’m not sure ‘Linear’ is relevant, for example).  When you press on the ‘Search’ button the pop-up closes and the script generates a search query based on the options you have chosen.  All of this code had to be migrated over to the client-side too (converting it from PHP to JavaScript) so this wasn’t a straightforward matter either.  The query is then passed to the API and any relevant data is returned and displayed.  The ‘Search’ section of the menu is also updated to display a list of the things you searched for and a count of the number of place-names found.  The screenshot below shows the results of a search for place-names that have an earliest recorded date of before 1700.  This is a full-screen view of the map, set to satellite view with place-name labels visible and one place-name pop-up open.

There are still a number of tweaks I need to make to the search.  Most importantly, your search form choices are not yet ‘remembered’ by the system and when you return to the search form any previously entered options are lost.  I will sort this, along with the other things previously mentioned such as updating the URL to reflect the map contents, enabling bookmarks and citations, and also ensuring the map ‘remembers’ your display option choices too.  I also implemented the ‘Attribution and Copyright’ pop-up this week (press on the link in the very bottom right to view this).

Also this week I sorted an issue that was preventing the bulk download of texts as a ZIP from the SCOTS corpus from working.  Thankfully this was a simple permissions issue and was quick to resolve.  I also received the data about Genre from Matt Sangster for the Books and Borrowing project and have arranged to focus on implementing this over the coming weeks.  This will involve setting up the data structures to store genre data, writing and testing the scripts to import the data then running the scripts, updating the CMS to enable data to be managed, updating the Solr index and the scripts for generating Solr data for the front-end search to incorporate genre and updating the front-end to incorporate genre including the display, search and browse of genre.  This is going to be a pretty major job.

I also spent some time adding new videos and metadata for American speakers to the Speech Star database (see https://www.seeingspeech.ac.uk/speechstar/speech-database/), spoke to Gavin Miller about the new project website I’m setting up for him, helped Matthew Creasy with an issue with his James Joyce conference website and created an interface for Rhona Brown’s new project website.