Compare http://en.wikipedia.org/wiki/Special:AllPages/CJ
with
http://en.wikipedia.org/w/index.php?title=Special%3AAllPages&from=CJ&to=&namespace=0
In the last case, there are not next/prev elements. This is caused by the presence of to= in the link. If that is removed, the behavior is identical to the first link. This is a curious difference in special page behavior that is confusing some users (reported on the WP:Helpdesk).