(I already sent this to Petko offlist, but since the thread today indicated sending it to the dev list, I'll do that as well.)
2 issues have been identified recently which have to do with the fact that PTVs are always read from the saved copy of a page. (1) During preview the saved copy is used instead of the copy that you have just edited (2) During save if an invisible PTV is used to hold a link which is then shown elsewhere, the link= in .pageindex is cached with the copy that was previously on disk rather than the copy that is newly edited and being saved now. It's easier to read the attached patch than it is to explain what it does. Basically it uses the newly-updated text of the page to update the in-memory cache of PTVs rather than reading the page stored in the pagestore. Review, testing, etc welcomed. Particularly I'm interested if people think the PTVCache() should check if $PCache[...]['=pagetextvars'] is set or allow it to re-cache the PTV values if called explicitly... (It's already checked in PageTextVar().) In any event, I'm hoping this (or something similar) will be considered for addition into the core to resolve the 2 issues referred to above. -Peter
preview-fix.patch
Description: Binary data
_______________________________________________ pmwiki-devel mailing list pmwiki-devel@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-devel