[pmwiki-users] Help! :-( Form Data Being Posted 2-3 times

Sivakatirswami katir at hindu.org
Tue Aug 7 14:10:22 CDT 2007


Ben Stallings wrote:

> I'm just guessing here, but I think you're getting two posts the first 
> time because, if I understand what you're saying, you're using (:zap 
> nextpage:) 

Ben: thanks for jumping in... I'm  stuck...

good thoughts. but I'm not using (:zap nextpage:)

My form is really simple -- and, Dan, there is only one per page and
no KEY in use... should here be a KEY in use?
$RecipeInfo['ZAP']['Version'] = '2007-05-05';
$FmtPV['$ZAPversion'] = "'May 5, 2007'";)

(:zapform:)

# 5 simple input fields and then:

(:if ! group TODO*:)

# new TO DO (0r existing) group + page name = thread number:

(:zap datapage="TODO-{Project}.#":)

(:input hidden returnpage "{$FullName}":)
(:if group TODO*:)
(:input hidden returnpage "{$:returnpage}":)
(:ifend:)
(:input hidden savedata
"Project,Owner,Priority,Status,Description,returnpage":) (:input submit
value="Submit":)(:zapend:)
(:messages:)

That's it... pretty "bare bones" ...


Ben wrote:

> However, it certainly may be the case that beta 62 is caching 
> differently from previous versions.  You might try enabling IMS caching 
> and see if that helps, but I suspect your problem is with the ZAP form 
> and not with PmWiki.

  Ben... I didn't know what IMS caching is.. I will look it up tomorrow...
but it triggered me to remember that one of the changes with the
upgrades was to enable  PageList caching

So: I commented out the following:

# $PageListCacheDir = 'work.d';
# mkdirp($PageListCacheDir);

And, at first the problem seemed to go away.
My current page (from which the submit was made)
  would update like it used to with the page list
at the top displaying the newly created page... immediately after
submitting the form and creating the new pageand it's only showing
one...If I log into my wiki.d. via FTP I can see that two pages were just
created, even though only one appears at the top of the page.

but then if I go away to some other page
and come back. Now I see two of them...
Note if I enable $PageListCacheDir on submit, the pagelist
at the top of the page *does not* appear showing the newly
created page.... I have to go to some other URL and come back
and now two instances appears... this all points to PMwiki caching
issues....

And this is interesting...

If I go to one of the data pages
TODO-FAQ-Documentation/1007
  (which also has form in it's footer, which is used to update the form
as needed... if I update some of the PTV "fields" and submit, the
data which is right on that page, is updated, but no second page is created
Obviously because there is no "datapage" declared if we are in any group
TODO*

So this would indicate that something in the latest PMwiki is triggering
ZAP "savedata"  function(s) to  run twice if a datapage is declared.

Because of the mysterious behavior I'm getting in general in the edit
window
where PMwiki informs me if I click "Save and Edit" and then make changes
and try to save later..  that someone else has edited the page and
wants to reconcile the two, when in fact no one else has edited the page
and therei s only one instance of an edit window open... I suspect something
in PMwiki... I don't know if the two things are related at all. But the
behavior is
symptomatic: PMwiki is behaving as if there were a second instance of some
other author editing and saving, when in fact there is only one author
saving and
editing. i.e. we have two "submits" in progress in the edit window, even
though
there is only single author. Similarly, we fill in a form and submit,
but PMwiki
acts as if there were  second instance of that same action.

Again, I'm not saying that there may not be a problem with ZAP, but all
these symptoms point to PMwiki's caching changes....

I'm way out of my depth here with no place to go for solutions other than
to see if I can get FOX to work and hope that it plays better with the
current PMwiki.. but that's a learning curve and I have know idea how much
refactoring will be required, or if FOX will even support my current model
--which is otherwise working great.. I'm very happy with it:
one form: creates new pages with PTV's, updateable and displayable
any way you like with standard PMwiki page lists and no more complicated
"recipes"
it's a really simple, lo-maintenance and effective GTD system...

Sivakatirswami





More information about the pmwiki-users mailing list