View Single Post
Old 04-16-2023, 03:51 PM   #1
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,082
Karma: 76037135
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Sporadic virtual library recursion

On my virtual_libraries() column, I get spordaic "recursion detected when processing..." errors, which affect one of my reading-status VLs (though it seems to pick them at random).

The error disappears upon making an edit to a book (or even opening the MDE and saving without any changes).

I'm trying to figure out where the recursion may be coming from.

All three VLs use a template search checking a stored template, readstatus().

Currently Reading:
Code:
template:"program:readstatus()#@#:t:~(currentlyreading|toberead)"
Unread:
Code:
template:"program:readstatus()#@#:t:=unread"
Read:
Code:
template:"program:readstatus()#@#:t:=read"
readstatus() #percentread is an integer and #readinglist is a series-like.

Code:
program:

	if ($$#percentread >=#1 && $$#percentread <=#99) || ($#readinglist == 'Reference')
	then 'currentlyreading' 

	elif $#readinglist=='To Be Read' && $$#percentread ==#0
	then 'toberead' 

	elif $$#percentread >=#100
	then 'read' 

	elif $$#percentread == 'None'
	then 'undefined' 

	elif $$#percentread >=#0
	then 'unread' 

	fi
My thought was that the regex search for Currently Reading was messing up things, but this would make more sense if it was the only one getting the errors. Any other ideas?

Last edited by ownedbycats; 04-16-2023 at 04:01 PM.
ownedbycats is offline   Reply With Quote