anvc / scalar

Born-digital, open source, media-rich scholarly publishing that’s as easy as blogging.
Other
231 stars 73 forks source link

Error: Timeline configuration has no events #235

Closed petersmahon closed 1 month ago

petersmahon commented 1 month ago

Hello, I have two instances of Scalar 2.6.8 running, and one 2.6.7. On the 2.6.7 instance, a book with a lot of timeline pages works just fine; however, I imported the book using the importer tool to the 2.6.8 instances, and now I keep getting the "Error: Timeline configuration has no events." message. None of the timelines will load. I've looked at the temporal metadata on the 2.6.8 instances and it all seems to be there, so I'm at a bit of a loss as to why this is happening. Any help/advice would be gratefully received. Best, Peter

craigdietrich commented 1 month ago

That's odd indeed!

Is the Scalar book in question public? If so, can you shoot some URLs to the not-working Timelines over to me at craigdietrich at gmail?

petersmahon commented 1 month ago

Hi Craig, I've made the book public; the timeline pages are all linked here:

https://devserver.ravenspacepublishing.org/boas-hunt/general-timeline?path=timelines

Word of warning: the server is running incredibly slow at the moment; I'm not yet sure if that's related to the imported book or if our hosting service is tinkering in the background. Many thanks! Peter

craigdietrich commented 1 month ago

Wow, the server is running really slow! We have had some reports of Scalar running really slowly but it's usually in special circumstances, like Scalar running on a cluster of servers at the same time.

Pulling up that page didn't reveal anything in the Console (unfortunately). I'll do some more poking around.

eloyer commented 1 month ago

Hi @petersmahon , looking at the page you sent, I spot-checked a couple of items in the timeline path and didn't see temporal metadata on them (either dcterms:temporal or dcterms:date), can you confirm?

petersmahon commented 1 month ago

Thanks to you both for looking at this. Erik, I'll check that out further. The entries I looked at seemed to have imported all their timeline metadata. I also just noticed that I can't create any new timelines in the same book, either; and this book loads way, way slower (sometimes 10-20 times longer for the timeline pages) than our other ones on the same server. As I said, all seems to working well for this book on instances below 2.6.8 (my 2.6.7, and another one I know of running 2.5.14); these issues only came to light after I imported the book yesterday. I was wondering if there might be an upper limit on the amount of timeline entries? We have 117 in one: is that pushing it? And if may ask a sort-of related question: is there a recommended limit on the number of items that can be inserted into certain widgets--galleries, carousels, timelines, etc? Some of our book makers really like to push it, it seems (one book gallery had nearly 100 entries and our system was struggling, to say the least). Sincere thanks for casting an eye over this.

eloyer commented 1 month ago

Generally, we recommend keeping the number of connections from a single node below 100, whether that's contents of a path, tagged items, or annotations on a piece of media. That said, the kind of performance issues you're seeing go way beyond what we'd expect from large numbers of links. Have you been able to import the book into versions below 2.6.8 without having the same issues?

petersmahon commented 1 month ago

100 per node: ok.

The book works on a 2.6.7 instance, but I used a mysql dump for that one. The problems only started when I used the import tool for this book on the 2.6.8. It's worked well enough for other books, but it has also been acting a bit odd: it often just stops importing and just hangs without giving an error. Most recently, I've tried 4-5 times to get it to import this book into another 2.6.8 instance, but it keeps locking up. The tool also really strains the server.

Looking again at the successful 2.6.8 import, it seems that the import tool has stripped out all of the timeline relations: yet, when I click on each of the individual events in the timeline, it shows the necessary temporal metadata under each event.

The performance issues are very bad around this book. The other books we've got on the servers aren't lightning quick, but this is a whole order of magnitude worse.

If I have to, if something can't be sorted, I'll do a rebuild. Any further advice is greatly appreciated. Many thanks!

craigdietrich commented 1 month ago

What version of the Transfer tool are you using? It's up to v0.9 now:

https://github.com/Michael628/scalar-book-transfer-tool/releases

... which includes it sending requests to the server, now, one at a time instead of all at once (eep).

petersmahon commented 1 month ago

Cheers Craig, I'll check that out. Where would I find the version info? Just to note: I just reproduced the same problem on our second 2.6.8 instance. The best way I can describe it is: the book transfer tool seems to be 'stripping' the temporal metadata from events, so the timeline function can no longer find it and it throws an error. Yet, when I click on the additional metadata for an individual event, it shows on both the original book and the exported book. The same slow-down of server also occurs.

eloyer commented 1 month ago

Could you send a link to a page in the new 2.6.8 book that includes the temporal metadata?

petersmahon commented 1 month ago

Here's an example on the devserver: https://devserver.ravenspacepublishing.org/boas-hunt/boas-field-trip-to-baffin-island?path=boas-activities

Here's an example from the publications server [edit to add: this is a 2.6.9 instance]: https://publications.ravenspacepublishing.org/boas-test/newettee-opened-as-a-fur-trading-rendezvous-in-the-maritime-fur-trade?path=general-timeline

Again, you'll see how slow both servers are running for the same book. Other books seem to be performing as expected.

When I click on the "additional metadata" button, I can see the required data. I will note that not every entry in the timeline has that metadata, but that doesn't seem to matter for the 2.6.7 instance, where the timeline loads as expected and there are no 30+ second lags.

petersmahon commented 1 month ago

Craig: It seems to be the latest version of the tool, given a cross-check with the most recent round of code edits.

eloyer commented 1 month ago

For the second link, is this install from a third party branch of Scalar? We haven't released a 2.6.9 version, and I'm seeing a 500 error on that page for a call to timeline.min.css, which isn't a part of the current version (we call timeline.css).

petersmahon commented 1 month ago

I got it through your Github here about a month ago.

And that error I'm pretty sure has been popping up quite a bit on our servers. Edit: just to confirm--that same error pops up for our As I Remember It copy, which I copied using the import tool from the ANVC servers. I've no idea what is calling on the timeline.min.css file in that book. This is very odd.

eloyer commented 1 month ago

My bad, we haven't done an official 2.6.9 release yet but that is indeed the version string in the latest source. The timeline.min.css is a real mystery, can't find any reference to it in the source. Can you send a link to the book you're importing from so we can try? Feel free to use this form to send.

petersmahon commented 1 month ago

No problem. And again thanks for your attention to this. The book I imported from the ANVC server is: https://scalar.usc.edu/ravenspace/as-i-remember-it/index

The timeline.min.css error pops up for both full books on our publications server (2.6.9). I just checked and it also pops up for a blank one-page test book I made just now--strongly suggests the error isn't content-related.

The timeline.min.css error is not present on the 2.6.8 or the 2.6.7 instances. And FYI: the 'edit' and 'create a new page' buttons in the navbar (2.6.9, and maybe the 2.6.8?) show the same message ('create a new page') on hover. It was confusing a couple of our authors (scalarheader.jquery.js). Sorry to be a pain!

petersmahon commented 1 month ago

An update: I just tried a mysql dump to our 2.6.8 instance using the same dump file I put on my test 2.6.7 instance; as mentioned before, on the 2.6.7, the timeline works fine. Now, on the 2.6.8 instance it seems ALL of the timeline metadata is lost: so, not only is the timeline configuration error still showing, none of the timeline metadata is even showing up! Here's the same page for comparison:

new mysql dump page: https://devserver.ravenspacepublishing.org/boas-and-hunt-1897/newettee-opened-as-a-fur-trading-rendezvous-in-the-maritime-fur-trade?path=general-timeline

book import tool page: https://publications.ravenspacepublishing.org/boas-test/newettee-opened-as-a-fur-trading-rendezvous-in-the-maritime-fur-trade?path=general-timeline

As you can see, at least the book import tool preserves the metadata, even if it no longer makes a timeline. But the same mysql dump file shows no metadata on the 2.6.8, yet works fine on the 2.6.7. Edit to add: the loading times degrade even with the mysql dump file. These performance issues are not present on the 2.6.7 instance, which is running on a little old raspberry pi 4!

eloyer commented 1 month ago

Can you send the link to the specific book with the timelines that you're trying to import (I don't believe AIRI has timelines)? Want to see if we can duplicate those issues on our end.

petersmahon commented 1 month ago

It is the boas-hunt book linked above.

I got the original copy from a mysql dump taken from our old RavenSpace server which died. I didn't set that server up, but I had to step in and rescue the materials on it after UBC IT pulled the plug on it. Another version of the book I test imported is over at agile humanities (that version I believe is running on 2.5.14, and has nothing to do with our servers): http://ravenspace.agilehumanities.ca/boas-and-hunt-1897/index

Edit to add: neither version works for me on 2.6.8 or 2.6.9.

eloyer commented 1 month ago

Just an update to confirm that I was able to import the book to an ANVC server running Scalar 2.6.8 with no issues — timelines are working, metadata is intact, and no slowdowns. Happy to share the file I imported if that's helpful.

petersmahon commented 1 month ago

That's excellent news! Yes, please do send me the file you used. I'll report back once I've tried this later this week. If I run into issues, then it would seem I've got a corrupted install on my hands. I'll report back once I've tried this later this week. Again, thanks for all your efforts with this. Edit: could you give me a link to the 2.6.8 version? I want to make sure that I can roll back from 2.6.9. Thanks!

eloyer commented 1 month ago

@petersmahon Sounds good, ping me with this form and I'll send via email.

petersmahon commented 1 month ago

Just a quick update: I did a Scalar 2.6.9 install with Azure, imported the problem book, and, hey presto!, everything works now. No lags either. I now suspect either a corrupt install or our hosting environment at Compute Canada is causing some problems. I'll have to dig further. You can close this issue now, and sincere thanks for helping out with this.

eloyer commented 1 month ago

Excellent, glad to hear it!