Overview# I encountered an issue where the Omeka S OAI-PMH repository’s resumptionToken was outputting a [badResumptionToken] error even though the token was still within its expiration period.
Here are my notes on how to address this bug.
Solution# By adding a comparison between $currentTime and $expirationTime to the following file, tokens within their expiration period are now properly retained.
p { r i v a $ $ ] f } t a e ) o e p x - r i p > e f i ' g a $ $ i } u = r e e c c e f n e x t h u x / c $ d p C r p ( / t t T i o ( r i ! $ i h o r n $ e r $ a A o i k e t e n a e p d n s e d e x t t x i d - n ' n p T i p - e r > s t i i o i > d e s = ( r m n r d s e = > ) e e T e e u r ; d i d l m v $ t T = m T e e i a r o e o t L c p u k n k e i e i e e e = e ( s L - , n w n ' t o > s $ o R c s \ e a e a e a D x i s t a s a p p p o r t i $ m o r c $ e r c h n - h e T e u _ s > ( x i d r r e g ' p m T r e ( e o i e o e p $ t a r ( k n o t ( i e ) e t s o ' p d ; n T i k C m T - i t e o h o > m o n n _ k e e r ) t r e x y : r e n A p > _ o p ) d i t l o d r $ o o l s { e a e k i e i d t x e d r t i p n P o o i s l r n r ' u y ( a , g _ ) t i t ; i $ n o e M k n x a e T p n n i i a s A m r g ' d e e e , d ) d r e T ' [ d { o ) k - / e > / n g - e A > t d i ( d d ' e ( a d ) p ) i ; ' ) ; There were cases where things worked without this fix, so there may be differences depending on the PHP version, etc.
References# For reference, I checked the contents of the table created by the OAI-PMH repository module.
m 8 m y y s F i v m c f u s e r s i 1 1 1 1 1 1 q i d e e u r n e x o q d 8 9 0 1 2 3 4 5 l e r t r o t t p w l > l b a s m i i s > d d o l r D a r a i S v L L L L L L L L E t t n E e i i i i i i i i S a i L r s s s s s s s s C _ o s E b t t t t t t t t R p n e C R R R R R R R R I r t T e e e e e e e e B e c c c c c c c c E f ( o o o o o o o o i 0 r r r r r r r r o x . F d d d d d d d d a 0 R s s s s s s s s i 1 O p M m T i v v i d d v d s h y n a a n a a a a e o m o o o o o o o o r p t r r t t t r t c a e a a a a a a a a e e c c e e c e ) i t i i i i i i i i p h h t t h t p a _ _ _ _ _ _ _ _ o a a i i a i m d d d d d d d d d s r r m m r m h a c c c c c c c c i ( ( e e ( e r t t 1 1 1 e a o 5 9 9 p _ r ) 0 0 o p y ) ) s r _ i e t t f o o i k N N N N N Y Y Y N r x e u O O O O E E E O y n l S S S _ ; l t o c k u e r K P M n s 1 1 1 1 2 e R U o 5 5 0 5 5 0 5 0 y I L L r 0 0 0 0 0 0 0 0 I M I D N N N N N N N N T f N N N N N N N N e U U U U U U U U r U U U U U U U U f L L L L L L L L 1 o L L L L L L L L a L L L L L L L L 0 m L L L L L L L L u ; l t u N N N N N N N N n U U U U U U U U t L L L L L L L L E a i L L L L L L L L x u l t t r o a _ i s N N N N N N N N n e U U U U U U U U c t L L L L L L L L r L L L L L L L L e m e n e 2 2 2 2 2 2 2 2 t x 0 0 0 0 0 0 0 0 p 2 2 2 2 2 2 2 2 i 4 4 4 4 4 4 4 4 r - - - - - - - - a 1 1 1 1 1 1 1 1 t 0 0 0 0 0 0 0 0 i - - - - - - - - o 1 1 1 1 1 1 1 1 n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 7 7 7 8 8 8 8 : : : : : : : : 0 0 0 0 1 1 1 1 7 7 7 7 6 6 6 6 : : : : : : : : 4 4 4 5 3 3 4 4 0 4 9 4 1 6 1 4 Summary# There may be some incomplete aspects, but I hope this serves as a useful reference.