hi Hans!
thanks for the step-by-step for fox-debugging! i really appreciate it!
i'm pasting below what was printed out. indeed, i think the target is not 
getting filled in.

and as for the one fox filter i'm using for this, it's a simple filter that 
checks to see if someone put in an erroneous date from the drop down menu – 
i.e. 4/31 gets corrected to 5/1. this has worked in the past, up until the 
recent upgrades.

thanks again for the help.
adam

. . .

$FoxFilterFunctions['correctDate'] = 'correctDate_func';
function correctDate_func($pagename, $fields) {
        # get date
        $year = $fields["year"];
        $month = $fields["month"];
        $day = $fields["day"];
        
        $fulldateYMD_orig = "$year$month$day";
        # this will correct erroneous dates like 06/31/2009, and will turn it 
into 07/01/2009
        $fulldateYMD_corrected = 
strftime("%Y%m%d",strtotime($fulldateYMD_orig));

        # if nothing has changed, simply return fields as normal
        if($fulldateYMD_corrected!=$fulldateYMD_orig) {
                # else, split date back up into Y, M, D
                
preg_match("/(\d\d\d\d)(\d\d)(\d\d)/",$fulldateYMD_corrected,$matches);
        
                # return correct date   
                $fields["year"] = $matches[1];
                $fields["month"] = $matches[2];
                $fields["day"] = $matches[3];
        }

        # testing:
        #echo "year: ".$fields['year']."<br />month: ".$fields['month']."<br 
/>day: ".$fields['day']."<br />"; break;

        return $fields;
}


. . .


FILTER>
$fx Array
(
    [n] => AdamOverton/ALLMANAXEForCasey-Recent
    [foxpage] => AdamOverton.ALLMANAXEForCasey-Recent
    [action] => foxpost
    [foxname] => cbox
    [put] => target=
    [template] => FoxTemplates.FoxEventTemplate
    [cancelredirect] => AdamOverton/ALLMANAXEForCasey#recent
    [group] => AdamOverton
    [artistNameClean] => adam overton
    [recentpage] => ALLMANAXEForCasey-Recent
    [scoretitle] => ALL-MAN AXE (for Casey)
    [scoretitleClean] => ALL-MAN AXE (for Casey)
    [pagenamenosuffix] => ALLMANAXEForCasey
    [foxfilter] => Array
        (
            [0] => correctDate
        )

    [foxsessionID] => 2c24f15314f2d99bb91df28e5e5aec90
    [commentNotify] => event listing
    [csum] => New event added!!
    [foxnotify] => AdamOverton
    [month] => 01
    [day] => 26
    [year] => 2013
    [comment] => test
    [author] => test
    [post] => Submit
    [chk_name] => Array
        (
            [0] => author
        )

    [chk_msg] => Array
        (
            [0] => required field
        )

)

INPUT-VR>
$fx array after IV Replace Array
(
    [n] => AdamOverton/ALLMANAXEForCasey-Recent
    [foxpage] => AdamOverton.ALLMANAXEForCasey-Recent
    [action] => foxpost
    [foxname] => cbox
    [put] => target=
    [template] => FoxTemplates.FoxEventTemplate
    [cancelredirect] => AdamOverton/ALLMANAXEForCasey#recent
    [group] => AdamOverton
    [artistNameClean] => adam overton
    [recentpage] => ALLMANAXEForCasey-Recent
    [scoretitle] => ALL-MAN AXE (for Casey)
    [scoretitleClean] => ALL-MAN AXE (for Casey)
    [pagenamenosuffix] => ALLMANAXEForCasey
    [foxfilter] => Array
        (
            [0] => correctDate
        )

    [foxsessionID] => 2c24f15314f2d99bb91df28e5e5aec90
    [commentNotify] => event listing
    [csum] => New event added!!
    [foxnotify] => AdamOverton
    [month] => 01
    [day] => 26
    [year] => 2013
    [comment] => test
    [author] => test
    [post] => Submit
    [chk_name] => Array
        (
            [0] => author
        )

    [chk_msg] => Array
        (
            [0] => required field
        )

)

PTVPRE> INPUTCHECK>
$tar 1 Array
(
    [0] => Array
        (
            [target] => AdamOverton.ALLMANAXEForCasey-Recent
            [template] => FoxTemplates.FoxEventTemplate
            [put] => target=
        )

)

GROUPNAME>AdamOverton.ALLMANAXEForCasey-Recent 
tgt=AdamOverton.ALLMANAXEForCasey-Recent
$tar Array
(
    [0] => Array
        (
            [target] => AdamOverton.ALLMANAXEForCasey-Recent
            [template] => FoxTemplates.FoxEventTemplate
            [put] => target=
            [foxaction] => add
            [fulltarget] => AdamOverton.ALLMANAXEForCasey-Recent
        )

)
SECURITY> UPDATEPAGES> 
TARGET=AdamOverton.ALLMANAXEForCasey-Recent 
PERMISSION>AdamOverton.ALLMANAXEForCasey-Recent 
TEMPLATE>FoxTemplates.FoxEventTemplate ACTION>add INDEX=0 ENGINE> 
TEMPLATE-VR>
VALUE(group)=AdamOverton
VALUE(pagenamenosuffix)=ALLMANAXEForCasey
VALUE(group)=AdamOverton
VALUE(scoretitleClean)=ALL-MAN AXE (for Casey)
VALUE(pagenamenosuffix)=ALLMANAXEForCasey
VALUE(scoretitleClean)=ALL-MAN AXE (for Casey)
VALUE(pagenamenosuffix)=ALLMANAXEForCasey
VALUE(author)=test
VALUE(foxsessionID)=2c24f15314f2d99bb91df28e5e5aec90
VALUE(year)=2013
VALUE(month)=01
VALUE(day)=26
VALUE(pagenamenosuffix)=ALLMANAXEForCasey
VALUE(recentpage)=ALLMANAXEForCasey-Recent
VALUE(group)=AdamOverton
VALUE(pagenamenosuffix)=ALLMANAXEForCasey
VALUE(group)=AdamOverton
VALUE(pagenamenosuffix)=ALLMANAXEForCasey
VALUE(group)=AdamOverton
VALUE(group)=AdamOverton
VALUE(comment)=test
VALUE(pagenamenosuffix)=ALLMANAXEForCasey
ADD>


On 16 Jan 2013, at 1:21 AM, Hans Bracker wrote:

> Hello Adam,
> 
> can you do some standard fox debugging, by
> 1. disable the redirect=... temporarily;
> 2. use (:foxmessages:) to get error messages (redirect needs to be
> disabled for this); (probably would just say that there is no target)
> 3. in fox.php near the top set $FoxDebug = 4; or higher temporarily.
> 
> The last should give you extensive details of what fox receives from
> the form, and how it is processed. Especially check for target and
> how it is processed.
> From what you wrote it is not clear to me how 'target' is
> constructed, i.e. what your foxfilter does for instance.
> 
> 
> 
> Best regards,
> Hans                         
> mailto:[email protected]
> www.softflow.co.uk
> 

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to