Very odd. Do you run Build All / Changed on a nightly cron? Try running "Build Changed" now if you do. That'll get rid of the error so you can test again (the "has changed since you last modified it" error message is basically telling you the timestamp is different to what was stored)
If you REALLY don't care about that feature - you can just edit it out of /admin/GT/SQL/Table.pm. Find this bit:
Code:
$COMPILE{_check_timestamp} = __LINE__ . <<'END_OF_SUB';
sub _check_timestamp {
# -------------------------------------------------------------------
# Won't modify a record if the passed in timestamp is older than
# what's in the database.
#
my ($self, $keys, $set) = @_;
# first check to see if we even need to look up the orig timestamp.
my $auto = $self->time_check;
return 1 unless ($auto);
my $found = 0;
for (keys %$auto) {
exists $set->{$_} and ($found = 1); # should only be one timestamp.
}
return 1 unless ($found);
# if we got here, then we do a search on the record and compare timestamp.
my $pk = $self->{schema}->{pk};
my $cond = GT::SQL::Condition->new;
my @res;
for my $key (@$pk) {
$cond->add($key, "=", $keys->{$key});
}
for my $tmstmp (keys %$auto) {
push @res, $tmstmp;
$cond->add($tmstmp, ">", $set->{$tmstmp});
delete $set->{$tmstmp};
}
my $sth = $self->select($cond, \@res) or return;
if ($sth->fetchrow_arrayref) {
return $self->warn('ALREADYCHANGED');
}
else {
return 1;
}
}
END_OF_SUB
..and change to simply:
Code:
$COMPILE{_check_timestamp} = __LINE__ . <<'END_OF_SUB';
sub _check_timestamp {
# -------------------------------------------------------------------
# Won't modify a record if the passed in timestamp is older than
# what's in the database.
#
my ($self, $keys, $set) = @_;
return 1;
}
END_OF_SUB
Obviously make a backup of that file, just in case it doesn't work =)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my
Amazon Wish List GLinks ULTRA Package | GLinks ULTRA Package PRO Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin |
Pre-Made Template Sets |
FREE GLinks Plugins!