[pmwiki-users] Preview doesn't resolve page text variables

Peter Bowers pbowers at pobox.com
Tue May 26 23:29:46 CDT 2009


On Tue, May 26, 2009 at 8:53 PM, Patrick R. Michaud <pmichaud at pobox.com>wrote:

> I'm willing to entertain patches that make it possible to view page
> text variables when a page is being previewed, but the fact that
> it doesn't work now isn't exactly a bug in my book.
>

It seems like the only "sure-fire" way to deal with any and all issues
related to preview processing would be to patch the pagestore Read()
function.  However, this is going to cause a performance hit throughout all
operations and seems very not worth it.

However, to fix the specific issue raised by Randy it could suffice to patch
PreviewPage(), adding these:

   PCache($pagename, $new);
   CachePTV($pagename, $new);

Then CachePTV() needs to be defined by splitting up PageTextVar() so that
PageTextVar() reads the page, calls CachePTV() with the $page read, and then
returns from the cached values.  CachePTV() itself would be the code from
PageTextVar() which processes the $page and caches.

I'm happy to code up a patch if it's likely to be used in core, but it
doesn't lend itself to a recipe and so is pointless unless it will be
included...

-Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090527/8e3be029/attachment.html 


More information about the pmwiki-users mailing list