hi
i'm currently looking for a workaround for my aforementioned Category
problem.
i've noticed that if the page with the [[!Keyword]] markup just gets
saved normally (i.e. edit, then save, without changing anything), all
the necessary behind the scenes stuff happens (SaveAttributes,
PostPageIndex) resulting in a working Category.Keyword page.
the workaround that i thought could work but currently gives me
errors goes something like this - instead of having fox/foxedit
redirect=1 (i.e. to the same page), have it redirect to the same page
with ?action=updatePage where the appropriate functions are called.
here's my code in config.php:
if ($action=="updatePage") {
$thispage = ReadPage($pagename);
//WritePage($pagename, $thispage);
UpdatePage($pagename, $thispage, $thispage);
or: SaveAttributes($pagename, $thispage, $thispage);
Redirect($pagename);
}
i've used the ReadPage, WritePage, and SaveAttributes functions
plenty in modifications of the upload recipes without any problems -
but for some reason, i get major errors when trying to call any
version of this:
Warning: array_keys() [function.array-keys]: The first argument
should be an array in /home/user/public_html/pmwiki/pmwiki.php on
line 1651
Warning: array_values() [function.array-values]: The argument should
be an array in /home/user/public_html/pmwiki/pmwiki.php on line 1652
Warning: preg_replace() [function.preg-replace]: Empty regular
expression in /home/user/public_html/pmwiki/pmwiki.php on line 1652
any ideas of why this is happening? if i echo $thispage it appears
chock full of the arrays pmwiki seems to be complaining about.
are there other functions i must call first in order to make this
work, to prep it?
thanks for the help,
adam
On 16 Jun 2009, at 2:08 AM, Hans wrote:
Tuesday, June 16, 2009, 9:47:57 AM, adam overton wrote:
i'm checking now to see if one of my FoxFilters might be the
problem. maybe you might know off the top of your head?
i've a foxfilter set up so that if someone enters 'keyword' into
the fox form, it's ends up saving it as '[[!keyword]]'.
any chance FoxFilter is executing after UpdatePage() has already
been called?
no. any filter function is called very early, long before any page
updates.
~Hans
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users