Faculty publications sorting problem

Request Type: 
General Assistance
Author: 
Bjorn Akselsen
Issue/Request: 

Hi, we’re having trouble with the sorting in our publications list. We set the view to sort according to author name (asc) and then date (asc) (see screenshot). This worked perfectly until we updated to YaleSites 2016. Now the publications start with the letter “B” and then “A” comes up much later in the list. Large tracts of the list, are, oddly, in order, though

Hi, just following up on this as we haven’t heard anything back.

Hi Bjorn,

I’ll take a look at this and see if I can identify the cause.

-Zach

Hi Bjorn,

I looked at this with a colleague and we determined that the issue with this view wasn’t caused by switching themes, but with how the sorting for the view was configured. Essentially, the view was not actually sorting alphabetically but instead sorting by a sort of ID number associated with the user referenced in the Faculy Author field.

This had the illusion of working properly, most likely because the faculty were added to the site in alphabetical order and thus would have had sequential IDs, but as users were added later on, these users fell out of the proper order.

The fix my colleague applied allows the view to access the last name field of the user’s profile and sort based on that value, which it was previously unable to do. Everything seems normal now.

Let me know if this all looks correct, and I’ll consider the issue resolved.

Best,

-Zach

Hi Zach,

Thank you so much — it appears to be working well now. Funny about the alpha order vs ID’s — we had this looked into years ago and thought it fixed. But all that matters is that it’s working. You’ve been very helpful, thanks again. But before I sign off, we did post a question about the faculty publications block we have on the home page and wonder if you have any thoughts on this: The client has a question about the random order of the homepage publication feed. Right now it’s randomizing from all publications in the regular bookshelf listing. But is there a way to randomize from a date range, i.e. present day and 3 years back? That way we could get only the random order of most recently published books instead of all publications “committed.”

Thanks again,

Bjorn

Hi again, I have tried to customize the sorting to no avail. The idea was to only pull the most recently published books (from books spanning several decades), preferably randomized within a publication year range. We set it to “Global: random” and whatever I tried to specify as a publication year range failed. Thinking I’d achieve the desired result by removing the random sorting and instead sort by publication year: descending, so it cycles through the most recent pubs first, had no effect even. Please let me know if there’s something obvious I’m overlooking.

Thanks again,

Bjorn

The client wants to know if we can randomize from a date range, i.e. present day and 3 years back? But probably not. We do have a problem, though: if we remove the random order and select publication by year, desc, for example, nothing happens. Nothing we do to the sorting order has any effect…

Hi Bjorn,

I suspect that your troubles with setting a filter criteria based on a publishing date range has something to do with the fact that the publishing date field is not a proper date field. Near as I can tell, it is a text field that also contains other publishing data (ie “Yale, 2017)”. Because of this, I imagine the sorting and/or filtering for the field would interpret this field value as an alphabetical value and sort it according to ABC order. Because you’re attempting to use this for filtering, I imagine it just considers the field value invalid.

There’s not really any easy solution here. The Publication Date needs to be a date field in truth to use it for filtering/sorting that way. Otherwise, it will sort improperly or fail. This will likely require manual editing of the content type itself to divide the values in the field into their component parts (meaning, individual fields for “publishing institution” or something like it, and for “publishing date”).

Does this all make sense? let me know if anything’s unclear.

-Zach

Hi Zach, that makes sense. It’s a big job to divide the publisher name and date fields so I’m looking at alternatives. We’d like a slideshow of 10-20 covers, like on the front page (perhaps larger image filing the block width). I’ve looked into setting up a stand-alone slideshow, or similar, but I can’t find anything suitable. I did a gallery test (https://classics.yale.edu/gallery/recent-publications), thinking that might work but that’s a page — I need it into the block on the sidebar on the front. I’d appreciate any leads to solve this. Thank you very much!

But I guess adding a date (year) field and then renaming the text area to “Publisher” could work. Does that seem right?

Hi Bjorn

As to your first point, setting up a view block in a slideshow format could do the job (though I can’t speak to how well it would look).

Your second point: That’s basically how I would approach it, yes! You’d still need to manually edit the contents of the existing text field, but that’s not an enormous lift. Tedious, perhaps, but not difficult!

Let me know how the view block idea sounds to you.

-Zach

I did it! Thank you for your help — this worked out.

A couple of questions, though, if you don’t mind. First, no matter what I set the image size to in the slideshow, it will not change. I’d like to experiment with a responsive but larger size (height being constant — books have different aspect ratios). Is there a way to change this?

The other question is how I set up a view block in a slideshow format. I’ve tried so many things, read the documentation but somehow I cannot get it to work…

Thanks again

Bjorn

Hi Bjorn,

Before I address your first point, it looks like the sidebar block on the front page is currently in a slideshow format. Does this mean you figured that part out?

Now, back to your first point: How are you editing the image sizes? Are you modifying the view settings for the Publication Image field? It seems that in addition to changing the view format to slideshow, you can also change the image format to slideshow. Try tweaking that setting and see if it gets you anywhere.

-Zach