week of 15 jul

15 Jul 2019

15 jul

Goals for this week:

timetables

This was fun! I love javascript.

I really only needed to update and rearrange URL parameters, then change some variables to make sure they matched the API endpoint parameters. I make it sound simple, but I did spend a few hours figuring out the differences in the API and rewriting some for loops to match up with the new API. I also ran into a complication where I was worried about the Gorgas room being on two different pages, but it turns out Drew already thought of that and it was taken care of. So I wasted about an hour thinking through that one for no reason. :woman_shrugging:

There was also quite a bit of bebopping around LibCal trying to figure out the settings of the spaces. I’m pretty sure these spaces were not configured correctly when they were set up. I didn’t check it before migration because I didn’t realize I needed to, so those settings are likely not correct. I went ahead and changed some of the things I knew to be correct (30 minute windows of booking time) and emailed Cornelia about other things (maximum number of hours for checkout, number of checkouts per day).

undo form management app PR

Since the forms app is somewhat working on the new staging server, I decided to close the PR I had in on ualibdeploy. Now I’m going to try to reset the manage_ui repo back to before I made all the changes. I wonder if there’s a way to stash them on a branch somewhere for safe keeping?

Anyway, here are the changes I made to the README, which I would like to store here in case they go missing:

## Development workflow (borrowed from `hours_ui`)

- `npm install`
  - this installs all the grunt dependencies so you can build your changes before you push 
- `grunt` 
  - runs build
- edit away!
- run `grunt live-build` before you push to github
  - builds the min files

Hokay, so. I made a new branch called 5.6-changes that is a copy of the current master, complete with all the fixes I made two weeks ago regarding the forms app. It’s stashed away in case I need it again. Tomorrow, I’ll roll back the app to the commit before all my changes, and we should be good!

18 jul

The last few days have been a meandering of projects and tasks. A lot of it has been intranet or LibCal related.

libcal

There were quite a few loose ends that needed tying up with the migration to Spaces. Figuring out exactly what was wrong and what settings needed to be put in place to tie up those loose ends took more time than I thought it would.

I’ve also been tinkering with the instruction form project for the fall to see what our options are. Now that I’ve been in the system, I’m not really sure a calendar or space is what we want to use for scheduling instruction on the front-end. I need to chat with Sara before I can move forward on that one.

intranet

Rudaina and I met and talked about a plan for migrating this content to WP. She’s going to take on adding pages and moving content, so I just gave her the gist of what I learned about how content is organized in Drupal.

Then I tried to add a page to the new WP site and it gave me this “publish failed” error. I spent probably 3 hours troubleshooting this 500 internal server error, but all the solutions involved messing with server settings, and I’m not super comfortable editing configurations that were set 6 years ago and might affect other projects I know nothing about. I ended up going with the cheater version, which was to install the Classic Editor plugin that disables the Gutenberg editor. There’s something going on with blocking the WP API which is causing the Gutenberg editor to throw an error. There were a few solutions I could’ve tried, but again, not something I want to take on at the moment.

What’s really weird to me though is that this was happening on all the other blogs, too. I tried to add a test page to This Goodly Land, and it gave me the same issue. Jared just finished that project like… 2 months ago. What happened in between now and then that made it impossible to add/update pages? I really don’t think we upgraded any WP settings, so what could’ve happened that’s causing this problem?

recap

This week really got away from me. I ended up spending most of Thursday/Friday splitting my time between the LibCal instruction form stuff and intranet migration stuff.

LibCal

I tinkered around enough to figure out how to do (more or less) what Sara had in mind. I ended up splitting the two ghost locations into separate categories so they could have their own form. When an instructor wants to request a session, they use the “location” of their class type (first year english or general) and choose their ideal day from the calendar. It takes them to the form to fill out more info about their class. Once it’s submitted, it goes into the “mediation” queue, where a librarian can assign it an appropriate room/day/time. This space booking can then be turned into an event that shows up on the instruction calendar. The end!

Sara thinks it will work, so next week I’ll need to spend a bit of time sprucing it up so it’s ready to fully test.

Intranet

I ended up adding the “move now” pages to the intranet dev site and creating menus. I was on a roll, so I decided to add the forms page and all the forms from the backend.

I spent Friday afternoon trying to figure out the LDAP plugin again. Jennifer was helping me figure out what the LDAP settings on our server are, but I think my problem was that MAMP doesn’t let you install modules unless you have the pro version. So it looks like I’ll have to figure out my docker container after all. Heavy sigh.