[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [ic] 4.6.1 field tags return wrong value
Quoting Ton Verhagen (ton@verhagen.net):
> At 08:19 AM 12/27/00 -0500, you wrote:
> >Quoting Ton Verhagen (ton@verhagen.net):
> > > Dear All,
> > >
> > > The item-field tag and friends return the wrong value when localization is
> > > in effect.
> > > I'm using: IC4.6.1 -- RH7.0 -- Perl5.6
> > >
> > > Example:
> > >
> > > My flypage only contains three tags:
> > > [item-code] - [item-field title] - [item-field comment]
> > >
> > > Locale table contains:
> > > code en_US de_DE fr_FR nl_NL
> > > ProductFiles products de_products fr_products nl_products
> > > products products de_products fr_products nl_products
> > >
> > >
> > > Setting the locale to nl_NL with:
> > > http://www.mydomain.com/cgi-bin/construct/process/locale/nl_NL/page/index
> > >
> > > Call my flypage with:
> > > http://www.mydomain.com/cgi-bin/construct/os28084.html
> > >
> >
> >I think someone already asked this, but what *do* you get when you call
> >http://www.mydomain.com/cgi-bin/construct/page/process/locale/nl_NL/page/os28084.html
>
> Call my flypage with:
> http://www.mydomain.com/cgi-bin/construct/os28084.html
>
> Results on my flypage:
> os28084 - Tape Measure - No matter what you need to measure ... [snip]
> This is wrong!
>
This was a bit hard to find because it seemed to work to me (in other words,
[field description [item-code]] worked. Turned out this was a problem with the
[item-field column] -> [item-data Vend::OnlyProducts column]
optimization that is done in Interpolate.pm.
Patch attached and put in stable branch CVS.
--
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.7621 fax 7501 <heins@akopia.com>
I have a cop friend who thinks he ought be able to give a new ticket;
"too dumb for conditions".
Index: lib/Vend/Config.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Config.pm,v
retrieving revision 1.27
diff -r1.27 Config.pm
1653,1660d1652
< if( defined $Vend::Cfg->{OnlyProducts} ) {
< undef $Vend::Cfg->{OnlyProducts};
< next;
< }
< else {
< $Vend::Cfg->{OnlyProducts} =
< $C->{Database}{$_}{'name'};
< }
Index: lib/Vend/Data.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Data.pm,v
retrieving revision 1.18
diff -r1.18 Data.pm
111d110
< my $return;
113c112
< return ($return = $ref) if $ref->record_exists($code);
---
> return ($ref->ref()) if $ref->record_exists($code);
149a149
> $Vend::OnlyProducts = $_;
151a152,154
>
> undef $Vend::OnlyProducts if scalar @Vend::Productbase > 1;
>
152a156
> return $Products;
290,291c294,295
< return database_field($Vend::Cfg->{OnlyProducts}, $field_name, $code)
< if $Vend::Cfg->{OnlyProducts};
---
> return database_field($Vend::OnlyProducts, $field_name, $code)
> if $Vend::OnlyProducts;
Index: scripts/interchange.PL
===================================================================
RCS file: /anon_cvs/repository/interchange/scripts/interchange.PL,v
retrieving revision 1.17
diff -r1.17 interchange.PL
1358,1360d1357
< $Vend::OnlyProducts = defined $Vend::Cfg->{ProductFiles}->[1]
< ? undef
< : $Vend::Cfg->{ProductFiles}->[0];